瀏覽代碼

修改合并丢失的代码

yangc 7 年之前
父節點
當前提交
0b2e7836e3
共有 2 個文件被更改,包括 12 次插入1 次删除
  1. 1 1
      pages/mobile/wechat/toggle.vue
  2. 11 0
      store/index.js

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

@@ -8,7 +8,7 @@
     mounted() {
       this.$nextTick(() => {
         // this.$route.query.url
-        window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd29bbca61728b189&redirect_uri=http://gmxwni.natappfree.cc${this.$route.query.url}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+        window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd29bbca61728b189&redirect_uri=http://139.199.176.56:23400${this.$route.query.url}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
       })
     }
   }

+ 11 - 0
store/index.js

@@ -456,6 +456,17 @@ export const actions = {
       }, (err) => {
         commit('count/GET_INQUIRYSHEET_FAILURE', err)
       })
+  },
+  // 保存微信信息
+  GerWechatInfo({ commit }, params = {}) {
+    commit('option/REQUEST_WECHATINFO_STATUS')
+    return axios.get('/wx/getWxUserInfo', { params: params })
+      .then(response => {
+        commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', response.data)
+        localStorage.setItem('USOFTMALLWECHATINFO', JSON.stringify(response.data))
+      }, err => {
+        commit('option/REQUEST_WECHATINFO_STATUS_FAILURE', err)
+      })
   }
 }