|
@@ -244,16 +244,15 @@
|
|
|
if (this.hotelId) {
|
|
|
await this.setHotel(this.hotelId)
|
|
|
}
|
|
|
- //当前用户没设置身份证号则跳转
|
|
|
- if (this.currentHotel && this.currentHotel != {}) {
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/home/home'
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.reLaunch({
|
|
|
- url: '/subpkg/chooseHotel/chooseHotel?source=home'
|
|
|
+ if (!(this.currentHotel && JSON.stringify(this.currentHotel) != '{}')) {
|
|
|
+ let res = await uni.$http.post('/hotel/available', {
|
|
|
+ appId: this.appId
|
|
|
})
|
|
|
+ this.updateCurrentHotel(res.data.data[0])
|
|
|
}
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/home/home'
|
|
|
+ })
|
|
|
},
|
|
|
async getVerificationCode() {
|
|
|
var pattern = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
|
|
@@ -288,6 +287,8 @@
|
|
|
},
|
|
|
},
|
|
|
async onLoad(query) {
|
|
|
+ const {miniProgram: {appId}} = uni.getAccountInfoSync();
|
|
|
+ this.appId = appId
|
|
|
// #ifdef MP-WEIXIN
|
|
|
//二维码扫描时传入hotelId
|
|
|
if (query.q !== null && query.q !== undefined) {
|