ソースを参照

feat(福利go) 修改卡券列表

xing.li 3 年 前
コミット
10e1db8690

+ 1 - 1
components/couponWrap/index.wxss

@@ -2,7 +2,7 @@
 
 .coupon-list {
     display: block;
-    padding-top: 10rpx;
+    padding-top: 130rpx;
 }
 
 .coupon-item {

+ 14 - 3
pages/welfareMall/coupon/coupon.js

@@ -12,9 +12,8 @@ Page({
     lock: false,
     noResult: false,
     noMore: false,
-    mobileTop: 'TONY WU',
+    type:0,
     couponList: []
-
   },
 
   /**
@@ -77,12 +76,24 @@ Page({
   onShareAppMessage: function () {
 
   },
-  // 券包数据
+  showCoupon:function(e){
+    console.log(e)
+    this.setData({
+      type:parseInt(e.currentTarget.dataset.type),
+      couponList:[],
+      noResult:false,
+      noMore:false,
+      page:1
+    })
+    this.getCouponList()
+  },
+  // 券包数据 0 待使用  1 已使用  2 已过期 
   getCouponList: async function() {
     let res = await WelfareMall.getUserCouponSnList({
       page: this.data.page,
       pageSize: this.data.pageSize,
       mobile: getMobileCache(),
+      stateList:[this.data.type]
     }).then(res => {
       if (res.code == 200) {
         this.userCouponListView(res.data)

+ 16 - 1
pages/welfareMall/coupon/coupon.wxml

@@ -1,6 +1,21 @@
 <!--pages/welfareMall/coupon/coupon.wxml-->
     <!-- 内容 -->
     <page-wrap id="Page">
+
+    <view class="flex-row top_banner">
+      <view class="top_banner_item flex-column" bindtap="showCoupon" data-type="0">
+        <view class="t_b_i_title">待使用</view>
+        <view class="t_b_i_border {{type==0?'active':''}}"></view>
+      </view>
+      <view class="top_banner_item flex-column" bindtap="showCoupon" data-type="1">
+        <view class="t_b_i_title">已使用</view>
+        <view class="t_b_i_border {{type==1?'active':''}}"></view>
+      </view>
+      <view class="top_banner_item flex-column" bindtap="showCoupon" data-type="2">
+        <view class="t_b_i_title">已过期</view>
+        <view class="t_b_i_border {{type==2?'active':''}}"></view>
+      </view>
+    </view>
       <view class="coupon-wrap-list">
         <coupon-wrap wx:if="{{couponList.length>0}}" 
         coupon-list="{{couponList}}" 
@@ -9,6 +24,6 @@
         coupon-circule-ex-class="coupon-circule-style"
         />
       </view>
-      <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂可用优惠券 ————</view>
+      <view class="no_result" wx:if="{{noResult}}">———— 抱歉,暂无数据 ————</view>
       <view class="no_result" wx:if="{{noMore}}">—— 人家也是有底线的 ——</view>
     </page-wrap>

+ 31 - 1
pages/welfareMall/coupon/coupon.wxss

@@ -5,7 +5,7 @@ page{
   justify-content: left;
   align-items: center;
   box-sizing: border-box;
-  padding-top: 13px;
+  /* padding-top: 13px; */
   background: #F7F7F7;
 }
 
@@ -31,4 +31,34 @@ page{
   line-height: 100rpx;
   font-weight: 1000;
   text-align: center;
+  margin-top: 100rpx;
+}
+.top_banner{
+  width: 750rpx;
+  height: 100rpx;
+  background: #FFFFFF;
+  justify-content: space-around!important;
+  align-items: flex-end!important;
+  position: fixed;
+  z-index: 9999;
+}
+.top_banner_item{
+  width: 60px;
+  font-size: 14px;
+  font-weight: 700;
+  text-align: center;
+  color: #000000;
+  justify-content: end!important;
+  align-items: center!important;
+  margin-bottom: 8px;
+}
+
+.t_b_i_border{
+  width: 45px;
+  height: 2px;
+  margin-top: 5px;
+}
+.active{
+  background: #B01717;
+  border-radius: 1px;
 }

+ 7 - 1
project.config.json

@@ -1,7 +1,13 @@
 {
   "description": "项目配置文件",
   "packOptions": {
-    "ignore": []
+    "ignore": [
+      {
+        "type": "folder",
+        "value": "/minitest"
+      }
+    ],
+    "include": []
   },
   "setting": {
     "urlCheck": false,

+ 7 - 0
project.private.config.json

@@ -227,6 +227,13 @@
           "pathName": "pages/welfareMall/activityInfo/activityInfo",
           "query": "activityId=GzYqbLGmj3-125&channel=1111",
           "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/welfareMall/coupon/coupon",
+          "query": "",
+          "scene": null,
+          "launchMode": "default"
         }
       ]
     }