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