|
@@ -81,6 +81,7 @@ export default {
|
|
|
},
|
|
|
async getOpenId(code) {
|
|
|
try {
|
|
|
+ /*
|
|
|
// this.$store.commit('SET_OPENID', 'odJnI0-Y6ZJap-Ow9nmJH-4WyxhU');
|
|
|
this.$store.commit('SET_OPENID', 'oEDin6CwQMev3iRu74IAsE4mYYwo'); // 参数公众号
|
|
|
// 判断用户是否需要登录,
|
|
@@ -88,15 +89,14 @@ export default {
|
|
|
this.$router.replace({
|
|
|
path: 'home',
|
|
|
});
|
|
|
- });
|
|
|
- /*
|
|
|
+ });*/
|
|
|
// 通过code获取 openId等用户信息,/api/user/wechat/login 为后台接口
|
|
|
const { appid, secret } = getAppIdByGroupIdAndMallId({
|
|
|
groupId: this.$route.params.groupId,
|
|
|
mallId: this.$route.params.mallId,
|
|
|
type: 'all',
|
|
|
});
|
|
|
- // console.log(86, appid, secret, code);
|
|
|
+ console.log(99, appid, secret, code);
|
|
|
// return;
|
|
|
// ?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code
|
|
|
const res = await WxJsOpenId({
|
|
@@ -115,7 +115,7 @@ export default {
|
|
|
path: 'home',
|
|
|
});
|
|
|
});
|
|
|
- }*/
|
|
|
+ }
|
|
|
} catch (err) {
|
|
|
console.log(106, err);
|
|
|
}
|