Browse Source

修改差不多了,准备做H5分支

gcz 1 year ago
parent
commit
8e41c81fd5
7 changed files with 69 additions and 11 deletions
  1. 44 5
      center/orderdetails.vue
  2. 2 1
      center/refund.vue
  3. 6 0
      pages/bookticket.vue
  4. 4 3
      pages/index/index.vue
  5. 2 1
      pages/news.vue
  6. 1 1
      pages/newsdetails.vue
  7. 10 0
      utils/filter.js

+ 44 - 5
center/orderdetails.vue

@@ -17,6 +17,9 @@
 				<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>
@@ -44,7 +47,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="box qr-wrap" v-if="orderDetails.status==3">
+			<view class="box qr-wrap" v-if="orderDetails.parentQrcodeStatus==0">
 				<view class="title">二维码</view>
 				<view class="qr-content">
 					<view class="img-wrap">
@@ -52,7 +55,7 @@
 						<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>
+						<!-- <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 -->
@@ -63,7 +66,7 @@
 				<view class="title">观影人员</view>
 				<view class="item u-flex u-row-around" v-for="(item,index) in orderDetails.viewersList" :key="index">
 					<text>观影人员{{index + 1}}</text>
-					<text>{{item.name}}</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>
 				</view>
@@ -83,6 +86,40 @@
 					</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">
 				<view class="title">观影须知</view>
 				<u-parse :content="formerNotice"></u-parse>
@@ -161,6 +198,7 @@
 				formerNotice:'',
 				countdownTimer:null,//订单倒计时
 				templateIdList:[],//微信小程序订阅消息
+				refundInfo:{status:null},//退款信息
 				
 			}
 		},
@@ -253,13 +291,14 @@
 			getOrderDetails(id){
 				this.$u.api.orderDetails({id:id}).then(res=>{
 					this.loadingPage = false;
-					this.orderDetails = res.data
+					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.status==3){
+					if(res.data.parentQrcodeStatus==0){
 						this.qrContent = {};
 						this.qrContent.qrcode = res.data.parentQrcodeNo;
 						this.qrContent.time = Date.now();

+ 2 - 1
center/refund.vue

@@ -45,7 +45,8 @@
 				reasonList:[
 					[
 						'选错场次',
-						'不想看了',
+						'计划有变',
+						'其他'
 					]
 				],
 				params:{

+ 6 - 0
pages/bookticket.vue

@@ -324,6 +324,12 @@
 					
 				}).catch(err=>{
 					this.cansubmit = true;
+					uni.$u.toast(err.msg);
+					if(err.msg.includes('场次限购限购')){
+						setTimeout(()=>{
+							uni.$u.route('/center/order',{status:0});
+						},2000)
+					}
 					console.log('submitOrder',err);
 				})
 			},

+ 4 - 3
pages/index/index.vue

@@ -63,9 +63,9 @@
 				<u-scroll-list :indicator="false">
 					<view class="item" v-for="(item, index) in newsList" @click="newsClick(item)" :key="index">
 						<image class="img" :src="item.mainImg"></image>
-						<view class="text">
-							<view class="name u-line-1">{{item.title}}</view>
-							<view class="con u-line-1" v-html="item.centent"></view>
+						<view class="text" style="padding-bottom: 10px;">
+							<view class="name u-line-2">{{item.title}}</view>
+							<!-- <view class="con u-line-1" v-html="item.centent"></view> -->
 							<view class="time u-flex u-row-between">
 								<view class="left">{{$u.timeFormat(item.onlineTime, 'yyyy-mm-dd')}}</view>
 								<image class="icon" :src="staticUrl+'/img/arrow-right-ico.png'" ></image>
@@ -289,6 +289,7 @@
 				});
 			},
 			bannerClick(e){
+				return false
 				let item = this.bannerList[e];
 				// console.log('bannerClick',this.bannerList[e]);
 				uni.$u.route('/pages/newsdetails', {

+ 2 - 1
pages/news.vue

@@ -126,7 +126,8 @@
 				let params = {
 					pageNum : page.num,
 					pageSize :  page.size,
-					title:this.params.keyword
+					title:this.params.keyword,
+					status:1
 				}
 				// console.log('this.params',params);
 				this.$u.api.newsList(params).then(data => {

+ 1 - 1
pages/newsdetails.vue

@@ -102,7 +102,7 @@
 		font-size: 32rpx;
 		font-weight: bold;
 		color: #333333;
-		line-height: 22rpx;
+		// line-height: 22rpx;
 		margin-bottom: 30rpx;
 	}
 	.time{

+ 10 - 0
utils/filter.js

@@ -48,6 +48,16 @@ Vue.filter("filterSingleState", function(val) {
 	return list[val]
 });
 
+// 退款状态
+Vue.filter("filterRefundState", function(val) {	
+	console.log('filterRefundState',val);
+	if(!val){
+		return false
+	}
+	let list = ['申请中', '退款成功','退款失败', '退款中']
+	return list[val]
+});
+
 // 支付状态
 Vue.filter("filterPayState", function(val) {	
 	let orderList = ['未支付', '已支付','支付中', '支付失败', '支付退款']