lilei преди 2 години
родител
ревизия
a5505e9d71
променени са 4 файла, в които са добавени 32 реда и са изтрити 9 реда
  1. 2 0
      pages/index/index.vue
  2. 24 3
      pages/queryByCode/confirmQh.vue
  3. 2 2
      pagesA/digitalShelf/choosePart.vue
  4. 4 4
      pagesA/digitalShelf/choosePartResult.vue

+ 2 - 0
pages/index/index.vue

@@ -207,6 +207,8 @@
 				this.getLookUpList('PRICE_SHOW_TYPE', 'vuex_priceTypeList');
 				// 初始化页面
 				this.pageInit()
+				// 查询红包活动
+				this.getRedPacketRule()
 			})
 			// 刷新首页数据
 			uni.$on("refashHome",()=>{

+ 24 - 3
pages/queryByCode/confirmQh.vue

@@ -30,6 +30,17 @@
 			 	确认拿货
 			 </u-button>
 		 </view>
+		 <!-- 红包 -->
+		 <u-mask :show="showMask">
+		 	<view class="imageWarp flex flex_column justify_center align_center" style="width:100%;height:100vh;">
+		 		<view style="position: relative;">
+		 			<u-image src="/pagesA/static/hb.png" width="700" height="657" @click="toDetail"></u-image>
+		 			<view style="font-size: 60rpx;color:#fff;position: absolute;top:50%;text-align: center;width: 100%;">
+		 				{{tempData&&tempData.totalRewardAmount||'0.00'}} <text style="font-size: 26rpx;margin-left: 10rpx;">元</text>
+		 			</view>
+		 		</view>
+		 	</view>
+		 </u-mask>
 	</view>
 </template>
 
@@ -40,7 +51,9 @@
 			return {
 				 loading:false,
 				 nowData: null,
-				 qty: 1
+				 qty: 1,
+				 showMask: false,
+				 tempData: null
 			}
 		},
 		onLoad(options) {
@@ -77,6 +90,14 @@
 					url: "/pagesA/digitalShelf/orderDetail?shelfOrderSn="+data.shelfOrderSn
 				})
 			},
+			showRedModal(data){
+				if(data.totalRewardAmount){
+					this.tempData = data
+					this.showMask = true
+				}else{
+				    this.toDetail(data)
+				}
+			},
 			// 确认拿货
 			 outShelfOrder(){
 				 const _this = this
@@ -97,7 +118,7 @@
 							 	showCancel: false,
 								success(ret) {
 									if(ret.confirm){
-										_this.toDetail(res.data)
+										_this.showRedModal(res.data)
 									}
 								}
 							 })
@@ -107,7 +128,7 @@
 								title: res.message,
 								duration: 4000
 							 })
-							 _this.toDetail(res.data)
+							 _this.showRedModal(res.data)
 						 }
 					 }else{
 						 uni.showModal({

+ 2 - 2
pagesA/digitalShelf/choosePart.vue

@@ -617,8 +617,8 @@
 						if(res.status == 200){
 							this.tempData = res.data
 							// 有红包活动
-							if(this.hasRedPacket&&res.data.shelfOrder){
-								this.showMask = !!res.data.shelfOrder.totalRewardAmount
+							if(res.data.shelfOrder && res.data.shelfOrder.totalRewardAmount){
+								this.showMask = true
 							}else{
 								this.toSuccess()
 							}

+ 4 - 4
pagesA/digitalShelf/choosePartResult.vue

@@ -261,7 +261,7 @@
 				}
 				.status-row{
 					font-size: 42upx;
-					margin-top: 10rpx;
+					margin-top: 20rpx;
 					text{
 						margin-left: 10rpx;
 					}
@@ -269,11 +269,11 @@
 				.messageText{
 					font-size: 30upx;
 					text-align: center;
-					color: #f1dfac;
+					color: #ebef09;
 					text{
-						color: #ffaa00;
+						color: #ff9900;
 					}
-					padding: 20rpx 0 10rpx;
+					padding: 10rpx 0 10rpx;
 				}
 				.button-group{
 					padding: 20rpx 0;