2 커밋 3bcc232b15 ... de0cdbb46b

작성자 SHA1 메시지 날짜
  Shu de0cdbb46b opt: 根据后台配置选择对应的支付渠道进行支付 1 개월 전
  Shu 52aa3fa35f opt:查询酒店时会传当前小程序的appId到后端,只查询与当前appId有关联的酒店 1 개월 전
3개의 변경된 파일16개의 추가작업 그리고 7개의 파일을 삭제
  1. 14 3
      subpkg/chooseHotel/chooseHotel.vue
  2. 1 2
      subpkg/extend/extend.vue
  3. 1 2
      subpkg_checkin/confirmOrder/confirmOrder.vue

+ 14 - 3
subpkg/chooseHotel/chooseHotel.vue

@@ -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;

+ 1 - 2
subpkg/extend/extend.vue

@@ -137,7 +137,6 @@
 				endTime: '',
 				canExtend: false,
 				checkinInfoId: '',
-				useYst: true
 			};
 		},
 		computed: {
@@ -242,7 +241,7 @@
 			async pay(orderId) {
 				console.log("pay start");
 				// #ifdef MP-WEIXIN
-				if (this.useYst) {
+				if (this.currentHotel.paymentChannel === "YST") {
 					await this.ystPayment(orderId)
 				} else {
 					let res = await uni.$http.post('/order/payment/weChat', {

+ 1 - 2
subpkg_checkin/confirmOrder/confirmOrder.vue

@@ -97,7 +97,7 @@
 					<text text="" align="right" size="20">(注:需付押金{{order.deposit ? order.deposit : ""}}元)</text>
 				</view>
 			</view>
-			<view class="completeBtn" v-if="useYst">
+			<view class="completeBtn" v-if="currentHotel.paymentChannel === 'YST'">
 				<button class="u-button" @click="ystPayment">支付</button>
 			</view>
 			<view class="completeBtn" v-else>
@@ -146,7 +146,6 @@
 					}
 				}],
 				title: "",
-				useYst: true,
 				// #ifdef MP-ALIPAY
 				rightBtns: [{
 					text: "删除",