接口初始调通
This commit is contained in:
@@ -38,34 +38,30 @@ onBeforeMount(() => {
|
||||
console.log("link:",window.location.href);
|
||||
|
||||
// 微信环境授权
|
||||
// if (h5plugin.isWX()) {
|
||||
// console.log('code:', h5plugin.getQueryString('code'));
|
||||
if (h5plugin.isWX()) {
|
||||
console.log('code:', h5plugin.getQueryString('code'));
|
||||
|
||||
if (h5plugin.getQueryString('code')) {
|
||||
// 存在code的话去换取openid
|
||||
authCode.value = h5plugin.getQueryString('code')
|
||||
getOpenId(authCode.value)
|
||||
} else {
|
||||
getCode()
|
||||
}
|
||||
}
|
||||
|
||||
// if (h5plugin.getQueryString('code')) {
|
||||
// // 存在code的话去换取openid
|
||||
// authCode.value = h5plugin.getQueryString('code')
|
||||
// getOpenId(authCode.value)
|
||||
// } else {
|
||||
// getCode()
|
||||
// }
|
||||
// }
|
||||
|
||||
// let token = h5plugin.getQueryString('token')
|
||||
// 更新openid
|
||||
store.commit({ type: "updateToken", token: h5plugin.getQueryString('token') });
|
||||
store.commit({ type: "updateCardId", cardId: h5plugin.getQueryString('cardId') });
|
||||
store.commit({ type: "updateNkh", cardId: h5plugin.getQueryString('nkh') });
|
||||
|
||||
|
||||
console.log("用户活动信息:", store.state.userAccount);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 页面挂载
|
||||
onMounted(() => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user