Browse Source

修复微信 绑定

shenjj 7 years ago
parent
commit
c75ecd0fa7
2 changed files with 2 additions and 3 deletions
  1. 1 1
      pages/mobile/wechat/index.vue
  2. 1 2
      store/index.js

+ 1 - 1
pages/mobile/wechat/index.vue

@@ -73,7 +73,7 @@
       }
       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`
+        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`
       } else if (info) {
         info = JSON.parse(info)
         localStorage.removeItem('USOFTMALLWECHATINFO')

+ 1 - 2
store/index.js

@@ -523,12 +523,11 @@ export const actions = {
   // 保存微信信息
   GerWechatInfo({ commit }, params = {}) {
     let id = params.openId
+    console.log('openid:' + id)
     commit('option/REQUEST_WECHATINFO_STATUS')
     return axios.get('/wx/getWxUserInfo', { params: params })
       .then(response => {
         commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', response.data)
-        console.log(response.data + '\n')
-        console.log(response.data.status)
         if (response.data.status >= 0) {
           // 有状态
           if (id !== '' && !id) {