|  | @@ -87,7 +87,8 @@
 | 
											
												
													
														|  |  						<view class="r-userinfo-item">
 |  |  						<view class="r-userinfo-item">
 | 
											
												
													
														|  |  							<view class="r-item-title">被保人</view>
 |  |  							<view class="r-item-title">被保人</view>
 | 
											
												
													
														|  |  							<view class="r-item-info">{{ insureUser.userData.length }}人(<text
 |  |  							<view class="r-item-info">{{ insureUser.userData.length }}人(<text
 | 
											
												
													
														|  | -									v-for="(user,index) in insureUser.userData" :key="user.id">{{ user.fullName }}{{ index < insureUser.userData.length - 1 ? ',' : '' }}</text>)
 |  | 
 | 
											
												
													
														|  | 
 |  | +									v-for="(user, index) in insureUser.userData" :key="user.id">{{ user.fullName }}{{
 | 
											
												
													
														|  | 
 |  | +										index < insureUser.userData.length - 1 ? ',' : '' }}</text>)
 | 
											
												
													
														|  |  							</view>
 |  |  							</view>
 | 
											
												
													
														|  |  						</view>
 |  |  						</view>
 | 
											
												
													
														|  |  						<view class="r-userinfo-item">
 |  |  						<view class="r-userinfo-item">
 | 
											
										
											
												
													
														|  | @@ -133,11 +134,12 @@
 | 
											
												
													
														|  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">有效期</view>
 |  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">有效期</view>
 | 
											
												
													
														|  |  				<view class="use-text">购买后{{ previewCourseInfo?.indate }}天有效</view>
 |  |  				<view class="use-text">购买后{{ previewCourseInfo?.indate }}天有效</view>
 | 
											
												
													
														|  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">除外日期</view>
 |  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">除外日期</view>
 | 
											
												
													
														|  | -				<view class="use-text">每<text v-for="item in previewCourseInfo?.downTime">{{ '周' + item + ','
 |  | 
 | 
											
												
													
														|  | 
 |  | +				<view class="use-text">每<text v-for="item in previewCourseInfo?.downTime">{{ '周' + item + ' '
 | 
											
												
													
														|  |  				}}</text>不可用
 |  |  				}}</text>不可用
 | 
											
												
													
														|  |  				</view>
 |  |  				</view>
 | 
											
												
													
														|  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">预约信息</view>
 |  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">预约信息</view>
 | 
											
												
													
														|  | -				<view class="use-text">{{previewCourseInfo?.advanceTime==0?'免预约': '请你提前'+previewCourseInfo?.advanceTime+'小时预约' }}</view>
 |  | 
 | 
											
												
													
														|  | 
 |  | +				<view class="use-text">{{ previewCourseInfo?.advanceTime == 0 ? '免预约' :
 | 
											
												
													
														|  | 
 |  | +					'请你提前' + previewCourseInfo?.advanceTime + '小时预约' }}</view>
 | 
											
												
													
														|  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">适用人数</view>
 |  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">适用人数</view>
 | 
											
												
													
														|  |  				<view class="use-text">每张券最多{{ previewCourseInfo?.usableCount }}人使用</view>
 |  |  				<view class="use-text">每张券最多{{ previewCourseInfo?.usableCount }}人使用</view>
 | 
											
												
													
														|  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">温馨提示</view>
 |  |  				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">温馨提示</view>
 | 
											
										
											
												
													
														|  | @@ -429,12 +431,15 @@ let orderFormData = ref({
 | 
											
												
													
														|  |  		familyMembersIds: '',
 |  |  		familyMembersIds: '',
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  |  })
 |  |  })
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +const orderCode = ref(null)
 | 
											
												
													
														|  | 
 |  | +const orderId = ref(null)
 | 
											
												
													
														|  |  const submitOrderImpl = () => {
 |  |  const submitOrderImpl = () => {
 | 
											
												
													
														|  |  	orderFormData.value.amount = countTotal.value
 |  |  	orderFormData.value.amount = countTotal.value
 | 
											
												
													
														|  |  	if (!placeId.value) {
 |  |  	if (!placeId.value) {
 | 
											
												
													
														|  | -		if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
 |  | 
 | 
											
												
													
														|  | -		if (userData.value.length < countTotal.value) return TipsUtils.tips_toast(`请至少选择${countTotal.value}人`)
 |  | 
 | 
											
												
													
														|  | -		if (userData.value.length > countTotal.value) return TipsUtils.tips_toast(`最多选择${countTotal.value}人`)
 |  | 
 | 
											
												
													
														|  | 
 |  | +		// if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
 | 
											
												
													
														|  | 
 |  | +		// if (userData.value.length < countTotal.value) return TipsUtils.tips_toast(`请至少选择${countTotal.value}人`)
 | 
											
												
													
														|  | 
 |  | +		// if (userData.value.length > countTotal.value) return TipsUtils.tips_toast(`最多选择${countTotal.value}人`)
 | 
											
												
													
														|  |  		orderFormData.value.orderType = 5
 |  |  		orderFormData.value.orderType = 5
 | 
											
												
													
														|  |  		orderFormData.value.type = 2
 |  |  		orderFormData.value.type = 2
 | 
											
												
													
														|  |  	} else {
 |  |  	} else {
 | 
											
										
											
												
													
														|  | @@ -453,18 +458,38 @@ const submitOrderImpl = () => {
 | 
											
												
													
														|  |  		success(res) {
 |  |  		success(res) {
 | 
											
												
													
														|  |  			TipsUtils.tips_toast('订阅成功')
 |  |  			TipsUtils.tips_toast('订阅成功')
 | 
											
												
													
														|  |  			http.post('/order/createOrder', data, { loading: true }).then((res) => {
 |  |  			http.post('/order/createOrder', data, { loading: true }).then((res) => {
 | 
											
												
													
														|  | -				getOrderQuery(res.result.orderCode, res.result.orderId)
 |  | 
 | 
											
												
													
														|  | 
 |  | +				orderCode.value = res.result.orderCode
 | 
											
												
													
														|  | 
 |  | +				orderId.value = res.result.orderId
 | 
											
												
													
														|  | 
 |  | +				paymentOrder(res.result.params)
 | 
											
												
													
														|  |  			})
 |  |  			})
 | 
											
												
													
														|  |  		},
 |  |  		},
 | 
											
												
													
														|  |  		fail(err) {
 |  |  		fail(err) {
 | 
											
												
													
														|  |  			console.log(err, '订阅消息失败')
 |  |  			console.log(err, '订阅消息失败')
 | 
											
												
													
														|  |  			http.post('/order/createOrder', data, { loading: true }).then((res) => {
 |  |  			http.post('/order/createOrder', data, { loading: true }).then((res) => {
 | 
											
												
													
														|  | -				getOrderQuery(res.result.orderCode, res.result.orderId)
 |  | 
 | 
											
												
													
														|  | 
 |  | +				orderCode.value = res.result.orderCode
 | 
											
												
													
														|  | 
 |  | +				orderId.value = res.result.orderId
 | 
											
												
													
														|  | 
 |  | +				paymentOrder(res.result.params)
 | 
											
												
													
														|  |  			})
 |  |  			})
 | 
											
												
													
														|  |  		}
 |  |  		}
 | 
											
												
													
														|  |  	})
 |  |  	})
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +const paymentOrder = (payInfo: object) => {
 | 
											
												
													
														|  | 
 |  | +	console.log(payInfo, '支付参数');
 | 
											
												
													
														|  | 
 |  | +	uni.requestPayment({
 | 
											
												
													
														|  | 
 |  | +		provider: 'wxpay',
 | 
											
												
													
														|  | 
 |  | +		...payInfo,
 | 
											
												
													
														|  | 
 |  | +		success: function (res) {
 | 
											
												
													
														|  | 
 |  | +			console.log('支付成功', res);
 | 
											
												
													
														|  | 
 |  | +			getOrderQuery(orderCode.value, orderId.value)
 | 
											
												
													
														|  | 
 |  | +		},
 | 
											
												
													
														|  | 
 |  | +		fail: function (err) {
 | 
											
												
													
														|  | 
 |  | +			console.log('支付失败', err);
 | 
											
												
													
														|  | 
 |  | +			// TipsUtils.tips_toast('支付失败,请稍后重试');
 | 
											
												
													
														|  | 
 |  | +		}
 | 
											
												
													
														|  | 
 |  | +	});
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  const submitOrder = debounce(submitOrderImpl, 500)
 |  |  const submitOrder = debounce(submitOrderImpl, 500)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  // code编码 "100001支付成功";"100002查询失败"; "100003查询中 "; "100004支付失败"
 |  |  // code编码 "100001支付成功";"100002查询失败"; "100003查询中 "; "100004支付失败"
 |