gcz 1 anno fa
parent
commit
57a6b862b9

+ 882 - 0
center/applydetails.vue

@@ -0,0 +1,882 @@
+<template>
+	<view class="pages">
+		<view class="" :style="{height: navHeight+'px' }"></view>
+		<view class="navbar-box">
+			<u-navbar title="订单详情" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="#ED0000"></u-navbar>
+		</view>
+		<u-loading-page :loading="loadingPage"></u-loading-page>
+		<view class="page-wrap">
+			<view class="status-content">
+				<view class="status-item" v-if="orderDetails.status==0">
+					<view class="text">正在审核,请耐心等待1到2个工作日~</view>
+				<!-- 	<view class="btn-wrap u-flex u-row-center" v-if="countdown!='支付超期'">
+						<view class="btn cancel" @click="cancelOrder">取消订单</view>
+						<view class="btn" @click="gotoPay(orderDetails.id)">立即支付</view>
+					</view> -->
+				</view>
+				<view class="status-item" v-else-if="orderDetails.status==3">
+					<view class="text"><text v-if="countdown!='演出已开始'">距离演出开始,还剩 </text>{{countdown}}</view>
+				</view>
+				<view class="status-item" v-else-if="orderDetails.status==6">
+					<view class="text"><text>退款失败: </text>{{refundInfo.errReason}}</view>
+				</view>
+				<view class="status-item" v-else>
+					<view class="text">{{orderDetails.status|filterOrderState}}</view>
+				</view>
+			</view>
+			<view class="base-info">
+				<view class="top u-flex u-row-between">
+					<view class="name">{{orderDetails.theatreName}}</view>
+					<!-- <view class="icon-wrap u-flex">
+						<u-icon name="phone-fill" color="#999999" size="42rpx"></u-icon>
+						<u-icon name="map-fill" color="#999999" size="42rpx"></u-icon>
+					</view> -->
+				</view>
+				<view class="info u-flex u-row-between">
+					<image class="img" :src="orderDetails.performImg"></image>
+					<view class="text">
+						<view class="name u-flex u-row-between">
+							{{orderDetails.performName}}
+							<!-- <text class="status">{{orderDetails.status|filterOrderState}}</text> -->
+						</view>
+						<view class="time">{{orderDetails.performDate}} {{orderDetails.performTimeStart}}</view>
+						<view class="position u-flex u-row-between">
+							<view class="">{{orderDetails.goodsName}}/{{orderDetails.seatTypeName}}</view>
+							<view class="">X {{orderDetails.viewerNum}}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="box qr-wrap" v-if="orderDetails.parentQrcodeStatus==0">
+				<view class="title">二维码</view>
+				<view class="qr-content">
+					<view class="img-wrap">
+						<!-- <image class="img" :src="orderDetails.performImg"></image> -->
+						<view class="ayQrcode" @click="refreshCode">
+							<ayQrcode v-show="!showSingleQR" ref="qrcode" :modal="modal_qr" :url="qrContent" @hideQrcode="hideQrcode" :height="180" :width="180" />
+						</view>
+						<!-- <image v-if="orderDetails.status==4" class="refund-ico" :src="staticUrl+'/img/refund-ico.png'"></image> -->
+					</view>
+					<!-- <view class="">{{orderDetails.viewersList.length}}张演出票</view> -->
+					 <!-- order-num del-line -->
+					<view class="order-num">取票号:{{orderDetails.parentQrcodeNo}}</view>
+				</view>
+			</view>
+			<view class="box viewers-list-tuan ">
+				<view class="title">观影人员</view>
+				<view class="list">
+					<text class="item" v-for="(item,index) in orderDetails.viewersList" :key="index">{{item.name}}</text>
+				</view>
+			</view>
+			<view class="box order-info">
+				<view class="title u-flex u-row-between">
+					订单信息
+					<text class="btn" v-if="orderDetails.status==3" @click="refund">申请退款</text>
+				</view>
+				<view class="order-info-item" v-for="(item,index) in orderInfo[orderDetails.status]" :key="index">
+					<text class="til">{{item.name}}</text>
+					<text class="con">
+						<text v-if="item.key=='status'">{{orderDetails[item.key]|filterApplyState}}</text>
+						<text v-else-if="item.key=='priceTotal'"> ¥ {{orderDetails[item.key]}}</text>
+						<text v-else>{{orderDetails[item.key]}}</text>
+						<text class="copy-btn" @click="copyOrderNum(orderDetails[item.key])" v-if="item.key=='id'">复制</text>
+					</text>
+				</view>
+				<view class="order-info-item">
+					<text class="til">购票人员</text>
+					<text class="con">{{orderDetails.teamName}} {{orderDetails.mobile}}</text>
+				</view>
+			</view>
+			<view class="box order-info refundInfo" v-if="orderDetails.status==4||orderDetails.status==5||orderDetails.status==6">
+				<view class="title u-flex u-row-between">
+					退款信息
+				</view>
+				<view class="order-info-item">
+					<text class="til">退款单号</text>
+					<text class="con">{{refundInfo.id}}</text>
+					<text class="copy-btn" @click="copyOrderNum(refundInfo.id)" >复制</text>
+				</view>
+				<view class="order-info-item">
+					<text class="til">申请时间</text>
+					<text class="con">{{refundInfo.refundTime}}</text>
+				</view>
+				<view class="order-info-item">
+					<text class="til">订单金额</text>
+					<text class="con">¥ {{refundInfo.orderAmount}}</text>
+				</view>
+				<view class="order-info-item">
+					<text class="til">退款金额</text>
+					<text class="con">¥ {{refundInfo.refundAmount}}</text>
+				</view>
+				<view class="order-info-item">
+					<text class="til">退款原因</text>
+					<text class="con">{{refundInfo.refundReason}}</text>
+				</view>
+				<view class="order-info-item" v-if="orderDetails.status==6">
+					<text class="til">失败原因</text>
+					<text class="con">{{refundInfo.errReason}}</text>
+				</view>
+				<view class="order-info-item">
+					<text class="til">退款状态</text>
+					<text class="con">{{refundInfo.status|filterRefundState}}</text>
+				</view>
+			</view>
+			<view class="box tips parse-content">
+				<view class="title">观影须知</view>
+				<u-parse :content="formerNotice"></u-parse>
+				<!-- <view class="tips-item" v-for="(item,index) in tipsArr" :key="index">
+					{{item}}
+				</view> -->
+			</view>
+		</view>
+		<u-popup :show="showSingleQR" @close="closeSingleQR" @open="openSingleQR" @touchmove.stop.prevent="handleMoveQrcode" :round="10" mode="center">
+			<view class="singleQR-wrap">
+				<view class="title">
+					二维码
+					<!-- <u-icon class="close" @click="closeSingleQR" name="close" color="#333" size="36rpx"></u-icon> -->
+				</view>
+				<view class="single-info">
+					<view class="item">姓名:{{singleInfo.name}}</view>
+					<view class="item">身份证号码:{{singleInfo.idcard|maskID}}</view>
+					<view class="item">座位:{{singleInfo.seatName}}</view>
+					<view class="item">状态:{{singleInfo.qrcodeStatus|filterSingleState}}</view>
+				</view>
+				<view class="singleQrcode" :style="{opacity:singleInfo.qrcodeStatus===0?'1':'0.3'}">
+					<ayQrcode ref="singleqrcode" :modal="singleModalQr" :url="singleQrContent" @hideQrcode="hideSingleQrcode" :height="180" :width="180" />
+				</view>
+				<view class="order-num" :class="{'del-line':singleInfo.qrcodeStatus!==0}">取票号:{{singleInfo.qrcodeNo}}</view>
+			</view>
+		</u-popup>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import { systemInfo } from "@/mixin.js";
+	import ayQrcode from "@/components/ay-qrcode/ay-qrcode.vue"
+	// #ifdef H5
+	import wxH5 from "weixin-jsapi";
+	// #endif
+	export default {
+		mixins:[systemInfo],
+		components:{
+			ayQrcode
+		},
+		data() {
+			return {
+				timer: null,
+				modal_qr: false,
+				qrContent: {}, // 要生成的二维码值
+				id:'',
+				loadingPage:true,
+				staticUrl:this.$commonConfig.staticUrl,
+				orderDetails:{},
+				deadline: null, // 设置截止时间为某个日期的时间戳
+				countdown: '', // 用于显示倒计时时间
+				// 状态(0待支付,2超时取消,3支付完成,待使用,4退款中,5己退款,6退款失败,7己使用,8己超期)
+				orderInfo:{
+					0:[{name:'需付金额',key:'priceTotal'},{name:'订单编号',key:'id'},{name:'申请时间',key:'createTime'},{name:'报名状态',key:'status'}],
+					1:[{name:'订单编号',key:'id'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payWay'},{name:'支付时间',key:'payTime'}],
+					2:[{name:'订单编号',key:'id'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payWay'},{name:'支付时间',key:'payTime'}],
+					3:[{name:'订单金额',key:'realPrice'},{name:'订单编号',key:'id'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payWay'},{name:'支付时间',key:'payTime'}],
+					4:[{name:'订单编号',key:'id'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payWay'},{name:'支付时间',key:'payTime'}],
+					5:[{name:'订单编号',key:'id'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payWay'},{name:'支付时间',key:'payTime'},{name:'备注信息',key:'remark'}],
+					6:[{name:'订单编号',key:'id'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payWay'},{name:'支付时间',key:'payTime'},{name:'备注信息',key:'remark'}],
+					7:[{name:'订单编号',key:'id'},{name:'下单时间',key:'createTime'},{name:'支付方式',key:'payWay'},{name:'支付时间',key:'payTime'}],
+					8:[{name:'订单金额',key:'realPrice'},{name:'订单编号',key:'id'},{name:'下单时间',key:'createTime'},{name:'备注信息',key:'remark'}],
+					9:[{name:'订单金额',key:'realPrice'},{name:'订单编号',key:'id'},{name:'下单时间',key:'createTime'},{name:'备注信息',key:'remark'}],
+				},
+				tipsArr:[
+					'1.请提前到达影院现场,找到自助取票机,打印纸质电影票,完成取票',
+					'2.如现场自助取票机无法打印电影票,请联系影院工作人员处理',
+					'3.凭打印好的纸质电影票、检票入场观影',
+					'4.如果订单使用了兑换券,或购买了特殊场次,暂不支持退票和改签'
+				],
+				params:{
+					
+				},
+				singleInfo:{idcard:''},//观影人信息
+				showSingleQR:false,//显示单人二维码
+				singleModalQr:false,
+				singleQrContent:{},
+				formerNotice:'',
+				countdownTimer:null,//订单倒计时
+				templateIdList:[],//微信小程序订阅消息
+				refundInfo:{status:null},//退款信息
+				
+			}
+		},
+		onShow() {
+			this.getOrderDetails(this.id);
+		},
+		onLoad(page) {
+			console.log('page',page);
+			this.id = page.id;
+			this.getSystemInfo();
+			
+			// this.getTemplateIdList();//获取模板列表
+
+		},
+		onUnload() {
+		    // 页面离开时停止计时器
+		    // clearInterval(this.timer)
+			clearInterval(this.countdownTimer)
+		},
+		mounted() {
+			// 每秒更新倒计时时间
+			this.countdownTimer = setInterval(() => {
+			  const now = new Date().getTime();
+			  const distance = this.deadline - now;
+			  // console.log('distance',distance);
+			  if(this.orderDetails.status==0 && distance<0){
+				  this.countdown = '支付超期';
+				  return
+			  }else if(this.orderDetails.status==3 && distance<0){
+				  this.countdown = '演出已开始';
+				  return
+			  }
+		
+			  // 计算倒计时时间,可以根据需求自定义显示方式
+			  const days = Math.floor(distance / (1000 * 60 * 60 * 24));
+			  const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
+			  const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
+			  const seconds = Math.floor((distance % (1000 * 60)) / 1000);
+		
+			  // 更新倒计时时间
+			  this.countdown = `${days}天 ${hours}小时 ${minutes}分钟 ${seconds}秒`;
+			}, 1000);
+		},
+		methods: {
+			leftClick(e){
+				let pages = getCurrentPages();
+				if(pages.length==1){
+					uni.$u.route('/pages/index/index')
+				}else{
+					uni.navigateBack()
+				};
+			},
+			getTemplateIdList(){
+				this.$u.api.templateIdList({templateLabel:'order_pay'}).then(res=>{
+					console.log('getTemplateIdList',res.data);
+					this.templateIdList = res.data.list.map(item=>{
+						return item.templateId
+					});
+					// if(this.templateIdList.length>0){
+					// 	this.templateEven();
+					// }
+				}).catch(err=>{
+					console.log('getTemplateIdList',err);
+				})
+			},
+			// 展示二维码
+			showQrcode() {
+				let _this = this;
+				this.modal_qr = true;
+				// uni.showLoading()
+				setTimeout(function() {
+					// uni.hideLoading()
+					_this.$refs.qrcode.crtQrCode()
+				}, 50)
+			},
+			//传入组件的方法
+			hideQrcode() {
+				this.modal_qr = false;
+			},
+			refreshCode(){
+				this.qrContent = {};
+				this.qrContent.qrcode = this.orderDetails.parentQrcodeNo;
+				this.qrContent.time = Date.now();
+				this.qrContent = JSON.stringify(this.qrContent);
+				this.showQrcode()
+			},
+			hideSingleQrcode(){
+				this.singleModalQr = false;
+			},
+			getOrderDetails(id){
+				this.$u.api.teamApplyDetails({id:id}).then(res=>{
+					this.loadingPage = false;
+					this.orderDetails = res.data;
+					this.refundInfo =  res.data.refundInfo||{};
+					if(res.data.status==0){//待支付
+						this.deadline = new Date(`${res.data.cancelDateTime}`).getTime();
+					}else if(res.data.status==3){//待使用
+						this.deadline = new Date(`${res.data.performDateTime}`).getTime();
+					}
+					if(res.data.parentQrcodeStatus==0){
+						this.qrContent = {};
+						this.qrContent.qrcode = res.data.parentQrcodeNo;
+						this.qrContent.time = Date.now();
+						this.qrContent = JSON.stringify(this.qrContent);
+						let that = this;
+						that.showQrcode();//一加载生成二维码
+						// this.refreshCode()
+					}
+					
+					this.getPerformerNotice();
+					// console.log('this.deadline',this.deadline);
+					// console.log('orderDetails',JSON.parse(JSON.stringify(res.data)));
+				}).catch(err=>{
+					uni.$u.toast('获取数据失败,!请重试')
+					uni.navigateBack();
+					console.log('getOrderDetails',err);
+				})
+			},
+			singleQR(item,index){
+				let that = this;
+				console.log('singleQR',item);
+				this.showSingleQR = true;
+				this.singleInfo = item;
+				
+				this.singleQrContent = {};
+				this.singleQrContent.qrcode = item.qrcodeNo;
+				this.singleQrContent.time = Date.now();
+				this.singleQrContent = JSON.stringify(this.singleQrContent);
+				that.showSingleQrcode();//一加载生成二维码
+			},
+			// 展示二维码
+			showSingleQrcode() {
+				let _this = this;
+				this.singleModalQr = true;
+				// uni.showLoading()
+				setTimeout(function() {
+					// uni.hideLoading()
+					_this.$refs.singleqrcode.crtQrCode()
+				}, 50)
+			},
+			closeSingleQR(){
+				this.showSingleQR = false;
+			},
+			openSingleQR(){
+				
+			},
+			clickEven(fun,item){
+				// console.log('fun',fun);
+				let funObj = {
+				  pay: this.pay,
+				  logistics:this.logistics,
+				  evaluate:this.evaluate,
+				  refund:this.refund,
+				  cancelOrder:this.cancelOrder,
+				  viewRefund:this.viewRefund,
+				  confirmReceipt:this.confirmReceipt
+				};
+				// console.log('funObj[fun]',funObj[fun]);
+				if (fun in funObj) {
+				  funObj[fun](item);
+				}
+			},
+			pay(item){
+				// #ifdef H5
+					this.gotoPay(this.orderDetails.id);
+				// #endif
+				// #ifdef MP
+					this.setTemplate(this.orderDetails.id);
+				// #endif
+				// console.log('pay',item);
+				// uni.$u.route('/center/pay', {
+				// 	orderId: item.id,
+				// 	// openid: that.vuex_wechatOpenid,
+				// 	payAmount:item.orderPrice
+				// });
+			},
+			logistics(item){
+				// console.log('logistics',item);
+				uni.$u.route('/center/distribution', {
+					orderId: item.id
+				});
+			},
+			evaluate(item){
+				// console.log('logistics',item);
+				uni.$u.route('/shopping/evaluate', {
+					id: item.id
+				});
+			},
+			refund(item){
+				console.log('this.orderDetails',this.orderDetails);
+				uni.$u.route('/center/refundselect', {
+					id: this.orderDetails.id,
+					realPrice:this.orderDetails.realPrice
+				});
+			},
+			cancelOrder(item){
+				let that = this;
+				uni.showModal({
+				    title: '提示',
+				    content: '确认取消吗!',
+				    success: res => {
+				        if (res.confirm) {
+				            this.$u.api.cancelOrder({orderId:that.orderDetails.id}).then(res=>{
+				            	this.$refs.uToast.show({
+				            		message:res.msg,
+				            		complete() {
+				            			that.getOrderDetails(that.orderDetails.id);
+				            		}
+				            	});
+				            	// uni.$u.toast(res.msg);
+				            	console.log('res',res.data);
+				            }).catch(err=>{
+				            	console.log('cancelOrder',err);
+				            })
+				        }
+				    }
+				});
+				// console.log('logistics',item);
+				
+			},
+			confirmReceipt(item){
+				let that = this;
+				uni.showModal({
+				    title: '提示',
+				    content: '确认收货吗!',
+				    success: res => {
+				        if (res.confirm) {
+				            this.$u.api.confirmReceipt({orderId:item.id}).then(res=>{
+								uni.showToast({
+									title:res.msg,
+									duration:2000,
+									complete() {
+										that.evaluate(item)
+										that.getOrderDetails(that.id);
+									}
+								});
+				            	console.log('res',res.data);
+				            }).catch(err=>{
+				            	console.log('confirmReceipt',err);
+				            })
+				        }
+				    }
+				})
+			},
+			goMap(){
+				uni.openLocation({
+				  latitude: Number(this.pickupInfo.pickupLatitude),	//维度
+				  longitude: Number(this.pickupInfo.pickupLongitude), //经度
+				  name: "商行地址",	//目的地定位名称
+				  scale: 15,	//缩放比例
+				  address: this.pickupInfo.pickupAddress	//导航详细地址
+				})
+			},
+			copyOrderNum(orderNum){
+				// console.log('copyOrderNum',orderNum);
+				uni.setClipboardData({
+				    data: orderNum,
+				    success: function () {
+				      uni.showToast({
+				        title: '复制成功'
+				      });
+				    },
+					fail(e) {
+						// console.log('copyOrderNumfail',e);
+						uni.showToast({
+						  title: '复制失败',
+						  icon:"error"
+						});
+					}
+				});
+			},
+			// 设置小程序订阅消息
+			setTemplate(orderId) {
+				let that = this;
+				console.log('templateIdList',this.templateIdList);
+				uni.requestSubscribeMessage({  
+					tmplIds: that.templateIdList,  
+					success (res) {  
+						// that.gotoPay();
+						console.log("success:",res);  
+					},  
+					fail (res) {  
+						console.log("fail:",res);  
+					},  
+					complete (res) {  
+						that.gotoPay(orderId);
+						console.log("complete:",res);  
+					}  
+				})  
+			},
+			gotoPay(orderId){
+				this.$u.api.gotoPay({orderId:orderId,openid:''}).then(res=>{
+					this.payResult = res.data.payInfo;
+					this.payResult.package = res.data.payInfo.packageValue;
+					// #ifdef H5
+					this.initConfig(this.payResult)
+					// #endif 
+					// #ifdef MP
+					this.wxPay()
+					// #endif 
+					// if(this.params.paymentMode==1||this.params.paymentMode==4){
+					// 	this.wxPay()
+					// }else{
+					// 	uni.$u.route('/shopping/paysuccess');
+					// }
+					console.log('gotoPayres',res.data);
+				}).catch(err=>{
+					this.paypass = '';
+					this.checkPassShow = false;
+					console.log('gotoPay',err);
+				})				
+			},
+			wxPay(){
+				let that = this;
+				uni.requestPayment({
+					... this.payResult,
+				    "provider": "wxpay", 
+				    "orderInfo": {
+				        // "appid": "wx499********7c70e",  // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
+				        // "noncestr": "c5sEwbaNPiXAF3iv", // 随机字符串
+				        // "package": "Sign=WXPay",        // 固定值
+				        // "partnerid": "148*****52",      // 微信支付商户号
+				        // "prepayid": "wx202254********************fbe90000", // 统一下单订单号 
+				        // "timestamp": 1597935292,        // 时间戳(单位:秒)
+				        // "sign": "A842B45937F6EFF60DEC7A2EAA52D5A0" // 签名,这里用的 MD5/RSA 签名
+				    },
+				    success(res) {
+						that.payQuery();
+					},
+				    fail(e) {
+						console.log('wxPayfail',e);
+					}
+				})				
+			},
+			payQuery(){
+				let that = this;
+				let retryCount = 0;
+				let maxRetryCount = 5; // 设置最大重试次数
+				let interval = 2000; // 设置间隔时间为2秒
+				let timeout = 10000; // 设置超时时间为10秒
+				let timer;
+				uni.showLoading({
+					title:'支付结果查询中'
+				})
+				timer = setInterval(() => {
+					retryCount++;
+					if (retryCount > maxRetryCount || retryCount * interval > timeout) {
+						clearInterval(timer);
+						  uni.hideLoading();
+						console.log("支付查询超时或达到最大重试次数");
+						// 在这里添加超时或达到最大重试次数的处理逻辑
+						this.reloadList()
+					} else {
+						console.log("第" + retryCount + "次查询");
+						// 调用查询支付状态的方法
+						// 如果支付状态为成功,则清除定时器并处理成功的逻辑
+						// 如果支付状态为失败,则清除定时器并处理失败的逻辑
+						this.$u.api.payQuery({orderId:this.orderId}).then(res=>{
+							// 0-未支付 1-已支付 2-支付中 3-支付失败 4-支付退款
+							let payStatus = res.data.payStatus;
+							if(payStatus===1){
+								uni.$u.route('/center/paysuccess');
+							}else if(payStatus===0||payStatus===2){
+								this.payQuery()
+							}else if(payStatus===3){
+								uni.toast('支付失败')
+							}
+							clearInterval(timer);
+						}).catch(err=>{
+							console.log('payQuery',err);
+						}).finally(()=>{
+							uni.hideLoading()
+						})
+					}
+				}, interval);
+			},
+			getPerformerNotice(){
+				this.$u.api.performerNotice({performId:this.orderDetails.performId}).then(res=>{
+					// console.log('getPerformerNotice',res.data);
+					this.formerNotice =  res.data.performNotice;
+				}).catch(err=>{
+					console.log('getPerformerNotice',err);
+				})
+			},
+			handleMoveQrcode(){
+				console.log('handleMoveQrcode');
+				return false
+			},
+			/**
+			 * 公众号微信支付
+			 */
+			initConfig() {
+				// #ifdef H5
+				let that = this
+				wxH5.config({
+					debug: false, // 这里一般在测试阶段先用ture,等打包给后台的时候就改回false, 
+					appId: that.payResult.appId, // 必填,公众号的唯一标识 
+					timestamp: that.payResult.timeStamp, // 必填,生成签名的时间戳     
+					nonceStr: that.payResult.nonceStr, // 必填,生成签名的随机串 
+					signature: that.payResult.paySign, // 必填,签名 
+					jsApiList: ['chooseWXPay', 'checkJsApi'] // 必填,需要使用的JS接口列表 
+				})
+				wxH5.ready(() => {
+					wxH5.chooseWXPay({
+						timestamp: that.payResult.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符     
+						nonceStr: that.payResult.nonceStr, // 支付签名随机串,不长于 32 位         
+						package: that.payResult.packageValue, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)     
+						signType: 'SHA1', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'     
+						paySign: that.payResult.paySign, // 支付签名     
+						success: () => {
+							that.payQuery();
+						},
+						fail: (e) => {
+							uni.$u.route('/center/order', {
+								status: 0
+							});
+							console.log('wxPayfail', e);
+						},
+						cancel: () => {
+							uni.$u.route('/center/order', {
+								status: 0
+							});
+							that.cansubmit = true;
+						}
+					})
+				})
+				// #endif
+			}
+
+		}
+	}
+</script>
+<style>
+	page{
+		background: linear-gradient(180deg, #ED0000 0%, #F9FBFD 50%,#F9FBFD 100%);
+		background-repeat: no-repeat;
+	}
+</style>
+<style lang="scss" scoped>
+.status-content{
+	text-align: center;
+	padding-top: 30rpx;
+	margin-bottom: 52rpx;
+	.text{
+		font-size: 32rpx;
+		font-weight: 400;
+		color: #FFFFFF;
+		margin-bottom: 52rpx;
+	}
+	.btn-wrap{
+		margin-bottom: 40rpx;
+		.btn{
+			height: 64rpx;
+			line-height: 64rpx;
+			padding: 0 42rpx;
+			border-radius: 8rpx;
+			border: 2rpx solid #FFFFFF;
+			background-color: #ffffff;
+			font-size: 24rpx;
+			font-weight: bold;
+			color: #EE0B0B;
+			&.cancel{
+				border-color: #FFE2E2;
+				color: #FFE2E2;
+				background-color: transparent;
+			}
+			&:not(:last-of-type){
+				margin-right: 100rpx;
+			}
+		}
+	}
+}
+.base-info{
+	background: #FFFFFF;
+	box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(221,221,221,0.5);
+	border-radius: 20rpx;
+	overflow: hidden;
+	margin-bottom: 24rpx;
+	.top{
+		padding: 36rpx 24rpx;
+		background: #F9FAFD;
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #7F7F7F;
+	}
+	.info{
+		padding: 28rpx 20rpx 30rpx 24rpx;
+		.img{
+			width: 180rpx;
+			height: 160rpx;
+		}
+		.text{
+			font-size: 24rpx;
+			font-weight: 400;
+			color: #7F7F7F;
+			padding-left: 26rpx;
+			flex: 1;
+			.name{
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #363636;
+				margin-bottom: 20rpx;
+			}
+			.time{
+				margin-bottom: 20rpx;
+			}
+			.position{
+				margin-bottom: 20rpx;
+			}
+			.status{
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #EE0606;
+			}
+		}
+	}
+}
+.box{
+	margin-bottom: 24rpx;
+	background: #FFFFFF;
+	box-shadow: 0rpx 0rpx 20rpx 2rpx rgba(221,221,221,0.5);
+	border-radius: 20rpx;
+	padding: 36rpx 24rpx;
+	.title{
+		font-size: 28rpx;
+		font-weight: bold;
+		color: #2D2D2D;
+		padding-bottom: 20rpx;
+		margin-bottom: 24rpx;
+		border-bottom: 1px solid #F4F4F4;
+		.btn{
+			height: 40rpx;
+			line-height: 40rpx;
+			padding: 0 20rpx;
+			border-radius: 8rpx;
+			border: 2rpx solid #606060;
+			font-size: 24rpx;
+			font-weight: 400;
+			color: #606060;
+			cursor: pointer;
+		}
+	}
+}
+.order-info{
+	.order-info-item{
+		font-size: 30rpx;
+		font-weight: 400;
+		color: #333333;
+		padding: 10rpx 0;
+		// &:not(:last-child){
+		// 	border-bottom: 0.5px solid #eee;
+		// }
+		.til{
+			font-size: 24rpx;
+			font-weight: 400;
+			color: #999999;
+			margin-right: 40rpx;
+		}
+		.copy-btn{
+			margin-left: 32rpx;
+			height: 30rpx;
+			line-height: 30rpx;
+			padding: 0 14rpx;
+			border-radius: 8rpx;
+			font-size: 20rpx;
+			font-weight: 400;
+			color: #999999;
+			background: #EDEDED;
+		}
+	}
+}
+.tips{
+	.tips-item{
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #7F7F7F;
+		line-height: 36rpx;
+		margin-bottom: 20rpx;
+	}
+}
+.qr-wrap{
+	.qr-content{
+		text-align: center;
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #7F7F7F;
+	}
+	.img-wrap{
+		position: relative;
+	}
+	.ayQrcode,.img{
+		width: 180px;
+		height: 180px;
+		display: block;
+		margin: 0 auto 20rpx;
+		
+	}
+	.refund-ico{
+		width: 200rpx;
+		height: 152rpx;
+		position: absolute;
+		bottom: -10rpx;
+		right: 60rpx;
+	}
+	
+}
+.order-num{
+		position: relative;
+		margin: 30rpx auto 0;
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #363636;
+		border: 1px solid #363636;
+		padding: 5rpx 20rpx;
+		border-radius: 8rpx;
+		width: fit-content;
+		&.del-line{
+			color: #BCBCBC;
+			border: 1px solid #BCBCBC;
+		}
+		&.del-line::after{
+			content: '';
+			width: 110%;
+			height: 1px;
+			background-color: #BCBCBC;
+			position: absolute;
+			top: 50%;
+			left: -5%;
+		}
+	}
+.viewers-list{
+	.item{
+		font-size: 24rpx;
+		color: #999;
+		margin-bottom: 10px;
+		.qrbtn{
+			color: #EE0606;
+		}
+	}
+}
+.viewers-list-tuan{
+	.list{
+		display: grid;
+		grid-template-columns: repeat(4, 1fr);
+		gap: 24rpx;
+	}
+}
+.singleQR-wrap{
+	padding: 0 24rpx 50rpx;
+	box-sizing: border-box;
+	min-width: 80vw;
+	.title{
+		text-align: center;
+		height: 94rpx;
+		line-height: 94rpx;
+		font-size: 28rpx;
+		font-weight: bold;
+		color: #2D2D2D;
+		border-bottom: 2rpx solid #F4F4F4;
+		margin-bottom: 24rpx;
+	}
+	.single-info{
+		margin-bottom: 24rpx;
+		.item{
+			font-size: 24rpx;
+			font-weight: 400;
+			color: #363636;
+			margin-bottom: 10rpx;
+		}
+	}
+	.singleQrcode{
+		width: 160px;
+		height: 160px;
+		margin: 24rpx auto 54rpx;
+	}
+}
+</style>

+ 676 - 0
center/applylist.vue

@@ -0,0 +1,676 @@
+<template>
+	<view class="pages">
+		<u-navbar
+			title="报名记录"
+			:placeholder="true"
+			:autoBack="false"
+			 @leftClick="leftClick"
+			 :safeAreaInsetTop="true"
+			 bgColor="#ED0000"
+			 :titleStyle="{color:'#fff'}"
+			 leftIconColor="#fff"
+		>
+		</u-navbar>
+		<view class="tabs-wrap">
+			<u-tabs 
+			:list="tabsList" 
+			lineColor="#EE0D0D" 
+			:current="tabsCurrent"
+			:activeStyle="{color:'#EE0D0D','font-weight': '600','font-size':'30rpx'}"
+			:inactiveStyle="{color:'#7F7F7F'}"
+			itemStyle="width:25%;box-sizing:border-box;padding:24rpx"
+			@click="tabsClick"></u-tabs>
+		</view>
+		<view class="page-wrap">
+			<mescroll-body class="" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+				<view class="order">
+					<view v-for="(item,index) in orderListWithClass" class="order-item" 
+						:class="item.class"
+						@click="goApplyDetails(item)" :key="item.id">
+						<view class="top u-flex u-row-between">
+							<text>{{item.theatreName}}</text>
+							<text>{{item.status|filterApplyState}}</text>
+						</view>
+						<view class="info u-flex u-col-top">
+							<image class="img" :src="item.performImg"></image>
+							<view class="text">
+								<view class="name">{{item.performName}}</view>
+								<view class="time">{{item.performDate}} {{item.performTimeStart}}</view>
+								<view class="position">{{item.goodsName}}/{{item.seatTypeName}}</view>
+								<view class="statistics">
+									<text>共{{item.viewerNum}}张</text>
+									<text class="label">合计:</text>
+									<text class="price">¥{{item.priceTotal}}</text>
+								</view>
+							</view>
+						</view>
+						<view class="btn-wrap u-flex u-row-right">
+							<view
+								class="btn"
+								:class="btn.class"
+								@click.stop="clickEven(btn.fun,item)"
+								v-for="(btn,index) in statusBtn[item.status]" :key="index">
+								{{btn.name}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</mescroll-body>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+		<tabbar :tabbarIndexProps="1" />
+	</view>
+</template>
+
+<script>
+	import tabbar from "../components/tabbar.vue";
+	// 引入mescroll-mixins.js
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	// #ifdef H5
+	import wxH5 from "weixin-jsapi";
+	// #endif
+	export default {
+		mixins: [MescrollMixin], // 使用mixin
+		components:{
+			tabbar
+		},
+		data() {
+			return {
+				downOption: { 
+				},
+				// 上拉加载的配置(可选, 绝大部分情况无需配置)
+				upOption: {
+					// page: {
+					// 	size: 10 // 每页数据的数量,默认10
+					// },
+					// noMoreSize: 5, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					// empty: {
+					// 	tip: '暂无相关数据'
+					// }
+				},
+				staticUrl:this.$commonConfig.staticUrl,
+				goodsKey:1,
+				hasfetch:false,
+				tabsCurrent:1,
+				tabsList:[
+					{name:'全部',status:null,},
+					{name:'待审核',status:'0',badge:{isDot:false,value:null}},
+					{name:'审核成功',status:'1',badge:{isDot:false,value:null}},
+					{name:'审核失败',status:'2',badge:{isDot:false,value:null}}
+				],
+				status:'',
+				dataList:[],
+				statusBtn:{// 状态(0待支付,2超时取消,3支付完成,待使用,4退款中,5己退款,6退款失败,7己使用,8己超期 9关闭)
+					0:[{name:'查看详情',fun:'goApplyDetails',class:''}],
+					1:[{name:'取消订单',fun:'cancelOrder',class:''},{name:'查看详情',fun:'goOrderDetails',class:'red'}],
+					2:[{name:'查看详情',fun:'goOrderDetails',class:''}],
+					3:[],
+					//,{name:'评价',fun:'evaluate',class:'green'}
+					4:[],
+					5:[],
+					6:[],
+					// ,{name:'查看评价',fun:'viewEvaluate',class:'green'}
+					7:[],
+					8:[],
+					9:[]
+				},
+				orderBadge:{
+					noPayNum:0,
+					deliverNum:0,
+					collectNum:0,
+					commentNum:0,
+					refundNum:0,
+				},
+				templateIdList:[],//微信小程序订阅消息
+			}
+		},
+		computed: {
+		  orderListWithClass() {
+		      return this.dataList.map(order => {
+				  // let spliceData = order.detailList.splice(0,2);
+				  
+				  // let moreData = order.detailList.splice(2,order.detailList.length);
+				  // let moreData = order.detailList.slice(2);
+				  // if(order.detailList.length>2){
+					 //  moreData =  order.detailList;
+				  // }
+		        return {
+		          ...order,
+				  // spliceData:spliceData,
+				  // moreData:moreData,
+				  // showMore:false,
+		          class: {
+					0: 'status-0',
+		            1: 'status-1',
+		            2: 'status-2',
+		            3: 'status-3',
+		            4: 'status-4',
+		            5: 'status-5',
+		            6: 'status-6',
+		            7: 'status-7',
+		            8: 'status-8'
+		          }[order.status] || ''
+		        }
+		      })
+		    }
+		},
+		onLoad(page) {
+			// console.log('page',page);
+			const status = page.status;
+			const index = this.tabsList.findIndex(item => item.status === status);
+			this.tabsCurrent = index>=0?index:0;
+			
+			this.getTemplateIdList();//获取模板列表
+			
+		},
+		onShow() {
+			setTimeout(()=>{
+				this.hasfetch&&this.reloadList()
+			},500);
+			// this.statisticsOrder();
+		},
+		methods: {
+			leftClick(){
+				uni.reLaunch({url: '/center/center'});
+			},
+			/*下拉刷新的回调, 重置列表为第一页 (此处可删,mixins已默认)
+			downCallback(){
+				this.mescroll.resetUpScroll();
+			},
+			/*上拉加载的回调*/
+			upCallback(page) {
+				// this.statisticsOrder();
+				// 此处可以继续请求其他接口
+				// if(page.num == 1){
+				// 	// 请求其他接口...
+				// }
+			
+				// 如果希望先请求其他接口,再触发upCallback,可参考以下写法
+				// if(!this.hasTypeId){
+				// 	this.shopNewsType();
+				// 	return // 此处return,先获取xx
+				// }
+			
+				let pageNum = page.num; // 页码, 默认从1开始
+				let pageSize = page.size; // 页长, 默认每页10条
+				
+				let params = {
+					pageNum : page.num,
+					pageSize :  page.size,
+					statusIn : this.tabsList[this.tabsCurrent]?.status||'',
+					userid:this.vuex_member_info.id
+					// status : this.tabsList[this.tabsCurrent].status,
+				}
+				// console.log('this.params',params);
+				this.$u.api.teamApplyList(params).then(data => {
+					this.hasfetch = true;
+					console.log('data',JSON.parse(JSON.stringify(data)));
+					// 接口返回的当前页数据列表 (数组)
+					let curPageData = data.data.rows;
+					// console.log('curPageData',JSON.parse(JSON.stringify(curPageData)));
+					// 接口返回的当前页数据长度 (如列表有26个数据,当前页返回8个,则curPageLen=8)
+					let curPageLen = curPageData.length; 
+					// 接口返回的总页数 (如列表有26个数据,每页10条,共3页; 则totalPage=3)
+					// let totalPage =  data.data.data.totalPage; 
+					// 接口返回的总数据量(如列表有26个数据,每页10条,共3页; 则totalSize=26)
+					let totalSize = data.data.total; 
+					// 接口返回的是否有下一页 (true/false)
+					// let hasNext = data.xxx; 
+					// console.log('totalPage',totalPage,'curPageLen',curPageLen);
+					//设置列表数据
+					if(page.num == 1) this.dataList = []; //如果是第一页需手动置空列表
+					this.dataList = this.dataList.concat(curPageData); //追加新数据
+					// 请求成功,隐藏加载状态
+					//方法一(推荐): 后台接口有返回列表的总页数 totalPage
+					// this.mescroll.endByPage(curPageLen, totalPage); 
+					//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
+					this.mescroll.endBySize(curPageLen, totalSize); 
+				}).catch(err => {
+					this.mescroll.endErr()
+					console.log(err)
+				});	
+			
+			},
+			/*若希望重新加载列表,只需调用此方法即可(内部会自动page.num=1,再主动触发up.callback)*/
+			reloadList() {
+				this.mescroll.resetUpScroll();
+			},
+			tabsClick(item){
+				// this.status = item.status;
+				this.tabsCurrent = item.index;
+				this.reloadList()
+				// console.log('item',item);
+			},
+			goOrderDetails(item){
+				uni.$u.route('/center/orderdetails', {
+					id: item.id
+				});
+			},
+			goApplyDetails(item){
+				uni.$u.route('/center/applydetails', {
+					id: item.id
+				});
+			},
+			toggleMore(item,index){
+				// console.log('toggleMore',item);
+				this.orderListWithClass[index].showMore = !this.orderListWithClass[index].showMore
+				this.goodsKey++;
+			},
+			clickEven(fun,item){
+				// console.log('fun',fun);
+				let funObj = {
+				  pay: this.pay,
+				  goOrderDetails:this.goOrderDetails,
+				  goApplyDetails:this.goApplyDetails,
+				  evaluate:this.evaluate,
+				  refund:this.refund,
+				  cancelOrder:this.cancelOrder,
+				  viewRefund:this.viewRefund,
+				  confirmReceipt:this.confirmReceipt,
+				  viewEvaluate:this.viewEvaluate
+				};
+				// console.log('funObj[fun]',funObj[fun]);
+				if (fun in funObj) {
+				  funObj[fun](item);
+				}
+			},
+			getTemplateIdList(){
+				this.$u.api.templateIdList({templateLabel:'order_pay'}).then(res=>{
+					console.log('getTemplateIdList',res.data);
+					this.templateIdList = res.data.list.map(item=>{
+						return item.templateId
+					});
+					// if(this.templateIdList.length>0){
+					// 	this.templateEven();
+					// }
+				}).catch(err=>{
+					console.log('getTemplateIdList',err);
+				})
+			},
+			pay(item){
+				console.log('pay',item);
+				// #ifdef H5
+				this.gotoPay(item.id);
+				// #endif
+				// #ifdef MP
+				this.setTemplate(item.id);
+				// #endif
+				// uni.$u.route('/shopping/pay', {
+				// 	orderId: item.id,
+				// 	// openid: that.vuex_wechatOpenid,
+				// 	payAmount:item.orderPrice
+				// });
+			},
+			evaluate(item){
+				// console.log('logistics',item);
+				uni.$u.route('/shopping/evaluate', {
+					id: item.id
+				});
+			},
+			comment(orderId,orderDetailId,goodsId){
+				uni.$u.route('/shopping/addcomment', {
+					orderId,
+					orderDetailId,
+					goodsId
+				});
+			},
+			viewComment(orderDetailId,goodsId,goods){
+				uni.$u.route('/shopping/viewcomment', {
+					orderDetailId,
+					goodsId,
+					goods:JSON.stringify(goods)
+				});
+			},
+			refund(item){
+				// console.log('logistics',item);
+				uni.$u.route('/shopping/refund', {
+					id: item.id
+				});
+			},
+			cancelOrder(item){
+				let that = this;
+				uni.showModal({
+				    title: '提示',
+				    content: '确认取消吗!',
+				    success: res => {
+				        if (res.confirm) {
+				            this.$u.api.cancelOrder({orderId:item.id}).then(res=>{
+				            	this.$refs.uToast.show({
+				            		message:res.msg,
+				            		complete() {
+				            			that.reloadList();
+				            		}
+				            	});
+				            	// uni.$u.toast(res.msg);
+				            	console.log('res',res.data);
+				            }).catch(err=>{
+				            	console.log('cancelOrder',err);
+				            })
+				        }
+				    }
+				});
+				// console.log('logistics',item);
+				
+			},
+			viewRefund(item){
+				uni.$u.route('/center/viewRefund', {
+					orderId: item.id
+				});
+			},
+			confirmReceipt(item){
+				let that = this;
+				uni.showModal({
+				    title: '提示',
+				    content: '确认收货吗!',
+				    success: res => {
+				        if (res.confirm) {
+				            this.$u.api.confirmReceipt({orderId:item.id}).then(res=>{
+								uni.showToast({
+									title:res.msg,
+									duration:2000,
+									complete() {
+										that.reloadList();
+									}
+								});
+				            	console.log('res',res.data);
+				            }).catch(err=>{
+				            	console.log('confirmReceipt',err);
+				            })
+				        }
+				    }
+				})
+			},
+			viewEvaluate(item){
+				uni.$u.route('/shopping/orderdetails', {
+					id: item.id
+				});
+			},
+			// 设置小程序订阅消息
+			setTemplate(orderId) {
+				let that = this;
+				console.log('templateIdList',this.templateIdList);
+				uni.requestSubscribeMessage({  
+					tmplIds: that.templateIdList,  
+					success (res) {  
+						// that.gotoPay();
+						console.log("success:",res);  
+					},  
+					fail (res) {  
+						console.log("fail:",res);  
+					},  
+					complete (res) {  
+						that.gotoPay(orderId);
+						console.log("complete:",res);  
+					}  
+				})  
+			},
+			gotoPay(orderId){
+				this.$u.api.gotoPay({orderId:orderId,openid:''}).then(res=>{
+					this.payResult = res.data.payInfo;
+					this.payResult.package = res.data.payInfo.packageValue;
+					// #ifdef H5
+					this.initConfig(this.payResult)
+					// #endif 
+					// #ifdef MP
+					this.wxPay()
+					// #endif
+					// if(this.params.paymentMode==1||this.params.paymentMode==4){
+					// 	this.wxPay()
+					// }else{
+					// 	uni.$u.route('/shopping/paysuccess');
+					// }
+					console.log('gotoPayres',res.data);
+				}).catch(err=>{
+					this.paypass = '';
+					this.checkPassShow = false;
+					console.log('gotoPay',err);
+				})				
+			},
+			wxPay(){
+				let that = this;
+				uni.requestPayment({
+					... this.payResult,
+				    "provider": "wxpay", 
+				    "orderInfo": {
+				        // "appid": "wx499********7c70e",  // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
+				        // "noncestr": "c5sEwbaNPiXAF3iv", // 随机字符串
+				        // "package": "Sign=WXPay",        // 固定值
+				        // "partnerid": "148*****52",      // 微信支付商户号
+				        // "prepayid": "wx202254********************fbe90000", // 统一下单订单号 
+				        // "timestamp": 1597935292,        // 时间戳(单位:秒)
+				        // "sign": "A842B45937F6EFF60DEC7A2EAA52D5A0" // 签名,这里用的 MD5/RSA 签名
+				    },
+				    success(res) {
+						setTimeout(()=>{
+							this.tabsCurrent = 2;
+							this.reloadList();
+						},1500)
+						// that.payQuery();
+					},
+				    fail(e) {
+						console.log('wxPayfail',e);
+					}
+				})				
+			},
+			payQuery(){
+				let that = this;
+				let retryCount = 0;
+				let maxRetryCount = 5; // 设置最大重试次数
+				let interval = 2000; // 设置间隔时间为2秒
+				let timeout = 10000; // 设置超时时间为10秒
+				let timer;
+				uni.showLoading({
+					title:'支付结果查询中'
+				})
+				timer = setInterval(() => {
+					retryCount++;
+					if (retryCount > maxRetryCount || retryCount * interval > timeout) {
+						clearInterval(timer);
+						  uni.hideLoading();
+						console.log("支付查询超时或达到最大重试次数");
+						// 在这里添加超时或达到最大重试次数的处理逻辑
+						this.reloadList()
+					} else {
+						console.log("第" + retryCount + "次查询");
+						// 调用查询支付状态的方法
+						// 如果支付状态为成功,则清除定时器并处理成功的逻辑
+						// 如果支付状态为失败,则清除定时器并处理失败的逻辑
+						this.$u.api.payQuery({orderId:this.orderId}).then(res=>{
+							// 0-未支付 1-已支付 2-支付中 3-支付失败 4-支付退款
+							let payStatus = res.data.payStatus;
+							if(payStatus===1){
+								uni.$u.route('/center/paysuccess');
+							}else if(payStatus===0||payStatus===2){
+								this.payQuery()
+							}else if(payStatus===3){
+								uni.toast('支付失败')
+							}
+							clearInterval(timer);
+						}).catch(err=>{
+							console.log('payQuery',err);
+						}).finally(()=>{
+							uni.hideLoading()
+						})
+					}
+				}, interval);
+			},
+			statisticsOrder(){
+				this.$u.api.statisticsOrder().then(res=>{
+					let data = res.data || {};
+					this.orderBadge = Object.assign(this.orderBadge,data);
+					let {noPayNum,deliverNum,collectNum,commentNum,refundNum} = res.data;
+					let noPayNumindex = this.tabsList.findIndex(item => item.status == 0);
+
+						this.tabsList[1].badge.isDot = false;
+						this.tabsList[1].badge.value = noPayNum;
+
+
+						this.tabsList[2].badge.isDot = false;
+						this.tabsList[2].badge.value = deliverNum;
+
+
+						this.tabsList[3].badge.isDot = false;
+						this.tabsList[3].badge.value = collectNum;
+
+
+						this.tabsList[4].badge.isDot = false;
+						this.tabsList[4].badge.value = commentNum;
+
+
+						this.tabsList[5].badge.isDot = false;
+						this.tabsList[5].badge.value = refundNum;
+
+					// console.log('statisticsOrder',res.data);
+					// console.log('this.orderBadge',this.orderBadge);
+					}).catch(err=>{
+					console.log('memberInfo',err.data);
+				})
+			},
+			/**
+			 * 公众号微信支付
+			 */
+			initConfig() {
+				// #ifdef H5
+				let that = this
+				wxH5.config({
+					debug: false, // 这里一般在测试阶段先用ture,等打包给后台的时候就改回false, 
+					appId: that.payResult.appId, // 必填,公众号的唯一标识 
+					timestamp: that.payResult.timeStamp, // 必填,生成签名的时间戳     
+					nonceStr: that.payResult.nonceStr, // 必填,生成签名的随机串 
+					signature: that.payResult.paySign, // 必填,签名 
+					jsApiList: ['chooseWXPay', 'checkJsApi'] // 必填,需要使用的JS接口列表 
+				})
+				wxH5.ready(() => {
+					wxH5.chooseWXPay({
+						timestamp: that.payResult.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符     
+						nonceStr: that.payResult.nonceStr, // 支付签名随机串,不长于 32 位         
+						package: that.payResult.packageValue, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)     
+						signType: 'SHA1', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'     
+						paySign: that.payResult.paySign, // 支付签名     
+						success: () => {
+							setTimeout(()=>{
+								that.tabsCurrent = 2;
+								that.reloadList();
+							},1500)
+							// that.payQuery();
+						},
+						fail: (e) => {
+							uni.$u.route('/center/order', {
+								status: 0
+							});
+							console.log('wxPayfail', e);
+						},
+						cancel: () => {
+							uni.$u.route('/center/order', {
+								status: 0
+							});
+							that.cansubmit = true;
+						}
+					})
+				})
+				// #endif
+			}
+		}
+	}
+</script>
+<style>
+page{
+	background-color: #F5F5F5;
+}
+</style>
+<style lang="scss" scoped>
+.tabs-wrap{
+	background-color: #fff;
+	margin-bottom: 10rpx;
+}
+.list-item{
+	overflow: hidden;
+	width: 48%;
+	margin-bottom: 30rpx;
+	background-color: #fff;
+	.image-wrap{
+		margin-bottom: 20rpx;
+	}
+}
+.order-item{
+	margin-bottom: 20rpx;
+	background: #FFFFFF;
+	box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(221,221,221,0.5);
+	border-radius: 20rpx;
+	padding: 32rpx;
+	content-visibility: auto;
+	contain-intrinsic-size: 346rpx;
+	.top{
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #7F7F7F;
+		line-height: 36rpx;
+		margin-bottom: 36rpx;
+	}
+	.info{
+		margin-bottom: 30rpx;
+		.img{
+			width: 180rpx;
+			height: 160rpx;
+		}
+		.text{
+			font-size: 24rpx;
+			font-weight: 400;
+			color: #7F7F7F;
+			padding-left: 26rpx;
+			flex: 1;
+			.name{
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #363636;
+				margin-bottom: 20rpx;
+			}
+			.time{
+				margin-bottom: 20rpx;
+			}
+			.position{
+				margin-bottom: 20rpx;
+			}
+			.statistics{
+				text-align: right;
+			}
+			.label{
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #363636;
+				margin-left: 10rpx;
+			}
+			.price{
+				font-size: 32rpx;
+				font-weight: bold;
+				color: #ED0000;
+			}
+		}
+	}
+	.btn-wrap{
+		
+	}
+	.btn{
+		padding: 12rpx 40rpx;
+		border: 1px solid #E5E5E5;
+		color: #7F7F7F;
+		text-align: center;
+		border-radius: 8rpx;
+		font-size: 24rpx;
+		&.red{border-color: #ED0000;color: #ED0000;}
+		&.red.solid{border-color: #ED0000;background-color:#ED0000;color: #fff;}
+		&.green{color: #00A447;border-color: #00A447;}
+		&:not(:first-child){
+			margin-left: 20rpx;
+		}
+	}
+	&.status-0{.status{color:#FF3C3F;}}
+	&.status-1{.status{color:#FF3C3F;}}
+	&.status-2{.status{color:#0099EB;}}
+	&.status-3{.status{color:#00A447;}}
+	&.status-4{.status{color:#FF3C3F;}}
+	&.status-5{.status{color:#FF3C3F;}}
+	&.status-6{.status{color:#FF3C3F;}}
+	&.status-7{.status{color:#FFB100;}}
+}
+</style>

+ 9 - 8
center/center.vue

@@ -79,7 +79,8 @@
 					// {name:'观看记录',url:'/center/viewrecord',ico:this.$commonConfig.staticUrl+'/img/center-record.png',checkauth:true},
 					// {name:'领券中心',url:'/center/mycoupon',ico:this.$commonConfig.staticUrl+'/img/center-coupon.png',checkauth:true},
 					// {name:'开具发票',url:'center/invoice',ico:this.$commonConfig.staticUrl+'/img/center-ticket.png',checkauth:true},
-					{name:'报名记录',url:'center/order',ico:this.$commonConfig.staticUrl+'/img/center-order.png',checkauth:true},
+					{name:'报名记录',url:'center/applylist',ico:this.$commonConfig.staticUrl+'/img/center-order.png',checkauth:true},
+					{name:'订单记录',url:'center/order',ico:this.$commonConfig.staticUrl+'/img/center-order.png',checkauth:true},
 					// {name:'客服热线',url:'',ico:this.$commonConfig.staticUrl+'/img/center-call.png',checkauth:true,phone:''},
 					// {name:'在线客服',chat:'1',ico:this.$commonConfig.staticUrl+'/img/center-call.png'},
 				]
@@ -118,13 +119,13 @@
 				let that = this;
 				console.log('item',item);
 				
-				if(item.name!=='在线客服'&&item.name!=='客服热线'&&item.name!=='实名认证'&&item.name!=='我的订单'){
-					uni.showToast({
-						title:'开发中',
-						icon:"none"
-					})
-					return
-				}
+				// if(item.name!=='在线客服'&&item.name!=='客服热线'&&item.name!=='实名认证'&&item.name!=='我的订单'){
+				// 	uni.showToast({
+				// 		title:'开发中',
+				// 		icon:"none"
+				// 	})
+				// 	return
+				// }
 				
 				if ('phone' in item) {
 					if(!item.phone){

+ 13 - 1
center/order.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="pages">
 		<u-navbar
-			title="我的订单"
+			title="团购订单"
 			:placeholder="true"
 			:autoBack="false"
 			 @leftClick="leftClick"
@@ -73,6 +73,18 @@
 		},
 		data() {
 			return {
+				downOption: {
+				},
+				// 上拉加载的配置(可选, 绝大部分情况无需配置)
+				upOption: {
+					// page: {
+					// 	size: 10 // 每页数据的数量,默认10
+					// },
+					// noMoreSize: 5, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					// empty: {
+					// 	tip: '暂无相关数据'
+					// }
+				},
 				staticUrl:this.$commonConfig.staticUrl,
 				goodsKey:1,
 				hasfetch:false,

+ 6 - 6
center/orderdetails.vue

@@ -2,7 +2,7 @@
 	<view class="pages">
 		<view class="" :style="{height: navHeight+'px' }"></view>
 		<view class="navbar-box">
-			<u-navbar title="订单详情" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="transparent"></u-navbar>
+			<u-navbar title="订单详情" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="#ED0000"></u-navbar>
 		</view>
 		<u-loading-page :loading="loadingPage"></u-loading-page>
 		<view class="page-wrap">
@@ -68,7 +68,7 @@
 					<text>观影人员{{index + 1}}</text>
 					<text style="width: 96rpx;">{{item.name}}</text>
 					<text>{{item.idcard|maskID}}</text>
-					<text v-if="orderDetails.status==3" @click="singleQR(item,index)" class="qrbtn">查看二维码</text>
+					<text v-if="orderDetails.status==3" @click="singleQR(item,index)" class="qrbtn" :style="{opacity:item.qrcodeStatus===0?'1':'0.5'}">查看二维码</text>
 				</view>
 			</view>
 			<view class="box order-info">
@@ -138,12 +138,12 @@
 					<view class="item">姓名:{{singleInfo.name}}</view>
 					<view class="item">身份证号码:{{singleInfo.idcard|maskID}}</view>
 					<view class="item">座位:{{singleInfo.seatName}}</view>
-					<view class="item">状态:{{singleInfo.status|filterSingleState}}</view>
+					<view class="item">状态:{{singleInfo.qrcodeStatus|filterSingleState}}</view>
 				</view>
-				<view class="singleQrcode">
+				<view class="singleQrcode" :style="{opacity:singleInfo.qrcodeStatus===0?'1':'0.3'}">
 					<ayQrcode ref="singleqrcode" :modal="singleModalQr" :url="singleQrContent" @hideQrcode="hideSingleQrcode" :height="180" :width="180" />
 				</view>
-				<view class="order-num">取票号:{{singleInfo.qrcodeNo}}</view>
+				<view class="order-num" :class="{'del-line':singleInfo.qrcodeStatus!==0}">取票号:{{singleInfo.qrcodeNo}}</view>
 			</view>
 		</u-popup>
 		<u-toast ref="uToast"></u-toast>
@@ -392,7 +392,7 @@
 			},
 			refund(item){
 				console.log('this.orderDetails',this.orderDetails);
-				uni.$u.route('/center/refund', {
+				uni.$u.route('/center/refundselect', {
 					id: this.orderDetails.id,
 					realPrice:this.orderDetails.realPrice
 				});

+ 25 - 9
center/paysuccess.vue

@@ -4,6 +4,9 @@
 			<u-icon name="checkmark" color="#fff" size="80"></u-icon>
 		</view>
 		<view class="title">{{title}}</view>
+		<view class="tip">
+			请耐心等待工作人员审核,约1-2个工作日
+		</view>
 		<view class="full-btn" @click="btnClick">查看报名记录</view>
 	</view>
 </template>
@@ -13,7 +16,7 @@
 		data() {
 			return {
 				fromPage:'',
-				title:'提交成功!请耐心等待工作人员审核,约1-2个工作日'
+				title:'提交成功!'
 			}
 		},
 		onShow() {		
@@ -26,14 +29,14 @@
 		},
 		methods: {
 			btnClick(){
-				uni.reLaunch({url: '/center/order'});
+				uni.reLaunch({url: '/center/applylist'});
 			}
 		}
 	}
 </script>
 <style>
 	page{
-		background-color: #F5F5F5;
+		background-color: #F7F7F9;
 	}
 </style>
 <style lang="scss" scoped>
@@ -51,14 +54,27 @@
 }
 .title{
 	font-size: 32rpx;
-	font-weight: 600;
-	color: #333333;
-	line-height: 40rpx;
-	margin-bottom: 120rpx;
-	padding: 40rpx 100rpx;
-	line-height: 1.5;
+	font-family: SourceHanSansCN, SourceHanSansCN;
+	font-weight: bold;
+	color: #F21F1F;
+	line-height: 48rpx;
+	margin-top: 40rpx;
+	margin-bottom: 20rpx;
+}
+.tip{
+	font-size: 24rpx;
+	font-family: SourceHanSansCN, SourceHanSansCN;
+	font-weight: 400;
+	color: #7F7F7F;
+	line-height: 36rpx;
+	margin-bottom: 148rpx;
 }
 .full-btn{
 	margin: 20rpx 10%;
+	background: linear-gradient(90deg, #FF7878 0%, #ED0000 100%);
+	font-size: 28rpx;
+	font-family: SourceHanSansCN, SourceHanSansCN;
+	font-weight: 400;
+	color: #FFFFFF;
 }
 </style>

+ 15 - 0
common/apiurl.js

@@ -188,6 +188,21 @@ const apiurl = {
 		url: '/thirdapi/identity/factorAuth',
 		type: 'post'
 	},
+	// 报名申请
+	teamApply: {
+		url: '/member/marketTeamApply/teamApply',
+		type: 'post'
+	},
+	// 申请列表
+	teamApplyList: {
+		url: '/member/marketTeamApply/pageList',
+		type: 'get'
+	},
+	// 申请详情
+	teamApplyDetails: {
+		url: '/member/marketTeamApply/selectById',
+		type: 'get'
+	},
 	
 	
 	/**

+ 6 - 0
common/config.js

@@ -17,12 +17,18 @@
 let baseUrl = null // 后端服务接口
 let upFileUrl= null // 后端上传接口
 let staticUrl= null // 静态文件地址
+let authUrl = null //微信登录
+
+let appid = 'wx6490eaa0d20d2be2';
+let redirectUri = encodeURIComponent('https://greath5.dev.gztjy.top/pages/login/login');
+
 //64
 // #ifdef MP
 	baseUrl='https://greatadmin.dev.gztjy.top/serviceapi';
 	upFileUrl='http://fileupload.hw.hongweisoft.com/upload/single/minio';
 	// staticUrl='http://res.hw.hongweisoft.com/xushuo/';
 	staticUrl='https://miniores.hw.hongweisoft.com/greattransition/staticfile';
+	authUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`;
 // #endif
 // #ifdef H5
 	baseUrl='/api/serviceapi';

+ 1 - 1
common/request.js

@@ -75,7 +75,7 @@ module.exports = (vm) => {
 			  content: '你需要登录后,才可使用此功能!',
 			  success: res => {
 			    if (res.confirm) {
-			      uni.$u.route('/pages/login/login');
+			      uni.$u.route(commonConfig.authUrl);
 			    }else{
 					uni.removeStorage({
 						key: 'backUrl',

+ 4 - 4
components/tabbar.vue

@@ -23,16 +23,16 @@
 					:src="staticUrl+'/img/tabbar-home-gray.png'"
 				></image>
 			</u-tabbar-item>
-			<u-tabbar-item text="订单" >
+			<u-tabbar-item text="报名记录" >
 				<image
 					class="u-page__item__slot-icon"
 					slot="active-icon"
-					:src="staticUrl+'/img/tabbar-order.png'"
+					:src="staticUrl+'/img/tabbar-tuan-order.png'"
 				></image>
 				<image
 					class="u-page__item__slot-icon"
 					slot="inactive-icon"
-					:src="staticUrl+'/img/tabbar-order-gray.png'"
+					:src="staticUrl+'/img/tabbar-tuan-order-y.png'"
 				></image>
 			</u-tabbar-item>
 			<u-tabbar-item text="我的" >
@@ -94,7 +94,7 @@ export default {
 			// 	navType: 'navigateTo'
 			//   }
 			// },
-			1: '/center/order',
+			1: '/center/applylist',
 			// 2: '/shopping/shoppingindex',
 			2: '/center/center'
 		  };

+ 15 - 1
pages.json

@@ -38,7 +38,7 @@
 		{
 			"path": "pages/ticketlist",
 			"style": {
-				"navigationBarTitleText": "票务购买",
+				"navigationBarTitleText": "演出信息",
 				"navigationStyle": "custom"
 			}
 		},
@@ -138,6 +138,20 @@
 						"navigationStyle": "custom"
 					}
 				},
+				{
+					"path": "applylist",
+					"style": {
+						"navigationBarTitleText": "申请列表",
+						"navigationStyle": "custom"
+					}
+				},
+				{
+					"path": "applydetails",
+					"style": {
+						"navigationBarTitleText": "申请详情",
+						"navigationStyle": "custom"
+					}
+				},
 				{
 					"path": "refund",
 					"style": {

+ 53 - 18
pages/bookticket.vue

@@ -37,7 +37,7 @@
 				<view class="" v-if="vuex_member_info.isAuth">
 					<view class="item">姓名:{{pageContent.purchaser.name}}</view>
 					<view class="item">手机号:{{pageContent.purchaser.mobile|hidePhoneNumber}}</view>
-					<view class="item">身份证:{{pageContent.purchaser.idcard|maskID}}</view>
+					<view class="item">身份证:{{pageContent.purchaser.cardId|maskID}}</view>
 				</view>
 				<view class="un-auth" v-else @click="$u.route('center/factorauth',{from:'bookticket'})">
 					请先<text style="color: #ED0000;">实名认证</text>
@@ -54,7 +54,7 @@
 					</view> -->
 					<view class="add-wrap">
 						 <u--input placeholder="请输入观影人姓名" border="surround" v-model="newVisitor.name"></u--input>
-						 <u--input placeholder="请输入观影人身份证" border="surround" v-model="newVisitor.idcard"></u--input>
+						 <u--input placeholder="请输入观影人身份证" border="surround" v-model="newVisitor.cardId"></u--input>
 					</view>
 					<view class="btn u-flex u-row-center" @click="addVisitor">
 						<u-icon name="plus-circle" color="#2D2D2D" size="32rpx"></u-icon>
@@ -72,7 +72,7 @@
 								size="32rpx"></u-icon>
 							<text style="margin-left: 8rpx;">观影人{{ index + 1 }}</text>
 							<text class="name">{{visitor.name}}</text>
-							<!-- <text class="people-id">{{ visitor.idcard | maskID }}</text> -->
+							<!-- <text class="people-id">{{ visitor.cardId | maskID }}</text> -->
 						</view>
 						<!-- <view class="right" @click="editVisitor(visitor)">编辑</view> -->
 					</view>
@@ -144,7 +144,7 @@
 				</view>
 				<view class="right">
 					<view class="btn active" v-if="totalPrice>0&&cansubmit"
-						@click="submitorder">提交报名</view>
+						@click="applyOrder">提交报名</view>
 					<view class="btn" v-else>提交报名</view>
 				</view>
 			</view>
@@ -163,6 +163,8 @@
 		mixins: [systemInfo],
 		data() {
 			return {
+				theatreId:'',
+				theatreName:'',
 				performId: '',
 				performInfo: {},
 				pageData: {}, //上个页面传过来的数据
@@ -177,7 +179,7 @@
 					performTimeStart: '',
 					purchaser: {
 						mobile: '',
-						idcard: ''
+						cardId: ''
 					},
 					ticketNotice: '',
 					viewerList: [],
@@ -196,7 +198,7 @@
 				templateIdList: [], //微信小程序订阅消息
 				newVisitor:{
 					name:'',
-					idcard:''
+					cardId:''
 				},
 
 			}
@@ -220,14 +222,17 @@
 			},
 		},
 		onShow() {
-			this.getSettlement();
+			// this.getSettlement();
 		},
 		onLoad(page) {
 			console.log('page', page);
 			this.pageData = page;
 			this.performId = page.performId;
 			this.pageData.performTimeId = page.performTimeId;
-			this.pageData.seatTypeId = page.seatTypeId
+			this.pageData.seatTypeId = page.seatTypeId;
+			this.theatreId = page.theatreId;
+			this.theatreName = page.theatreName;
+			
 			this.getSystemInfo();
 			this.getSettlement();
 
@@ -262,7 +267,7 @@
 					// console.log('getMemberAll',res.data);
 					this.visitorList = res.data.list;
 					// this.visitors = this.visitorList.filter(obj => obj.memberId==userId);
-					this.visitors = this.visitorList.filter(obj => that.selectedVisitor.includes(obj.idcard));
+					this.visitors = this.visitorList.filter(obj => that.selectedVisitor.includes(obj.cardId));
 					// console.log('this.visitorList',this.visitorList);
 					// console.log('this.selectedVisitor',this.selectedVisitor);
 					// console.log('this.visitors',this.visitors);
@@ -278,7 +283,7 @@
 					return {
 						name: item.name,
 						mobile: item.mobile,
-						idcard: item.idcard
+						cardId: item.cardId
 					}
 				});
 				// console.log('this.visitors',this.visitors);
@@ -286,7 +291,7 @@
 			delVisitor(visitor) {
 				// console.log('delVisitor',visitor);
 				// console.log('this.visitors',this.visitors);
-				this.visitors = this.visitors.filter(obj => obj.idcard != visitor.idcard);
+				this.visitors = this.visitors.filter(obj => obj.cardId != visitor.cardId);
 			},
 			addVisitor() {
 				uni.$u.route('/center/people', {
@@ -301,7 +306,7 @@
 					id: item.id,
 					name: item.name,
 					mobile: item.mobile,
-					idcard: item.idcard,
+					cardId: item.cardId,
 				});
 			},
 			getTemplateIdList() {
@@ -319,6 +324,36 @@
 					console.log('getTemplateIdList', err);
 				})
 			},
+			applyOrder(){
+				console.log('applyOrder');
+				this.cansubmit = false;
+				// console.log('this.pageContent',this.pageContent);
+				let params = {
+					theatreId:this.theatreId,
+					theatreName:this.theatreName,
+					auditoriumId:this.pageContent.auditoriumId,
+					auditoriumName:this.pageContent.auditoriumName,
+					performId:this.pageContent.performId,
+					performName:this.pageContent.performName,
+					seatTypeId:this.pageContent.seatTypeId,
+					seatTypeName:this.pageContent.seatTypeName,
+					goodsId:this.pageContent.goodsId,
+					goodsName:this.pageContent.goodsName,
+					performTimeId:this.pageContent.performTimeId,
+					price:this.pageContent.salePrice,
+					priceTotal:this.totalPrice,
+					viewerList:this.visitors,
+					
+				}
+				console.log('params',params);
+				this.$u.api.teamApply(params).then(res => {
+					uni.$u.route('/center/paysuccess')				
+				}).catch(err => {
+					this.cansubmit = true;
+					uni.$u.toast(err.msg);
+					console.log('applyOrder', err);
+				})
+			},
 			submitorder() {
 				let params = {
 					performId: this.pageContent.performId,
@@ -333,7 +368,7 @@
 					purchaser: {
 						name: this.pageContent.purchaser.name,
 						mobile: this.pageContent.purchaser.mobile,
-						idcard: this.pageContent.purchaser.idcard
+						cardId: this.pageContent.purchaser.cardId
 					},
 					viewerList: this.visitors
 				}
@@ -530,22 +565,22 @@
 					uni.$u.toast('请填写观影人姓名')
 					return
 				}
-				if(!uni.$u.test.idCard(this.newVisitor.idcard)){
+				if(!uni.$u.test.idCard(this.newVisitor.cardId)){
 					uni.$u.toast('请正确填写观影人身份证')
 					return
 				}
-				// console.log('this.newVisitor.idcard',this.newVisitor.idcard);
+				// console.log('this.newVisitor.cardId',this.newVisitor.cardId);
 				// console.log('visitors',this.visitors);
 				// 检查是否存在相同身份证号的观影人
-				if(this.visitors.some(visitor => visitor.idcard === this.newVisitor.idcard)){
+				if(this.visitors.some(visitor => visitor.cardId === this.newVisitor.cardId)){
 					uni.$u.toast('相同身份证号的观影人已存在')
 					return
 				}
 				console.log('this.newVisitor',this.newVisitor);
-				this.$u.api.authID(this.newVisitor).then(res=>{
+				this.$u.api.authID({name:this.newVisitor.name,idcard:this.newVisitor.cardId}).then(res=>{
 					if(res.data.status===1){
 						this.visitors.push(this.newVisitor);
-						this.newVisitor = {name:'',idcard:''};
+						this.newVisitor = {name:'',cardId:''};
 					}else{
 						uni.$u.toast(res.data.errReason)
 					}

+ 28 - 25
pages/index/index.vue

@@ -1,24 +1,24 @@
 <template>
 	<view class="pages">
+		<view class="search-wrap">
+			<u-search
+				placeholder="请输入关键词" 
+				:clearabled="true"
+				:showAction="true"
+				height="60rpx"
+				@search="search"
+				@custom="search"
+				@clear="reloadList"
+				bgColor="#fff"
+				borderColor="#fff"
+				v-model="params.keyword">
+			</u-search>
+		</view>
 		<view class="page-wrap">
-			<view class="search-wrap">
-				<u-search
-					placeholder="请输入关键词" 
-					:clearabled="true"
-					:showAction="true"
-					height="80rpx"
-					@search="search"
-					@custom="search"
-					@clear="reloadList"
-					bgColor="#EAEAEA"
-					borderColor="#EAEAEA"
-					v-model="params.keyword">
-				</u-search>
-			</view>
 			<view class="star-title u-flex u-row-between">
 				<view class="left u-flex">
-					<image class="icon" :src="staticUrl+'/img/title-star.png'" ></image>
-					<text class="text">演出剧目</text>
+					<!-- <image class="icon" :src="staticUrl+'/img/title-star.png'" ></image> -->
+					<text class="text">剧目</text>
 				</view>
 			</view>
 			<swiper class="swiper" :autoplay="true" style="height: 400rpx;margin-bottom: 34rpx" >
@@ -127,7 +127,7 @@
 </script>
 <style>
 page{
-background-color: #f4f4f4;
+background-color: #fff;
 }
 </style>
 <style lang="scss" scoped>
@@ -136,7 +136,7 @@ $pagegap:32rpx;
 	position: relative;
 }
 .search-wrap{
-	background-color: transparent;
+	background-color: #EF2121;
 }
 .star-title{
 	margin-bottom: 32rpx;
@@ -149,11 +149,8 @@ $pagegap:32rpx;
 		.text{
 			font-size: 32rpx;
 			font-weight: bold;
-			color: #FFFFFF;
+			color: #2D2D2D;
 			line-height: 48rpx;
-			background: linear-gradient(128deg, #FFEFBC 0%, #FFD767 100%);
-			-webkit-background-clip: text;
-			-webkit-text-fill-color: transparent;
 		}
 	}
 	.right{
@@ -165,8 +162,14 @@ $pagegap:32rpx;
 	}
 	
 }
-.programme-wrap{
-	// margin-bottom: 64rpx;
-	
+.swiper{
+	box-shadow:
+	  0px 0.6px 0.8px rgba(0, 0, 0, 0.022),
+	  0px 1.5px 2.1px rgba(0, 0, 0, 0.031),
+	  0px 3px 4.3px rgba(0, 0, 0, 0.039),
+	  0px 6.2px 8.8px rgba(0, 0, 0, 0.048),
+	  0px 17px 24px rgba(0, 0, 0, 0.07)
+	;
+	border-radius: 30rpx;
 }
 </style>

+ 18 - 3
pages/login/login.vue

@@ -86,8 +86,12 @@
 			//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
 		    this.$refs.uForm.setRules(this.rules)
 		},
-		onLoad() {
+		onLoad(e) {
 			let that = this;
+			if(e&&e.code) { // 微信第三方登录成功
+				this.code = e.code
+				this.submit(e)
+			}
 			// 测试环境填充用户名密码
 			if(process.env.NODE_ENV=='development'){
 				this.form.mobile = '13682277062';
@@ -113,12 +117,23 @@
 
 		},
 		methods: {
+			/**  公众号 微信授权登录  */
+			redirectToAuth() {
+			    window.location.href = this.$commonConfig.authUrl;
+			},
 			/**
 			 * 
 			 * 提交登录
 			 * 
 			 */
-			submit() {
+			async submit(e) {
+				let _this = this;
+				let wxinfo = null
+				let data = {}
+				wxinfo = await this.$u.api.wxinfoH5({code:this.code});
+				let { openid } = wxinfo.data;
+				this.form.h5OpenId = openid;
+				
 				this.loading = true
 				this.$refs.uForm.validate().then(res => {
 					this.$u.toast('校验通过')
@@ -177,7 +192,7 @@
 			font-size: 32rpx;
 			font-family: SourceHanSansCN, SourceHanSansCN;
 			font-weight: bold;
-			color: #FFFFFF;
+			color: #FFD788;
 		}
 	}
 

+ 6 - 2
pages/searchpage.vue

@@ -35,7 +35,7 @@
 		</view> -->
 		<mescroll-body class="" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 			<view class="page-wrap" >
-				<view class="" v-for="item in dataList" :key="item.id" @click="$u.route('/shopping/productdetails',{id:item.id})">
+				<view class="" v-for="item in dataList" :key="item.id" @click="bookticket(item)">
 					<view class="programme">
 						<image class="img" :src="item.showImg" ></image>
 						<view class="text u-flex u-row-between">
@@ -188,7 +188,11 @@
 						that.searchHistory = []
 					}
 				})
-			}
+			},
+			bookticket(item){
+				// console.log('bookticket',item);
+				uni.$u.route('pages/ticketlist',{id:item.id})
+			},
 		}
 	}
 </script>

+ 173 - 40
pages/ticketlist.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="pages">
 		<view class="navbar-box">
-			<u-navbar title="票务购买" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="transparent"></u-navbar>
+			<u-navbar title="演出信息" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="transparent"></u-navbar>
 		</view>
 		<view class="banner">
 			<!-- <image class="img" :src="staticUrl+'/img/bookticket-banner.png'" alt=""> -->
@@ -83,7 +83,7 @@
 						</view>
 					</view>
 				</view>
-				<view class="date-block auditorium">
+				<view class="date-block auditorium generic-block">
 					<view class="title">演出厅</view>
 					<view class="date-list u-flex u-flex-wrap">
 						<view class="date-item" :class="{active:auditoriumIndex==index}" @click="auditoriumClick(index)" v-for="(date,index) in auditoriumList" :key="index">
@@ -102,30 +102,45 @@
 						当前日期暂无演出场次,请重新选择
 					</view>
 				</view>
-				<view class="date-block ticket-type">
-					<view class="title">票</view>
+				<view class="date-block ticket-type generic-block">
+					<view class="title">票务信息</view>
 					<view class="empty" v-if="ticketTypeList.length<1">
 						暂无门票
 					</view>
-					<view class="type-item" :class="{active:sessionIndex==index}" v-for="(item,index) in  ticketTypeList" :key="index">
+					<view class="date-list u-flex u-flex-wrap">
+						<view class="date-item" :class="{active:ticketTypeIndex==index}" @click="ticketTypeClick(index)" v-for="(date,index) in ticketTypeList" :key="index">
+							<view class="name">{{ date.goodsName }}</view>
+						</view>
+					</view>
+					<!-- <view class="type-item" :class="{active:sessionIndex==index}" v-for="(item,index) in  ticketTypeList" :key="index">
 						<view class="name-price u-flex u-row-between">
 							<view class="name">{{item.goodsName}}</view>
 							<view class="prices">¥ {{item.salePrice}} 起</view>
 						</view>
-						<!-- <view class="ishave">
-							<text class="text">{{(item.quantity>0&&sessionList.length>=1)?'有票':'无票'}}</text>
-						</view> -->
 						<view class="bottom u-flex u-row-between">
 							<view class="left u-flex" v-html="item.goodsSnapshot||''">
-								<!-- 购票须知
-								<u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon> -->
-								<!-- {{item.goodsSnapshot||''}} -->
 							</view>
-							<view class="btn" @click="book(item)" v-if="item.quantity!==0&&sessionList.length>=1">报名</view>
+							<view class="btn" @click="book(item)" v-if="item.quantity!==0&&sessionList.length>=1">预定</view>
 							<view class="btn disabled" v-else>无票</view>
 						</view>
+					</view> -->
+				</view>
+				<view class="date-block position-select generic-block">
+					<view class="title u-flex u-row-between">
+						<view class="">类型选择</view>
+						<view v-if="positionData.seatImg" class="" style="font-size: 24rpx;color: #aaa" @click="showSeatImg">票区图</view>
+					</view>
+					<view class="empty" v-if="positionArr.length<1">
+						没有座位信息
+					</view>
+					<view class="date-list u-flex u-flex-wrap">
+						<view class="date-item" :class="{active:positionIndex==index}" @click="positionClick(index)" v-for="(date,index) in positionArr" :key="index">
+							<view class="name">{{ date.seatTypeName }} <br />¥ {{date.salePrice}}</view>
+						</view>
 					</view>
 				</view>
+				<view class="book-btn full-btn" v-if="positionArr.length>=1&&sessionList.length>=1" @click="book()">确定</view>
+				<view class="full-btn gray" v-else>确定</view>
 			</view>
 			<!-- ticket end -->
 			<view class="details" v-if="tabsIndex==1">
@@ -191,7 +206,7 @@
 						<u-icon name="close-circle" color="#fff" size="56rpx"></u-icon>
 					</view>
 					<view class="poster" id="poster" ref="poster" >
-						<u--image :showLoading="true" :src="posterSrc" width="100%" height="65vh" mode="aspectFit"></u--image>
+						<u--image :showLoading="false" :src="posterSrc" width="100%" height="65vh" mode="aspectFit"></u--image>
 					</view>
 					<!-- savePoster -->
 					<view class="poster-btn" @click="saveImage">保存图片</view>
@@ -255,21 +270,48 @@
 				formerNotice:{},//节目观影须知
 				performDateList:[],//有票的日期
 				// firstGet:0,
+				ticketTypeIndex:0,
+				positionData:{},//座位信息接口
+				positionArr:[],
+				positionIndex:0,
+				
 			}
 		},
 		onShow() {
 		},
 		onLoad(page) {
+			// console.log('ticketlist page',page);
 			parentThis = this;
-			console.log('page',page);
-			this.performId = page.id;
-			this.getPerformData();
-			// this.getSystemInfo();
-			let today = new Date();
-			this.setDate(today);
-			this.getPerformInfo();
-			this.getPerformerNotice();
-
+			
+			const scene = decodeURIComponent(page.scene);
+			scene&&uni.setStorage({
+				key:'scene',
+				data:scene
+			});
+			// console.log('scene=========',scene);
+			if(scene&&scene!='undefined'){
+				this.$u.api.uncompress({scene:scene}).then(res=>{
+					this.performId = res.data.performId;
+					this.getPerformData();
+					// this.getSystemInfo();
+					let today = new Date();
+					this.setDate(today);
+					this.getPerformInfo();
+					this.getPerformerNotice();
+					// this.label = res.data.label;
+					// console.log('uncompress',res.data);
+				}).catch(err=>{
+					console.log('uncompress',err);
+				})
+			}else{
+				this.performId = page.id;
+				this.getPerformData();
+				// this.getSystemInfo();
+				let today = new Date();
+				this.setDate(today);
+				this.getPerformInfo();
+				this.getPerformerNotice();
+			}
 		},
 		onReady() {
 			// 如果需要兼容微信小程序的话,需要用此写法
@@ -284,6 +326,15 @@
 					uni.navigateBack()
 				};
 			},
+			uncompress(scene){
+				this.$u.api.uncompress({scene:scene}).then(res=>{
+					this.performId = res.data.performId;
+					// this.label = res.data.label;
+					// console.log('uncompress',res.data);
+				}).catch(err=>{
+					console.log('uncompress',err);
+				})
+			},
 			getPerformData(){
 				this.$u.api.performSell({performId:this.performId}).then(res=>{
 					// console.log('getPerformData',res.data);
@@ -320,7 +371,7 @@
 					performId:this.performId,
 				};
 				this.$u.api.getAuditoriumDate(param).then(res=>{
-					console.log('getDate',res.data);
+					// console.log('getDate',res.data);
 					this.performDateList = res.data.list||[];
 					this.setDate();
 					// this.getTimes();
@@ -333,8 +384,8 @@
 				uni.showLoading();
 				let auditoriumId= this.auditoriumList[this.auditoriumIndex]?.id;
 				if(!auditoriumId){return}
-				console.log('this.dateList',this.dateList);
-				console.log('this.dateIndex',this.dateIndex);
+				// console.log('this.dateList',this.dateList);
+				// console.log('this.dateIndex',this.dateIndex);
 				let dateOBJ = this.dateList[this.dateIndex];
 				let param = {
 					auditoriumId:auditoriumId,//演艺厅ID(演艺厅列表)
@@ -349,13 +400,19 @@
 						item.performTimeEnd = item.performTimeEnd;
 						return item
 					});
-					uni.hideLoading();
+					this.sessionIndex = 0;
+					let session = this.sessionList[this.sessionIndex];
+					this.getPositionData();
 				}).catch(err=>{
 					console.log('getPoster',err);
 				})
 			},
 			 formatter: (day) => {
+				 if(!parentThis){
+				 	return
+				 }
 				 day.date = moment(day.date).format("YYYY-MM-DD HH:mm:ss")
+				 
 				 // console.log('day',day);
 				 // console.log('thisthisthisthisthisthisthisthisthis',parentThis);
 				 // console.log('==================================',day.date.toISOString().split('T')[0]);
@@ -372,9 +429,8 @@
 			    return day
 			  },
 			setDate(firstDay,isSelect){
-				console.log('this.performDateList',this.performDateList);
+				// console.log('this.performDateList',this.performDateList);
 				if(this.performDateList[0]?.performDate&&!isSelect){
-					console.log('111111');
 					// firstDay = new Date(this.performDateList[0].performDate);
 					const uniquePerformDateList = Array.from(new Set(this.performDateList.map(JSON.stringify))).map(JSON.parse);//去重
 					// console.log('uniquePerformDateList',uniquePerformDateList);
@@ -385,15 +441,16 @@
 						// console.log('setDate day',day);
 						return { year:day[0],month:String(day[1]),day:String(day[2]), fullDay:`${day[0]}-${String(day[1])}-${String(day[2])}`}
 					});
-					console.log('this.dateList',this.dateList);
+					// console.log('this.dateList',this.dateList);
 					this.dateIndex = 0;
 					this.getTimes();
 					// 
 					return 
 				}
-				console.log('this.dateListthis.dateListthis.dateListthis.dateList',this.dateList);
+				// console.log('this.dateListthis.dateListthis.dateListthis.dateList',this.dateList);
 				// 前端写演出日期(今天,明天,后天)
-				let today = firstDay;
+				let today = firstDay||new Date();
+				// console.log('today=========',today);
 				let tomorrow = new Date();
 				tomorrow.setDate(today.getDate() + 1);
 				let afterTomorrow = new Date();
@@ -433,7 +490,7 @@
 				this.getDate();
 			},
 			confirmCalendar(e){
-				console.log('confirmCalendar',e);
+				// console.log('confirmCalendar',e);
 				// this.getDate(e)
 				this.dateIndex = 0;
 				this.setDate( new Date(e),true );
@@ -449,7 +506,48 @@
 				this.tabsIndex = e.index;
 			},
 			sessionClick(index){
+				if(this.sessionIndex==index){
+					// console.log('不变');
+					return
+				}
 				this.sessionIndex = index;
+				let session = this.sessionList[this.sessionIndex];
+				this.getPositionData();
+				console.log('sessionClick',this.sessionList[this.sessionIndex]);
+			},
+			getPositionData(){
+				let session = this.sessionList[this.sessionIndex]||{};
+				let ticketType = this.ticketTypeList[this.ticketTypeIndex];
+				let params ={
+					performId:this.performId,
+					goodsId:ticketType.id,
+					auditoriumId:this.auditoriumList[this.auditoriumIndex].id,
+					performTimeId:session.id,
+				}
+				this.$u.api.selectRegion(params).then(res=>{
+					// console.log('getPositionData',res.data);
+					this.positionData =  res.data;
+					this.positionArr = res.data.regionPriceList||[];
+					uni.hideLoading();
+				}).catch(err=>{
+					uni.hideLoading();
+					console.log('getPositionData',err);
+				})
+			},
+			ticketTypeClick(index){
+				if(this.ticketTypeIndex==index){
+					// console.log('不变');
+					return
+				}
+				this.ticketTypeIndex = index;
+				this.getPositionData()
+			},
+			positionClick(index){
+				if(this.positionIndex==index){
+					// console.log('不变');
+					return
+				}
+				this.positionIndex = index;
 			},
 			book(item){
 				// console.log('book',item);
@@ -459,18 +557,42 @@
 				let performTimeStart = session.performTimeStart;
 				let performTimeEnd = session.performTimeEnd;
 				let dateOBJ = this.dateList[this.dateIndex];
-				uni.$u.route('pages/chosenposition',{
-					goodsId:item.id,
+				let ticketType = this.ticketTypeList[this.ticketTypeIndex];
+				let seatType = this.positionArr[this.positionIndex];
+				// console.log('ticketType',ticketType);
+				let theatre = this.theatre;
+				
+				let params ={
 					performId:this.performId,
-					performName:this.performInfo.name,
-					day:`${dateOBJ.year}-${dateOBJ.month}-${dateOBJ.day}`,
-					performTimeStart:session.performTimeStart,
-					performTimeEnd:session.performTimeEnd,
+					goodsId:ticketType.id,
+					auditoriumId:this.auditoriumList[this.auditoriumIndex].id,
 					performTimeId:session.id,
-					auditoriumId:this.auditoriumList[this.auditoriumIndex].id
-				})
+					seatTypeId:seatType.seatTypeId,
+					salePrice:seatType.salePrice,
+					theatreId:theatre.id,
+					theatreName:theatre.name
+				}
+				// console.log('book params',params);
+				uni.$u.route('pages/bookticket',params)
+				
+				
+				// 调整选择位置类型页面
+				// uni.$u.route('pages/chosenposition',{
+				// 	goodsId:item.id,
+				// 	performId:this.performId,
+				// 	performName:this.performInfo.name,
+				// 	day:`${dateOBJ.year}-${dateOBJ.month}-${dateOBJ.day}`,
+				// 	performTimeStart:session.performTimeStart,
+				// 	performTimeEnd:session.performTimeEnd,
+				// 	performTimeId:session.id,
+				// 	auditoriumId:this.auditoriumList[this.auditoriumIndex].id
+				// })
 			},
 			openShare(){
+				if(!this.performInfo.posterImg){
+					uni.$u.toast('没有节目信息');
+					return false
+				}
 				this.shareShow = true;
 				
 			},
@@ -641,6 +763,17 @@
 						console.log('fail');
 					}
 				});
+			},
+			showSeatImg(){
+				if(!this.positionData.seatImg){
+					uni.$u.toast('没有图片')
+					return
+				}
+				let urls = [];
+				urls.push(this.positionData.seatImg)
+				uni.previewImage({
+					urls: urls,
+				})
 			}
 
 		}

+ 1 - 1
static/css/common.scss

@@ -175,7 +175,7 @@ $pagegap:32rpx;
 		}
 	}
 }
-.date-block.auditorium{
+.date-block.generic-block{
 	.name{
 		margin-bottom: 0;
 		padding: 34rpx 0;

+ 7 - 0
utils/filter.js

@@ -42,6 +42,13 @@ Vue.filter("filterOrderState", function(val) {
 	return orderList[val]
 });
 
+// 申请状态
+Vue.filter("filterApplyState", function(val) {	
+	let orderList = ['待审核', '审核成功','审核失败']
+	return orderList[val]
+});
+
+
 // 个人二维码状态
 Vue.filter("filterSingleState", function(val) {	
 	let list = ['未使用', '已使用','过期']