|
@@ -142,7 +142,8 @@
|
|
"showMessage": "点击进入酒店小超市, 挑选心仪商品",
|
|
"showMessage": "点击进入酒店小超市, 挑选心仪商品",
|
|
"type": "top"
|
|
"type": "top"
|
|
}
|
|
}
|
|
- ]
|
|
|
|
|
|
+ ],
|
|
|
|
+ appId: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -228,6 +229,8 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async onLoad() {
|
|
async onLoad() {
|
|
|
|
+ const {miniProgram: {appId}} = uni.getAccountInfoSync();
|
|
|
|
+ this.appId = appId
|
|
// console.log(__wxConfig)
|
|
// console.log(__wxConfig)
|
|
//获取openid
|
|
//获取openid
|
|
if (!this.userInfo.openid) {
|
|
if (!this.userInfo.openid) {
|
|
@@ -237,7 +240,8 @@
|
|
if (res.code) {
|
|
if (res.code) {
|
|
//发起网络请求
|
|
//发起网络请求
|
|
uni.$http.post('/user/weChatOpenid', {
|
|
uni.$http.post('/user/weChatOpenid', {
|
|
- code: res.code
|
|
|
|
|
|
+ code: res.code,
|
|
|
|
+ appId: this.appId
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
this.userInfo.openid = res.data.data
|
|
this.userInfo.openid = res.data.data
|
|
this.updateUserInfo(this.userInfo)
|
|
this.updateUserInfo(this.userInfo)
|