|
@@ -63,6 +63,7 @@
|
|
|
notFound: false,
|
|
|
displayScanner: true,
|
|
|
source: "",
|
|
|
+ appId: ""
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -70,9 +71,15 @@
|
|
|
async inputChanged() {
|
|
|
this.notFound = false
|
|
|
|
|
|
- let res = await uni.$http.get(`/hotel/hotelName/${this.hotelName}`)
|
|
|
+ let res = await uni.$http.post('/hotel/available', {
|
|
|
+ appId: this.appId,
|
|
|
+ hotelName: this.hotelName
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
if (res.data.data.length === 0) {
|
|
|
this.notFound = true
|
|
|
+ console.log("sous", res);
|
|
|
return
|
|
|
}
|
|
|
this.hotelList = res.data.data
|
|
@@ -108,7 +115,9 @@
|
|
|
// #endif
|
|
|
},
|
|
|
async getHotels() {
|
|
|
- let res = await uni.$http.get('/hotel')
|
|
|
+ let res = await uni.$http.post('/hotel/available', {
|
|
|
+ appId: this.appId
|
|
|
+ })
|
|
|
this.hotelList = res.data.data
|
|
|
},
|
|
|
async queryHotelByHotelId(hotelId) {
|
|
@@ -145,6 +154,8 @@
|
|
|
// #endif
|
|
|
|
|
|
// 首次载入页面渲染全部酒店,后可根据搜索来搜索其他酒店
|
|
|
+ const {miniProgram: {appId}} = uni.getAccountInfoSync();
|
|
|
+ this.appId = appId
|
|
|
await this.getHotels()
|
|
|
},
|
|
|
}
|
|
@@ -228,7 +239,7 @@
|
|
|
background-color: #ffffff;
|
|
|
width: 100%;
|
|
|
position: absolute;
|
|
|
- top: 120rpx;
|
|
|
+ top: 350rpx;
|
|
|
left: 0;
|
|
|
bottom: 0;
|
|
|
padding-top: 20rpx;
|