Browse Source

添加次卡规则

yuhao 1 year ago
parent
commit
a9d21def8b

BIN
images/icon_up.png


+ 9 - 0
subPackages/pages/cardBag/cardBag.js

@@ -18,6 +18,8 @@ Page({
18
     storeId: wx.getStorageSync('store_id'),
18
     storeId: wx.getStorageSync('store_id'),
19
     couponType: ['抵扣券', '满减券', '全额减免', '卡券'], //卡券类型 优惠券类型,1直接抵扣券,2满减券,3全额减免券,4卡券
19
     couponType: ['抵扣券', '满减券', '全额减免', '卡券'], //卡券类型 优惠券类型,1直接抵扣券,2满减券,3全额减免券,4卡券
20
     couponList: [], //优惠券列表
20
     couponList: [], //优惠券列表
21
+    isExplain:false,//详情开关
22
+    explainIndex:0,
21
   },
23
   },
22
 
24
 
23
   /**
25
   /**
@@ -201,6 +203,13 @@ Page({
201
       url: '/pages/shoppingMall/shoppingMall',
203
       url: '/pages/shoppingMall/shoppingMall',
202
     })
204
     })
203
   },
205
   },
206
+    // 打开次卡说明
207
+    openExplain(e){
208
+      this.setData({
209
+        isExplain:!this.data.isExplain,
210
+        explainIndex:e.currentTarget.dataset.index
211
+      })
212
+    },
204
   /**
213
   /**
205
    * 生命周期函数--监听页面初次渲染完成
214
    * 生命周期函数--监听页面初次渲染完成
206
    */
215
    */

+ 22 - 0
subPackages/pages/cardBag/cardBag.wxml

@@ -12,6 +12,7 @@
12
 <scroll-view wx:if="{{current==1}}" class="scroll" scroll-y bindscrolltolower="toLower" enable-flex="true">
12
 <scroll-view wx:if="{{current==1}}" class="scroll" scroll-y bindscrolltolower="toLower" enable-flex="true">
13
     <view class="content">
13
     <view class="content">
14
       <view class="conItem" wx:for="{{list}}" data-status = '{{item.status}}' data-id="{{item.id}}" wx:key="index" bindtap="jumpCard" >
14
       <view class="conItem" wx:for="{{list}}" data-status = '{{item.status}}' data-id="{{item.id}}" wx:key="index" bindtap="jumpCard" >
15
+      <view class="conItemTop">
15
         <view class="leftLine {{item.status!=1?'leftLineDe':''}}"></view>
16
         <view class="leftLine {{item.status!=1?'leftLineDe':''}}"></view>
16
         <view class="right">
17
         <view class="right">
17
           <view class="titleFrequency">
18
           <view class="titleFrequency">
@@ -31,12 +32,23 @@
31
             <view class="toUse finish" wx:if="{{item.status==0}}">已使用</view>
32
             <view class="toUse finish" wx:if="{{item.status==0}}">已使用</view>
32
             <view class="toUse finish" wx:if="{{item.status==-1}}">已过期</view>
33
             <view class="toUse finish" wx:if="{{item.status==-1}}">已过期</view>
33
             <view class="toUse finish" wx:if="{{item.status==-2}}">已注销</view>
34
             <view class="toUse finish" wx:if="{{item.status==-2}}">已注销</view>
35
+            <view class="explainIcon" data-index="{{index}}" catchtap="openExplain">
36
+                <image wx:if='{{isExplain&&explainIndex==index}}' src="../../../images/icon_up.png"></image>
37
+                <image wx:else src="../../../images/icon_arrow_gray.png"></image>
38
+              </view>
34
           </view>
39
           </view>
35
         </view>
40
         </view>
36
         <view class="cardBg">
41
         <view class="cardBg">
37
           <image src="{{item.status!=1?'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/de_icon.png':'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/cardBg.png'}}"></image>
42
           <image src="{{item.status!=1?'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/de_icon.png':'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/cardBg.png'}}"></image>
38
         </view>
43
         </view>
39
       </view>
44
       </view>
45
+      <view class="explain" wx:if="{{isExplain&&explainIndex==index}}">
46
+        <view>使用说明:</view>
47
+        <view>1、请注意,此次卡或优惠券仅在规定的有效期限内有效。过期后将无法使用,请确保在有效期内充分利用。</view>
48
+        <view>2、此次卡或优惠券一经使用,将不退款、不找零、不兑换现金。并在使用前确认您的需求。</view>
49
+        <view>3、每位顾客仅限本人使用,以确保公平使用,请遵循相关规定。</view>
50
+      </view>
51
+      </view>
40
       <view class="loading" hidden="{{!loadMore}}">正在载入更多...</view>
52
       <view class="loading" hidden="{{!loadMore}}">正在载入更多...</view>
41
       <view class="loading" hidden="{{!loadAll}}">已加载全部</view>
53
       <view class="loading" hidden="{{!loadAll}}">已加载全部</view>
42
       <view class="no-data" style="display: {{list.length == 0 ? 'block' : 'none'}};">暂无数据~</view>
54
       <view class="no-data" style="display: {{list.length == 0 ? 'block' : 'none'}};">暂无数据~</view>
@@ -78,7 +90,17 @@
78
     <view class="coupon-redio" wx:if="{{item.status==2}}">
90
     <view class="coupon-redio" wx:if="{{item.status==2}}">
79
     已过期
91
     已过期
80
     </view>
92
     </view>
93
+    <view class="explainIcon" data-index="{{index}}" catchtap="openExplain">
94
+          <image wx:if='{{isExplain&&explainIndex==index}}' src="../../../images/icon_up.png"></image>
95
+          <image wx:else src="../../../images/icon_arrow_gray.png"></image>
96
+        </view>
81
     </view>
97
     </view>
82
   </view>
98
   </view>
83
   </view>
99
   </view>
100
+  <view class="explain" wx:if="{{isExplain&&explainIndex==index}}">
101
+    <view>使用说明:</view>
102
+    <view>1、请注意,此次卡或优惠券仅在规定的有效期限内有效。过期后将无法使用,请确保在有效期内充分利用。</view>
103
+    <view>2、此次卡或优惠券一经使用,将不退款、不找零、不兑换现金。并在使用前确认您的需求。</view>
104
+    <view>3、每位顾客仅限本人使用,以确保公平使用,请遵循相关规定。</view>
105
+  </view>
84
 </view>
106
 </view>

+ 28 - 4
subPackages/pages/cardBag/cardBag.wxss

@@ -64,16 +64,30 @@
64
 }
64
 }
65
 
65
 
66
 .conItem{
66
 .conItem{
67
+  margin: 40rpx 30rpx;
68
+}
69
+.conItem .conItemTop{
70
+  display: flex;
71
+  flex-direction: row;
67
   background-color: #FFF;
72
   background-color: #FFF;
68
   border-radius: 16rpx;
73
   border-radius: 16rpx;
69
   width: 690rpx;
74
   width: 690rpx;
70
   height: 154rpx;
75
   height: 154rpx;
71
-  flex-direction: row;
72
-  display: flex;
73
-  margin: 40rpx 30rpx;
74
   position: relative;
76
   position: relative;
75
 }
77
 }
76
-
78
+.explain{
79
+  margin: 0 auto;
80
+  margin-top: 10rpx;
81
+  background-color: #FFF;
82
+  border-radius: 16rpx;
83
+  width: 690rpx;
84
+  padding: 20rpx;
85
+  font-size: 20rpx;
86
+  box-sizing:border-box
87
+}
88
+.explain view{
89
+  margin-bottom: 10rpx;
90
+}
77
 .leftLine{
91
 .leftLine{
78
   background-color: #FA7D22;
92
   background-color: #FA7D22;
79
   border-radius: 16rpx 0rpx 0rpx 16rpx;
93
   border-radius: 16rpx 0rpx 0rpx 16rpx;
@@ -256,6 +270,7 @@
256
 
270
 
257
 .coupon-right {
271
 .coupon-right {
258
   flex: 1;
272
   flex: 1;
273
+  width: 400rpx;
259
   height: 100%;
274
   height: 100%;
260
   padding-left: 30rpx;
275
   padding-left: 30rpx;
261
 }
276
 }
@@ -362,4 +377,13 @@
362
   width: 99rpx;
377
   width: 99rpx;
363
   height: 38rpx;
378
   height: 38rpx;
364
   border-radius: 12px 0px 12px 0px;
379
   border-radius: 12px 0px 12px 0px;
380
+}
381
+.explainIcon{
382
+  z-index: 999;
383
+}
384
+.explainIcon image{
385
+  width: 54rpx;
386
+  height: 44rpx;
387
+  margin-left: 20rpx;
388
+  margin-top: 8rpx;
365
 }
389
 }