不采用一步授权

This commit is contained in:
tcubic 2022-08-08 16:17:04 +08:00
parent 50fefbc1c0
commit 8e6454475c
3 changed files with 21 additions and 16 deletions

View File

@ -453,6 +453,9 @@ const activityBtn = (item) => {
console.log("牛牛杯");
window.location.href =
"https://appstatic.cmschina.com/activity/cmszhyxpt/bees/index.html?id=INT_SMKTC_uD5KUL2d";
// setTimeout(()=>{
// location.replace(location.href)
// },1000)
}
if (item.id == 5) {

View File

@ -211,24 +211,25 @@ onBeforeMount(() => {
if (h5plugin.isWX()) {
// console.log("code:", h5plugin.getQueryString("code"));
// if (h5plugin.getQueryString("code")) {
// // codeopenid
// authCode.value = h5plugin.getQueryString("code");
// getOpenId(authCode.value);
// } else {
// getCode();
// }
if(h5plugin.getQueryString("openid")){
console.log("存在openid");
apiAll();
}else{
console.log("不存在openid");
getCode2();
if (h5plugin.getQueryString("code")) {
// codeopenid
authCode.value = h5plugin.getQueryString("code");
getOpenId(authCode.value);
} else {
getCode();
}
//
// if(h5plugin.getQueryString("openid")){
// console.log("openid");
// apiAll();
// }else{
// console.log("openid");
// getCode2();
// }
}
});

View File

@ -8,7 +8,8 @@ export default createStore({
state: {
userAccount: {
// xglOpenId: 'o9B_fvjtyh2KELQYc2t9A3MEh7JQ', //用户openid
xglOpenId: h5plugin.getQueryString('openid'), //用户openid
xglOpenId: '', //用户openid
// xglOpenId: h5plugin.getQueryString('openid'), //用户openid
token: h5plugin.getQueryString('token'), //用户token
cardId: h5plugin.getQueryString('cardId'), //carid
nkh: '', //牛卡号