Procházet zdrojové kódy

新增带队负责人和二维码显示逻辑

gcz před 10 měsíci
rodič
revize
bc42b5b2c1
3 změnil soubory, kde provedl 82 přidání a 4 odebrání
  1. 32 3
      center/orderdetails.vue
  2. 1 1
      common/request.js
  3. 49 0
      pages/bookticket.vue

+ 32 - 3
center/orderdetails.vue

@@ -48,17 +48,31 @@
 				</view>
 			</view>
 			<view class="box qr-wrap" v-if="orderDetails.parentQrcodeStatus==0">
-				<view class="title">二维码</view>
+				<view class="title" v-if="orderDetails.supportQrcode">二维码</view>
+				<template v-if="orderDetails.supportQrcode">
 				<view class="qr-content">
 					<view class="img-wrap">
 						<view class="ayQrcode">
 							<uv-qrcode :hide="showSingleQR" ref="qrcode" size="180px" :value="mainQR"></uv-qrcode>
 						</view>
 					</view>
-					<!-- <view class="">{{orderDetails.viewersList.length}}张演出票</view> -->
-					 <!-- order-num del-line -->
 					<view class="order-num">取票号:{{orderDetails.parentQrcodeNo}}</view>
 				</view>
+				</template>
+				<template v-else-if="orderDetails.supportIdcard && !orderDetails.supportQrcode">
+				<view class="qr-content">
+					<!-- 禁止使用电子核销码核销入场,只能用身份证刷闸机入场 -->
+					<view class="qrcode-tip">本票种需凭「取票码」至前台换票入场,或凭「身份证原件」入场</view>
+					<view class="order-num">取票号:{{orderDetails.parentQrcodeNo}}</view>
+				</view>
+				</template>
+				<template v-else>
+				<view class="qr-content">
+					<!-- 只能到前台提供身份证号码/取票号/订单号等信息进行取票 -->
+					<view class="qrcode-tip">本票种需凭「取票码」至前台换票入场</view>
+					<view class="order-num">取票号:{{orderDetails.parentQrcodeNo}}</view>
+				</view>
+				</template>
 			</view>
 			<view class="box viewers-list-tuan">
 				<view class="title">观影人员</view>
@@ -151,9 +165,17 @@
 					<view class="item">座位:{{singleInfo.seatName}}</view>
 					<view class="item">状态:{{singleInfo.qrcodeStatus|filterSingleState}}</view>
 				</view>
+				<template v-if="orderDetails.supportQrcode">
 				<view class="singleQrcode">
 					<uv-qrcode ref="singleQrcode" size="180px" :options="singleQrOptions" :value="singleQrContent" ></uv-qrcode>
 				</view>
+				</template>
+				<template v-else-if="orderDetails.supportIdcard && !orderDetails.supportQrcode">
+					<view class="qrcode-tip">本票种需凭「取票码」至前台换票入场,或凭「身份证原件」入场</view>
+				</template>
+				<template v-else>
+					<view class="qrcode-tip">本票种需凭「取票码」至前台换票入场</view>
+				</template>
 				<view class="order-num" :class="{'del-line':singleInfo.qrcodeStatus!==0}">取票号:{{singleInfo.qrcodeNo}}</view>
 			</view>
 		</u-popup>
@@ -919,4 +941,11 @@
 		margin: 24rpx auto 54rpx;
 	}
 }
+.qrcode-tip{
+	margin-top: 10px;
+	text-align: center;
+	font-size: 24rpx;
+	font-weight: 400;
+	color: #7F7F7F;
+}
 </style>

+ 1 - 1
common/request.js

@@ -78,7 +78,7 @@ module.exports = (vm) => {
 				complete:function(){
 					showModal = false;
 					uni.$u.vuex('vuex_member_info', {});
-					 window.location.href = commonConfig.authUrl
+					 // window.location.href = commonConfig.authUrl
 					// uni.$u.route(commonConfig.authUrl);
 				}
 			});

+ 49 - 0
pages/bookticket.vue

@@ -43,6 +43,21 @@
 					请先<text style="color: #ED0000;">实名认证</text>
 				</view>
 			</view> -->
+			<view class="block-wrap linkman">
+				<view class="block-title u-flex">
+					<view class="name">带队负责人</view>
+				</view>
+				<view class="">
+					<view class="item u-flex">
+						<view class="til">姓名: </view>
+						<u--input placeholder="请输入负责人姓名" border="surround" maxlength="12" v-model="linkName"></u--input>
+					</view>
+					<view class="item u-flex">
+						<view class="til">手机号:</view>
+						<u--input placeholder="请输入负责人手机号" border="surround" maxlength="11" v-model="linkPhone"></u--input>
+					</view>
+				</view>
+			</view>
 			<view class="block-wrap visitors">
 				<view class="block-title u-flex">
 					<view class="name">观影人信息</view>
@@ -202,6 +217,8 @@
 					name:'',
 					cardId:''
 				},
+				linkName:'',
+				linkPhone:'',
 
 			}
 		},
@@ -367,6 +384,22 @@
 				// }
 				// 一证多票调整暂时隐藏
 				console.log('applyOrder');
+				
+				if(!this.linkName||!this.linkPhone){
+					uni.showToast({
+						title:'请填写带队负责人信息',
+						icon:'none'
+					})
+					return
+				}
+				if(!uni.$u.test.mobile(this.linkPhone)){
+					uni.showToast({
+						title:'请正确填写带队负责人电话',
+						icon:'none'
+					})
+					return
+				}
+				
 				this.cansubmit = false;
 				// console.log('this.pageContent',this.pageContent);
 				let params = {
@@ -384,6 +417,8 @@
 					price:this.pageContent.salePrice,
 					priceTotal:this.totalPrice,
 					viewerList:this.visitors,
+					linkName:this.linkName,
+					linkPhone:this.linkPhone,
 					
 				}
 				console.log('params',params);
@@ -1074,4 +1109,18 @@
 			border-radius: 8rpx;
 		}
 	}
+.linkman{
+	.item{
+		margin-bottom: 10px;
+		.til{
+			width: 4em;
+			text-align: right;
+			font-size: 28rpx;
+		}
+		/deep/ .u-input{
+			width: auto;
+			flex: 1;
+		}
+	}
+}
 </style>