You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.3 KiB
70 lines
1.3 KiB
2 years ago
|
<template>
|
||
|
<view>
|
||
|
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
let app = getApp();
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
|
||
|
}
|
||
|
},
|
||
|
onLoad() {
|
||
|
let that = this;
|
||
|
// #ifdef H5
|
||
|
var arr1 = window.location.href;
|
||
|
var arr2 = arr1.split('=');
|
||
|
if (arr2[1] != undefined && arr2[2] == '1#/') {
|
||
|
app.globalData.h5code = arr2[1];
|
||
|
uni.setStorage({
|
||
|
key: "h5code",
|
||
|
data: arr2[1]
|
||
|
})
|
||
|
uni.switchTab({
|
||
|
url: '../tabBar/home/home'
|
||
|
})
|
||
|
} else {
|
||
|
// 获取openid
|
||
|
that.jumpcdx();
|
||
|
uni.setStorage({
|
||
|
key: "accountId",
|
||
|
data: arr2[1]
|
||
|
})
|
||
|
|
||
|
uni.setStorage({
|
||
|
key: "accountType",
|
||
|
data: arr2[1]
|
||
|
})
|
||
|
if (arr2[2] != undefined && arr2[2]) {
|
||
|
let arr3 = arr2[2].split('&');
|
||
|
uni.setStorage({
|
||
|
key: "gasKey",
|
||
|
data: arr3[0]
|
||
|
})
|
||
|
}
|
||
|
if (arr2[3] != undefined && arr2[3]) {
|
||
|
let arr4 = arr2[3].split('#');
|
||
|
uni.setStorage({
|
||
|
key: "staffCode",
|
||
|
data: arr4[0]
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
// #endif
|
||
|
},
|
||
|
methods: {
|
||
|
jumpcdx() {
|
||
|
location.href =
|
||
|
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FhsgH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect';
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
|
||
|
</style>
|