|
|
@ -83,6 +83,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
// 0016分享的界面跳转进来 |
|
|
|
// 0016分享的界面跳转进来 |
|
|
|
if (app.globalData.accountType == '0000011&key' && app.globalData.h5code) { |
|
|
|
if (app.globalData.accountType == '0000011&key' && app.globalData.h5code) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/goods/externalCoupon/externalCoupon' |
|
|
|
url: '/pages/goods/externalCoupon/externalCoupon' |
|
|
|
}) |
|
|
|
}) |
|
|
@ -206,29 +208,38 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//H5 获取openId |
|
|
|
//H5 获取openId |
|
|
|
getH5AccessToken() { |
|
|
|
async getH5AccessToken() { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
code: app.globalData.h5code |
|
|
|
code: app.globalData.h5code |
|
|
|
} |
|
|
|
} |
|
|
|
getH5AccessToken(params).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
let res = await getH5AccessToken(params); |
|
|
|
|
|
|
|
|
|
|
|
if (res.return_code == '000000' && res.return_data.openid) { |
|
|
|
if (res.return_code == '000000' && res.return_data.openid) { |
|
|
|
app.globalData.openId = res.return_data.openid; |
|
|
|
app.globalData.openId = res.return_data.openid; |
|
|
|
uni.setStorage({ |
|
|
|
// uni.setStorage({ |
|
|
|
key: "openId", |
|
|
|
// key: "openId", |
|
|
|
data: res.return_data.openid |
|
|
|
// data: res.return_data.openid |
|
|
|
}) |
|
|
|
// }) |
|
|
|
this.getH5AccessByOpenId(); |
|
|
|
|
|
|
|
|
|
|
|
uni.setStorageSync("openId",res.return_data.openid); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await this.getH5AccessByOpenId(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.jumpcdx(); |
|
|
|
this.jumpcdx(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
//判断手机号 |
|
|
|
//判断手机号 |
|
|
|
getH5AccessByOpenId() { |
|
|
|
async getH5AccessByOpenId() { |
|
|
|
let datas = { |
|
|
|
let datas = { |
|
|
|
openId: app.globalData.openId |
|
|
|
openId: app.globalData.openId |
|
|
|
} |
|
|
|
} |
|
|
|
getH5AccessByOpenId(datas).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
let res = await getH5AccessByOpenId(datas); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(res.return_data.object&&res.return_data.uniqueCode){ |
|
|
|
app.globalData.userInfo = res.return_data |
|
|
|
app.globalData.userInfo = res.return_data |
|
|
|
.object |
|
|
|
.object |
|
|
|
.highUser; |
|
|
|
.highUser; |
|
|
@ -243,7 +254,22 @@ |
|
|
|
key: "token", |
|
|
|
key: "token", |
|
|
|
data: res.return_data.uniqueCode |
|
|
|
data: res.return_data.uniqueCode |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
app.globalData.userInfo = ''; |
|
|
|
|
|
|
|
app.globalData.token = ''; |
|
|
|
|
|
|
|
uni.setStorage({ |
|
|
|
|
|
|
|
key: "user", |
|
|
|
|
|
|
|
data: '' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
uni.setStorage({ |
|
|
|
|
|
|
|
key: "token", |
|
|
|
|
|
|
|
data: '' |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
jumpcdx() { |
|
|
|
jumpcdx() { |
|
|
|
let str =encodeURIComponent(app.globalData.h5url+"/index.html#/") |
|
|
|
let str =encodeURIComponent(app.globalData.h5url+"/index.html#/") |
|
|
|