|
@@ -330,7 +330,6 @@ export default {
|
|
|
},
|
|
|
async onShow() {
|
|
|
// #ifdef H5
|
|
|
- // this.OfficialLogin()
|
|
|
if (location.search) {
|
|
|
let arrs = location.search.slice(1).split("&")
|
|
|
for (let i = 0; i < arrs.length; i++) {
|
|
@@ -338,7 +337,6 @@ export default {
|
|
|
}
|
|
|
console.log('optObj:', this.optObj);
|
|
|
uni.setStorageSync('h5_code', this.optObj.code)
|
|
|
- // this.OfficialLogin()
|
|
|
} else {
|
|
|
// 没有code,就重定向到地址https://www.xyyxt.net?ask_type=h.xyyxt.net 去获取code,授权后就会把code带上然后访问域名,这时候你就拿到code了
|
|
|
if (!uni.getStorageSync('h5_code')) {
|
|
@@ -347,7 +345,7 @@ export default {
|
|
|
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6f48f721d18244eb" +
|
|
|
"&redirect_uri=" +
|
|
|
encodeURIComponent('https://www.xyyxt.net/?ask_type=h.xyyxt.net') +
|
|
|
- "&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect"
|
|
|
+ "&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
|
|
|
)
|
|
|
return
|
|
|
} else {
|