1.优化微信内置浏览器

yj-dev
杨杰 3 years ago
parent 417eb0e7d8
commit f7d9d64673
  1. 21
      pages/login/register.vue
  2. 13
      pages/tabBar/home/home.vue

@ -145,9 +145,15 @@
key: "token",
data: res.return_data.uniqueCode
})
location.href =
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
if (this.isWeiXinLogin()) {
//
location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
}else{
uni.reLaunch({
url: '/pages/tabBar/home/home'
})
}
} else {
uni.showToast({
title: res.return_msg,
@ -184,6 +190,15 @@
}
},
//
isWeiXinLogin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.search(/MicroMessenger/i) > -1) {
return true;
} else {
return false;
}
},
//
openWx() {
location.href =

@ -185,10 +185,6 @@
// #endif
},
onLoad() {
if (this.isWeiXinLogin()) {
//
}
// 1.wxcode
// #ifdef MP
uni.login({
@ -286,15 +282,6 @@
});
},
//
isWeiXinLogin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.search(/MicroMessenger/i) > -1) {
return true;
} else {
return false;
}
},
//H5
getH5UserInfo(item) {
let params = {

Loading…
Cancel
Save