Просмотр исходного кода

Merge branch 'dev' into 'subPackages'

Dev

See merge request quanshu/mp-ui-user!12
hunagwb 3 лет назад
Родитель
Сommit
261a48f804
5 измененных файлов с 55 добавлено и 15 удалено
  1. 5 0
      pages/choice/index.vue
  2. 37 13
      pages/order/detail.vue
  3. 2 1
      pages/order/index.vue
  4. 10 0
      pages/order/settlement.vue
  5. 1 1
      pages/ticketBox/detail.vue

+ 5 - 0
pages/choice/index.vue

@@ -188,6 +188,11 @@
 						url: '/pages/prize/index?coupon=1'
 					})
 				}
+				if (data.value == 'coupon_pkg') {
+					uni.redirectTo({
+						url: '/pages/prize/index?coupon=1'
+					})
+				}
 				if (data == 'coin') {
 					uni.switchTab({
 						url: '/pages/core/index'

+ 37 - 13
pages/order/detail.vue

@@ -38,7 +38,7 @@
 					</view>
 
 					<view class="detail-info-content-toatl">
-						<text v-if="status.value == 0 || status.value == -1">应付:</text>
+						<text v-if="status.value == 0">应付:</text>
 						<text v-else>实付:</text>
 						<text>¥{{ $numberFormat(info.payAmt) }}</text>
 					</view>
@@ -131,7 +131,7 @@
 				</view>
 			</view> -->
 		</view>
-		
+
 		<view class="footer-fixed" v-if="status.value == 2 || status.value == 3">
 			<view class="flex btn">
 				<view class="btn-right">
@@ -142,6 +142,18 @@
 				</view>
 			</view>
 		</view>
+
+		<view class="footer-fixed" v-if="status.value == 0">
+			<view class="flex btn">
+				<view class="btn-right">
+					<text class="logisticsCancel" @click="cancelOrder">取消订单</text>
+				</view>
+				<view class="btn-right">
+					<text class="confirmPay" @click="payOrder">去支付</text>
+				</view>
+			</view>
+		</view>
+
 	</view>
 </template>
 
@@ -275,15 +287,15 @@
 					data: id,
 				});
 			},
-			
+
 			// 查看物流
 			getLogistics() {
 				uni.navigateTo({
-					url:`/pages/order/logistics?id=${ this.orderId }`
+					url: `/pages/order/logistics?id=${ this.orderId }`
 					// url:`/pages/order/logistics?id=96666733329055749370`
 				});
 			},
-			
+
 			// 确认收货
 			confirmOne() {
 				let orderId = this.orderId
@@ -339,27 +351,38 @@
 					color: $uni-text-color;
 				}
 
-				.logistics {
+				@mixin btn {
 					width: 160rpx;
 					height: 60rpx;
 					line-height: 60rpx;
 					border-radius: 8rpx;
 					text-align: center;
 					margin-left: 20rpx;
+				}
+
+				.logistics {
+					@include btn
 					border: 1px solid #bbbbbb;
 					color: #414141;
 				}
 
+				.logisticsCancel {
+					@include btn
+					border: 2rpx solid $uni-bg-color;
+				}
+
 				.confirm {
-					width: 160rpx;
-					height: 60rpx;
-					line-height: 60rpx;
-					border-radius: 8rpx;
-					text-align: center;
-					margin-left: 20rpx;
-					border: 1px solid rgba(236, 112, 9, 100);
+					@include btn
+					border: 2rpx solid rgba(236, 112, 9, 100);
 					color: rgba(236, 112, 9, 100);
 				}
+
+				.confirmPay {
+					@include btn
+					background-color: $uni-bg-color;
+					border: 2rpx solid $uni-bg-color;
+					color: #FFFFFF;
+				}
 			}
 		}
 	}
@@ -579,6 +602,7 @@
 		padding: 20rpx 20rpx;
 
 		text {
+
 			display: block;
 			box-sizing: border-box;
 			margin: 0 0 0 40rpx;

+ 2 - 1
pages/order/index.vue

@@ -46,7 +46,8 @@
 							<view class="order-list-data-item__info__total">
 								<view>共{{ item.orderNum }}个商品</view>
 								<view class="money">
-									<text>实付:</text>
+									<text v-if="item.status.value == 0">应付:</text>
+									<text v-else>实付:</text>
 									<text>¥{{ $numberFormat(item.payAmt) }}</text>
 								</view>
 							</view>

+ 10 - 0
pages/order/settlement.vue

@@ -193,10 +193,20 @@
 								} else {
 									payIng = false
 									uni.$u.toast('支付失败!');
+									setTimeout(() => {
+										uni.redirectTo({
+											url: `/pages/order/index`
+										})
+									}, 500)
 								}
 							}).catch(() => {
 								payIng = false
 								uni.$u.toast('支付失败!');
+								setTimeout(() => {
+									uni.redirectTo({
+										url: `/pages/order/index`
+									})
+								}, 500)
 							})
 						} else {
 							uni.showToast({

+ 1 - 1
pages/ticketBox/detail.vue

@@ -213,7 +213,7 @@
 					})
 				}
 				//门店优惠券
-				if (item.prizeType == "coupon") {
+				if (item.prizeType == "coupon" || item.prizeType == "coupon_pkg") {
 					// if (item.couponType == "1") {
 					// 	uni.navigateTo({
 					// 		url: `/pages/prizeGoods/detail?id=426`