|
|
@@ -71,10 +71,12 @@
|
|
|
if (this.$route.query.url) {
|
|
|
localStorage.setItem('RETURNURL', this.$route.query.url || '')
|
|
|
}
|
|
|
- if (!info && !this.$route.query.code) {
|
|
|
- window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://pre.usoftmall.com/mobile/wechat&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
|
|
|
+ let ua = this.$store.state.option.userAgent.toLowerCase()
|
|
|
+ if (ua.match(/micromessenger/i) && ua.match(/micromessenger/i)[0] === 'micromessenger' && !this.$route.query.code && !info) {
|
|
|
+ window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://pre.usoftmall.com&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
|
|
|
} else if (info) {
|
|
|
info = JSON.parse(info)
|
|
|
+ localStorage.removeItem('USOFTMALLWECHATINFO')
|
|
|
if (info.openid) {
|
|
|
this.$store.dispatch('GerWechatInfo', {code: '', openId: info.openid})
|
|
|
} else {
|