Browse Source

Merge remote-tracking branch 'origin/jeffrey/feat/coupon-center' into jeffrey/feat/coupon-center

kk.shi 3 years ago
parent
commit
d50d575cd8

+ 24 - 0
app.js

@@ -103,5 +103,29 @@ App({
     userInfo: null,
     appCode:'HSAY_SHARE_COUPON',
     typeSwitchObj : {"C":'现金券',"D":"折扣券"}
+  },
+  showLoading() {
+    if (this._loadingLock) {
+      return
+    }
+    this._loadingLock = true
+    const page = this.getComponent("#Page")
+    if (page) {
+      page.setValue("showLoading", true)
+    }
+  },
+  hideLoading() {
+    const page = this.getComponent("#Page")
+    if (page) {
+      // setTimeout(_ => {
+      //   page.setValue("showLoading", false)
+      // }, 1000) 
+      page.setValue("showLoading", false)
+    }
+    this._loadingLock = false
+  },
+  getComponent(id) {
+    const page = getCurrentPages()[getCurrentPages().length - 1]
+    return page.selectComponent(id)
   }
 })

+ 3 - 0
app.json

@@ -28,6 +28,9 @@
     "navigationBarTitleText": "Weixin",
     "navigationBarTextStyle": "black"
   },
+  "usingComponents": {
+    "page-wrap" : "components/pageWrap/index"
+  },
   "style": "v2",
   "sitemapLocation": "sitemap.json",
   "tabBar": {

+ 23 - 0
components/loading/index.js

@@ -0,0 +1,23 @@
+// components/loading/index.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
components/loading/index.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 4 - 0
components/loading/index.wxml

@@ -0,0 +1,4 @@
+<!--components/loading/index.wxml-->
+<view class="loading">
+  <image class="aniamtion loading-image" src="../../images/loading.gif" />
+</view>

+ 39 - 0
components/loading/index.wxss

@@ -0,0 +1,39 @@
+/* components/loading/index.wxss */
+.loading {
+    width: 228rpx;
+    height: 220rpx;
+    position: fixed;
+    left: calc(100vw / 2 - 228rpx / 2);
+    top: calc(100vh / 2 - 220rpx / 2);
+    z-index: 20000;
+}
+
+.loading-image {
+    width: 100%;
+    height: 100%;
+}
+
+.aniamtion {
+    animation: mymove 2s infinite;
+    animation-direction: alternate;
+    animation-timing-function: ease-in;
+    /* //infinite属性是表示无限循环的意思,没有这个属性的话动画只执行一次。 */
+  }
+
+  @keyframes mymove {
+      0% {
+          transform: scale(1);
+      }
+      25% {
+          transform: scale(0.7);
+      }
+      50% {
+          transform: scale(0.5);
+      }
+      75% {
+          transform: scale(0.7);
+      }
+      100% {
+          transform: scale(1);
+      }
+  }

+ 27 - 0
components/pageWrap/index.js

@@ -0,0 +1,27 @@
+// components/page/index.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        showLoading: false
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        setValue(k, v) {
+            this.setData({
+                [k]: v
+            })
+        }
+    }
+})

+ 6 - 0
components/pageWrap/index.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+        "loading": "../loading/index"
+    }
+}

+ 5 - 0
components/pageWrap/index.wxml

@@ -0,0 +1,5 @@
+<!--components/page/index.wxml-->
+<view>
+<slot></slot>
+<loading wx:if="{{showLoading}}"></loading>
+</view>

+ 1 - 0
components/pageWrap/index.wxss

@@ -0,0 +1 @@
+/* components/page/index.wxss */

BIN
images/loading.gif


+ 2 - 5
pages/luckDraw/index.wxml

@@ -1,5 +1,5 @@
 <!--pages/luckDraw/index.wxml-->
-<view>
+<page-wrap id="Page">
 
    <!-- 活动列表 -->
    <view class="_list">
@@ -37,7 +37,4 @@
 
    </view>
 
-</view>
-
-<!-- 底部导航 -->
-<!-- <tab-bar /> -->
+</page-wrap>

+ 10 - 2
pages/signIn/activity/activity.js

@@ -10,6 +10,7 @@ Page({
      */
     data: {
         showPage: false,
+        showTaskCard: false,
         showSignInSuccessDlg: false,
         activity: {},
         signInNodes: [{ pos: 1, text: '星期一' }, 
@@ -20,7 +21,6 @@ Page({
                       { pos: 6, text: '星期六' }],
         lastSignInNode: { pos: 7, text: '星期天' },
         todayIsSigned: false,
-        isLogin: getMobileCache() != "",
         notUseNum: 0,
     },
 
@@ -35,6 +35,9 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
+        this.setData({
+            isLogin: getMobileCache() != "",
+        })
         this.data.dayOfWeek = this.getDayOfWeek()
         this.startLoadActivityData()
     },
@@ -81,10 +84,15 @@ Page({
                     }
                 }
             });
+            let showTaskCard = false
+            if (data.taskAwardList && data.taskAwardList.length > 0) {
+                showTaskCard = true
+            }
 
             this.setData({
                 signInNodes: this.data.signInNodes,
-                lastSignInNode: this.data.lastSignInNode
+                lastSignInNode: this.data.lastSignInNode,
+                showTaskCard,
             })
         }
     },

+ 5 - 5
pages/signIn/activity/activity.wxml

@@ -1,5 +1,5 @@
 <!--pages/signIn/index.wxml-->
-<view wx:if="{{showPage}}">
+<page-wrap id="Page" wx:if="{{showPage}}">
 
 <custom-page head-bg-image="{{activity.themePic}}" bind:sizes="handlePageSizes">
     <topbar slot="head" title="签到中心" back-color="{{mainColor}}" title-color="{{mainColor}}" />
@@ -23,14 +23,14 @@
             <view class="sign-item-box">
                 <view class="_left">
                     <view class="_item" wx:for="{{signInNodes}}" wx:key="index" >
-                        <image class="_figure" src="{{item.figure}}" mode="aspectFill" />
+                        <image class="_figure {{item.isSignIn == -1 || item.isSignIn == 1 ? '_signed': ''}}" src="{{item.figure}}" mode="aspectFill" />
                         <image wx:if="{{item.isSignIn == -1}}" class="_lose_sign_in" src="/images/signIn/losesign.png" />
                         <image wx:if="{{item.isSignIn == 1}}" class="_finish_sign_in" src="/images/signIn/finishsign.png" />
                     </view>
                 </view>
                 <view class="_right">
                     <view class="_item">
-                        <image class="_figure" src="{{lastSignInNode.figure}}" mode="aspectFill" />
+                        <image class="_figure {{lastSignInNode.isSignIn == -1 || lastSignInNode.isSignIn == 1 ? '_signed':''}}" src="{{lastSignInNode.figure}}" mode="aspectFill" />
                         <image wx:if="{{lastSignInNode.isSignIn == -1}}" class="_lose_sign_in" src="/images/signIn/losesign.png" />
                         <image wx:if="{{lastSignInNode.isSignIn == 1}}" class="_finish_sign_in" src="/images/signIn/finishsign.png" />
                     </view>
@@ -50,7 +50,7 @@
         </view>
 
         <!-- 签到任务列表 -->
-        <view class="sign-task-box">
+        <view wx:if="{{showTaskCard}}" class="sign-task-box">
             <view class="_task_title">做任务领优惠券</view>
             <view class="_task_list">
                 <!-- 签到项 -->
@@ -130,4 +130,4 @@
     </view>
 </view>
 
-</view>
+</page-wrap>

+ 3 - 0
pages/signIn/activity/activity.wxss

@@ -187,6 +187,9 @@ page {
     left: 0;
     top: 0;
 }
+._figure._signed {
+    opacity: 0.6;
+}
 
 .sign-item-box ._right ._item ._lose_sign_in {
     width: 190rpx;

+ 24 - 9
pages/welfareMall/activityInfo/activityInfo.js

@@ -15,7 +15,8 @@ Page({
      buttonText:'',
      userMobile: '', //用户手机号
      orderInfo: [], //下单信息
-     hideWindowValue:false
+     hideWindowValue:false,
+     preventDup:true
   },
 
   /**
@@ -87,13 +88,13 @@ Page({
      let res  = await WelfareMall.getActivityDetail(activityId)
 
      let statusShowText = '';
-     if(res.data.stock <=0){
-      statusShowText == '已售罄'
+     if(res.data.stock <= 0){
+      statusShowText = '已售罄'
      }
      if(res.data.status ==3){
-      statusShowText == '已结束'
+      statusShowText = '已结束'
      }
-
+     console.log(res.data.stock)
      let buttonText = res.data.isPay == 1 ? '立即抢购' : '立即领取';
      this.setData({
        detail:res.data,
@@ -134,6 +135,12 @@ Page({
    */
   async nowBuy() {
     let _self = this;
+    if(!this.data.preventDup){
+        return;
+    }
+    this.setData({
+      preventDup:false
+    })
     try {
       let res = await WelfareMall.createOrder(_self.data.userMobile, _self.data.detail.activityId,1);
       _self.setData({
@@ -143,11 +150,15 @@ Page({
         _self.goPay();
       } else {
         _self.setData({
-          hideWindowValue:true
+          hideWindowValue:true,
+          preventDup:true
         })
       }
 
     } catch (err) {
+      this.setData({
+        preventDup:true
+      })
       app.showToast(err.msg);
     }
 
@@ -156,10 +167,10 @@ Page({
    * 获取订单参数
    */
   async goPay() {
-    console.log(wx.getStorageSync('loginInfo').openId)
+    // console.log(wx.getStorageSync('loginInfo').openId)
     var _self = this;
       let result = await WelfareMall.getOrderParams(_self.data.orderInfo.orderSn,wx.getStorageSync('loginInfo').openId);
-      console.log(result);
+      // console.log(result);
       let res = result.data
       wx.requestPayment({
         timeStamp: res.wxPrePayVo.timeStamp,
@@ -170,11 +181,15 @@ Page({
         success: function (res) {
           //支付成功,跳转领取成功页面
           _self.setData({
-            hideWindowValue:true
+            hideWindowValue:true,
+            preventDup:true
           })
          
         },
         fail: function (res) {
+          _self.setData({
+            preventDup:true
+          })
           _self.goToOrderList()
         }
       })

+ 65 - 63
pages/welfareMall/activityInfo/activityInfo.wxml

@@ -1,17 +1,16 @@
+<!-- <page-wrap id="#Page"> -->
+  <image src="{{detail.fullCoverImg}}" mode="widthFix" class="top_img"></image>
+  <view class="info_all flex-row">
+    <view class="flex-row info">
+      <view class="info_left flex-column">
+        <view class="info_name over-ellipsis">{{detail.name}}</view>
 
-<image src="{{detail.fullCoverImg}}" mode="widthFix" class="top_img"></image>
-
-<view class="info_all flex-row">
-<view class="flex-row info">
-  <view class="info_left flex-column">
-    <view class="info_name over-ellipsis">{{detail.name}}</view>
-
-    <!-- <view class="info_coupon_num">3张代金券、3张折扣券</view> -->
-    <view class="info_coupon_num" wx:if="{{detail.cashCouponNum > 0 && detail.discountCouponNum > 0}}">含{{detail.cashCouponNum}}张代金券、{{detail.discountCouponNum}}张折扣券</view>
-      <view class="info_coupon_num" wx:if="{{detail.cashCouponNum ==0 && detail.discountCouponNum > 0}}">含{{detail.discountCouponNum}}张折扣券</view>
-      <view class="info_coupon_num" wx:if="{{detail.cashCouponNum > 0 && detail.discountCouponNum == 0}}">含{{detail.cashCouponNum}}张代金券</view>
-      <view class="info_coupon_num" wx:if="{{detail.cashCouponNum ==0 && detail.discountCouponNum ==0}}"></view>
-    <view class="flex-row">
+        <!-- <view class="info_coupon_num">3张代金券、3张折扣券</view> -->
+        <view class="info_coupon_num" wx:if="{{detail.cashCouponNum > 0 && detail.discountCouponNum > 0}}">含{{detail.cashCouponNum}}张代金券、{{detail.discountCouponNum}}张折扣券</view>
+          <view class="info_coupon_num" wx:if="{{detail.cashCouponNum ==0 && detail.discountCouponNum > 0}}">含{{detail.discountCouponNum}}张折扣券</view>
+          <view class="info_coupon_num" wx:if="{{detail.cashCouponNum > 0 && detail.discountCouponNum == 0}}">含{{detail.cashCouponNum}}张代金券</view>
+          <view class="info_coupon_num" wx:if="{{detail.cashCouponNum ==0 && detail.discountCouponNum ==0}}"></view>
+        <view class="flex-row">
 
       <view class="flex-row">
       <image src="/images/welfareMall/right_1.png" class="right_icon"></image>
@@ -19,68 +18,71 @@
       </view>
       <view class="flex-row">
       <image src="/images/welfareMall/right_1.png" class="right_icon"></image>
-      <view class="right_text">过期自动退</view>
+      <view class="right_text">支持退款</view>
       </view>
       <view class="flex-row">
       <image src="/images/welfareMall/right_1.png" class="right_icon"></image>
-      <view class="right_text">退款说明</view>
+      <view class="right_text">立即可用</view>
       </view>
 
-    </view>
-  </view>
-
-  <view class="info_right flex-column">
-  <view class="info_right_top" wx:if="{{detail.isPay!=0}}">{{detail.priceFormatter}}元</view>
-  <view class="info_right_top" wx:else>免费</view>
-  <view class="info_right_bottom">价值¥{{detail.showPriceFormatter}}</view>
-  </view>
-</view>
-</view>
-<view  class="bottom_title flex-column">
-<view class="flex-row bottom_title_top">
-<image src="/images/welfareMall/bag_content.png" class="bottom_icon"></image>
-<view class="bottom_tilte_text">礼包内容</view>
-</view>
-<view class="bottom_title_b" wx:if="{{detail.cashCouponNum > 0 && detail.discountCouponNum > 0}}">代金券 X {{detail.cashCouponNum}} ,折扣券 X {{detail.discountCouponNum}}</view>
-      <view class="bottom_title_b" wx:if="{{detail.cashCouponNum ==0 && detail.discountCouponNum > 0}}">折扣券 X {{detail.discountCouponNum}}</view>
-      <view class="bottom_title_b" wx:if="{{detail.cashCouponNum > 0 && detail.discountCouponNum == 0}}">代金券 X {{detail.cashCouponNum}}</view>
-      <view class="bottom_title_b" wx:if="{{detail.cashCouponNum ==0 && detail.discountCouponNum ==0}}"></view>
+        </view>
+      </view>
 
-</view>
+      <view class="info_right flex-column">
+      <view class="info_right_top" wx:if="{{detail.isPay!=0}}">{{detail.priceFormatter}}元</view>
+      <view class="info_right_top" wx:else>免费</view>
+      <view class="info_right_bottom">价值¥{{detail.showPriceFormatter}}</view>
+      </view>
+    </view>
+    </view>
+    <view  class="bottom_title flex-column">
+    <view class="flex-row bottom_title_top">
+    <image src="/images/welfareMall/bag_content.png" class="bottom_icon"></image>
+    <view class="bottom_tilte_text">礼包内容</view>
+    </view>
+    <view class="bottom_title_b" wx:if="{{detail.cashCouponNum > 0 && detail.discountCouponNum > 0}}">代金券 X {{detail.cashCouponNum}} ,折扣券 X {{detail.discountCouponNum}}</view>
+          <view class="bottom_title_b" wx:if="{{detail.cashCouponNum ==0 && detail.discountCouponNum > 0}}">折扣券 X {{detail.discountCouponNum}}</view>
+          <view class="bottom_title_b" wx:if="{{detail.cashCouponNum > 0 && detail.discountCouponNum == 0}}">代金券 X {{detail.cashCouponNum}}</view>
+          <view class="bottom_title_b" wx:if="{{detail.cashCouponNum ==0 && detail.discountCouponNum ==0}}"></view>
 
-<view  class="bottom_title flex-column">
-<view class="flex-row bottom_title_top">
-<image src="/images/welfareMall/buy_info.png" class="bottom_icon"></image>
-<view class="bottom_tilte_text">购买须知</view>
-</view>
-<rich-text class="bottom_title_b" nodes="{{detail.buyRemark}}"></rich-text>
+    </view>
 
-</view>
+    <view  class="bottom_title flex-column">
+    <view class="flex-row bottom_title_top">
+    <image src="/images/welfareMall/buy_info.png" class="bottom_icon"></image>
+    <view class="bottom_tilte_text">购买须知</view>
+    </view>
+    <rich-text class="bottom_title_b" nodes="{{detail.buyRemark}}"></rich-text>
 
-<view  class="bottom_title flex-column" style="margin-bottom: 130px;">
-<view class="flex-row bottom_title_top">
-<image src="/images/welfareMall/use_info.png" class="bottom_icon"></image>
-<view class="bottom_tilte_text">使用说明</view>
-</view>
-<rich-text class="bottom_title_b" nodes="{{detail.remark}}"></rich-text>
+    </view>
 
-</view>
+    <view  class="bottom_title flex-column" style="margin-bottom: 130px;">
+    <view class="flex-row bottom_title_top">
+    <image src="/images/welfareMall/use_info.png" class="bottom_icon"></image>
+    <view class="bottom_tilte_text">使用说明</view>
+    </view>
+    <rich-text class="bottom_title_b" nodes="{{detail.remark}}"></rich-text>
 
-<view class="bottom_button" wx:if="{{detail.status ==2 && detail.stock !=0}}">
-  <view class="now_buy" bindtap="nowBuy" wx:if="{{userMobile.length>0}}">{{buttonText}}</view>
-  <button class="now_buy_button" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:else>{{buttonText}}</button>
-</view>
-<view class="go_buy"  style="background-color:#bdbdbd" wx:else>{{statusShowText}}</view>
+    </view>
 
-<view class="bg-zindex" wx:if="{{hideWindowValue}}">
+    <view class="bottom_button" >
+      <block wx:if="{{detail.status ==2 && detail.stock !=0}}">
+        <view class="now_buy" bindtap="nowBuy" wx:if="{{userMobile.length>0}}">{{buttonText}}</view>
+        <button class="now_buy_button" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:else>{{buttonText}}</button>
+      </block>
+      <view class="go_buy"  style="background-color:#bdbdbd" wx:else>{{statusShowText}}</view>
+    </view>
+    
+    <view class="bg-zindex" wx:if="{{hideWindowValue}}">
 
-    <view class="success_window flex-column">
-    <view class="w_title">购买成功</view>
-    <view class="w_name">{{detail.name}}</view>
-    <view class="w_text">已发送至您的卡包</view>
-    <view class="w_border"></view>
-    <view class="w_go_order" bindtap="goToOrderList">去看看</view>
+        <view class="success_window flex-column">
+        <view class="w_title">购买成功</view>
+        <view class="w_name">{{detail.name}}</view>
+        <view class="w_text">已发送至您的卡包</view>
+        <view class="w_border"></view>
+        <view class="w_go_order" bindtap="goToOrderList">去看看</view>
 
+        </view>
+      <image class="widow_del" src="/images/welfareMall/window_del.png"  bindtap="goToOrderList"></image>
     </view>
-   <image class="widow_del" src="/images/welfareMall/window_del.png"  bindtap="goToOrderList"></image>
-</view>
+<!-- </page-wrap>-->

+ 30 - 29
pages/welfareMall/activityInfo/activityInfo.wxss

@@ -64,58 +64,56 @@ Page {
  
 }
 .info_right_top{
-height: 30px;
-font-size: 28px;
+height: 60rpx;
+font-size: 48rpx;
 font-weight: bold;
 color: #B01717;
-margin-top: 27px;
+margin-top: 54rpx;
 }
 .info_right_bottom{
-height: 15px;
-font-size: 12px;
+height: 30rpx;
+font-size: 24rpx;
 font-weight: 500;
 text-decoration: line-through;
 color: #B01717;
-margin-top: 8px;
+margin-top: 14rpx;
 }
 .bottom_title{
-  width: 345px;
-  margin-top: 35px;
+  width: 690rpx;
+  margin: 70rpx auto 0;
 }
 .bottom_icon{
-  width: 20px;
-  height: 20px;
+  width: 40rpx;
+  height: 40rpx;
 }
 .bottom_tilte_text{
 
-height: 20px;
-line-height: 20px;
-font-size: 18px;
+height: 40rpx;
+line-height: 40rpx;
+font-size: 36rpx;
 font-weight: bold;
 color: #444444;
-margin-left: 8px;
+margin-left: 16rpx;
 }
 .bottom_title_b{
-  margin-top: 17px;
+  margin-top: 34rpx;
 
-font-size: 14px;
+font-size: 28rpx;
 font-weight: 500;
 color: #A0A0A0;
-margin-left: 28px;
+margin-left: 56rpx;
 }
 
 .go_buy{
-  width: 316px;
-  height: 49px;
-  line-height: 49px;
-  font-size: 22px;
+  width: 632rpx;
+  height: 98rpx;
+  line-height: 98rpx;
+  font-size: 44rpx;
   font-weight: 500;
   color: #FFFFFF;
   background-color: #B01717;
-  border-radius: 25px;
+  border-radius: 50rpx;
   text-align: center;
-  position: fixed;
-  bottom: 50px;
 }
 
 .bottom_button {
@@ -127,6 +125,7 @@ margin-left: 28px;
   display: flex;
   align-items: center;
   justify-content: center;
+  z-index: 3;
 }
 .now_buy {
   width: 316px!important;
@@ -206,13 +205,15 @@ margin-top:30px;
   margin-top:24px;
 }
 .info_all{
-  width: 750rpx;
+   width: 750rpx;
    height: 286rpx;
-   margin-top: -25px;
+   margin-top: -50rpx;
    background-color: #FFFFFF;
    justify-content: center!important;
-   border-top-left-radius: 20px;
-   border-top-right-radius: 20px;
-  align-items: flex-end;
+   border-top-left-radius: 40rpx;
+   border-top-right-radius: 40rpx;
+   align-items: flex-end;
    border-top:solid 1px #E8e8e8;
+   position: relative;
+   z-index: 2
 }

+ 17 - 18
pages/welfareMall/activityList/activityList.js

@@ -63,17 +63,13 @@ Page({
    * 页面上拉触底事件的处理函数
    */
   onReachBottom: function () {
-      let page = this.data.page +1
-
+      if (this.data.nowMore) {
+        return
+      }
       this.setData({
-        page:page
+        page: this.data.page + 1
       })
-      if(this.data.init){
-        this.getActivityList()
-      }else{
-        app.showToast ('亲,到底了!');
-      }
-      
+      this.getActivityList()
   },
 
   /**
@@ -85,14 +81,18 @@ Page({
   gotoFree:function () {
     this.setData({
       type:1,
-      page:1
+      page:1,
+      noMore: false,
+      noResult: false,
     })
     this.getActivityList();
   },
   gotoPay:function () {
     this.setData({
       type:2,
-      page:1
+      page:1,
+      noMore: false,
+      noResult: false,
     })
     this.getActivityList();
   },
@@ -105,25 +105,24 @@ Page({
 
   // 1是免费,2是收费
    getActivityList: async function() {
-
     let res = await WelfareMall.getActivityList(this.data.type,this.data.page,this.data.pageSize)
-    console.log(res);
     let init = true;
     if(res.data.length==0){
       init = false;
       this.setData({
-        init:init
+        init: init,
+        noMore: this.data.page == 1 ? false: true,
+        noResult: this.data.page == 1 ? true : false
       })
-      return;
     }
 
     if(this.data.page!=1){
-      var nowResult = this.data.recruitList.concat(res.data)
+      var list = this.data.list.concat(...res.data)
     }else{
-      var nowResult = res.data
+      var list = res.data
     }
     this.setData({
-      list:nowResult
+      list,
     })
   }
 })

+ 33 - 39
pages/welfareMall/activityList/activityList.wxml

@@ -1,47 +1,41 @@
-<view class="top_banner flex-row">
+<page-wrap id="Page">
+  <view class="top_banner flex-row">
+    <view class="top_banner_item flex-column" bindtap="gotoPay">
+      <view class="t_b_i_title">特惠券包</view>
+      <view class="t_b_i_border {{type==2?'active':''}}"></view>
+    </view>
+
+    <view class="top_banner_item flex-column" bindtap="gotoFree">
+      <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="gotoPay">
-    <view class="t_b_i_title">特惠券包</view>
-    <view class="t_b_i_border {{type==2?'active':''}}"></view>
   </view>
 
-  <view class="top_banner_item flex-column" bindtap="gotoFree">
-    <view class="t_b_i_title">免费券包</view>
-    <view class="t_b_i_border {{type==1?'active':''}}"></view>
+  <view class="coupon-list">
+    <view class="coupon_item flex-row" wx:for="{{list}}" wx:key="unique"  bindtap="goCouponDetail" data-id="{{item.activityId}}">
+        <image src="{{item.coverImg}}" class="coupon_item_img"></image>
+        <view class="coupon_item_right flex-column">
+        <view class="flex-column">
+          <view class="coupon_name over-ellipsis-two">{{item.name}}</view>
+          <view class="coupon_num" wx:if="{{item.cashCouponNum > 0 && item.discountCouponNum > 0}}">含{{item.cashCouponNum}}张代金券、{{item.discountCouponNum}}张折扣券</view>
+          <view class="coupon_num" wx:if="{{item.cashCouponNum ==0 && item.discountCouponNum > 0}}">含{{item.discountCouponNum}}张折扣券</view>
+          <view class="coupon_num" wx:if="{{item.cashCouponNum > 0 && item.discountCouponNum == 0}}">含{{item.cashCouponNum}}张代金券</view>
+          <view class="coupon_num" wx:if="{{item.cashCouponNum ==0 && item.discountCouponNum ==0}}"></view>
+        
+        </view>
+          <view class="coupon_i_r_bottom flex-row">
+            <view class="coupon_price">价值 ¥{{item.formatShowPrice}}</view>
+            <view class="coupon_buy" wx:if="{{item.isPay!=0}}">{{item.formatPrice}}元抢</view>
+            <view class="coupon_buy"  wx:else>免费领取</view>
+          </view>
+        </view>
+    </view>
+    <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无券包 ————</view>
+    <view class="no_result" wx:if="{{noMore}}">—— 人家也是有底线的 ——</view>
   </view>
 
-</view>
 
 
-<view class="coupon_item flex-row" wx:for="{{list}}" wx:key="unique"  bindtap="goCouponDetail" data-id="{{item.activityId}}">
-    <image src="{{item.coverImg}}" class="coupon_item_img"></image>
-    <view class="coupon_item_right flex-column">
-    <view class="flex-column">
-      <view class="coupon_name over-ellipsis-two">{{item.name}}</view>
-      <view class="coupon_num" wx:if="{{item.cashCouponNum > 0 && item.discountCouponNum > 0}}">含{{item.cashCouponNum}}张代金券、{{item.discountCouponNum}}张折扣券</view>
-      <view class="coupon_num" wx:if="{{item.cashCouponNum ==0 && item.discountCouponNum > 0}}">含{{item.discountCouponNum}}张折扣券</view>
-      <view class="coupon_num" wx:if="{{item.cashCouponNum > 0 && item.discountCouponNum == 0}}">含{{item.cashCouponNum}}张代金券</view>
-      <view class="coupon_num" wx:if="{{item.cashCouponNum ==0 && item.discountCouponNum ==0}}"></view>
-     
-    </view>
-      <view class="coupon_i_r_bottom flex-row">
-        <view class="coupon_price">价值 ¥{{item.formatShowPrice}}</view>
-        <view class="coupon_buy" wx:if="{{item.isPay!=0}}">{{item.formatPrice}}元抢</view>
-        <view class="coupon_buy"  wx:else>免费领取</view>
-      </view>
-    </view>
-  </view>
 
-  <!-- <view class="coupon_item flex-row">
-    <image src="https://dy.shpr.top/welfareGo/index_top.png" class="coupon_item_img"></image>
-    <view class="coupon_item_right flex-column">
-    <view class="flex-column">
-      <view class="coupon_name over-ellipsis-two">圣诞优惠券包</view>
-      <view class="coupon_num">含3张代金券、3张折扣券</view>
-    </view>
-      <view class="coupon_i_r_bottom flex-row">
-        <view class="coupon_price">价值 ¥99</view>
-        <view class="coupon_buy" bindtap="goCouponDetail">99.99元抢</view>
-      </view>
-    </view>
-  </view> -->
+</page-wrap>

+ 20 - 7
pages/welfareMall/activityList/activityList.wxss

@@ -76,17 +76,30 @@ margin-top: 6px;
   justify-content: space-between!important;
 }
 .coupon_price{
-font-size: 11px;
+font-size: 22rpx;
 font-weight: 500;
 color: #B01717;
 }
 .coupon_buy{
-  width: 80px;
-height: 29px;
-line-height: 29px;
+width: 160rpx;
+height: 58rpx;
+line-height: 58rpx;
 background: #B01717;
-border-radius: 14px;
+border-radius: 28rpx;
 color: #ffffff;
 text-align: center;
-font-size: 15px;
-}
+font-size: 30rpx;
+}
+
+.no_result {
+  font-size: 24rpx;
+  color: #B1B1B1;
+  line-height: 100rpx;
+  font-weight: 1000;
+  text-align: center;
+  padding: 50rpx 0;
+}
+
+.coupon-list {
+  padding-bottom: 50rpx;
+}

+ 2 - 2
pages/welfareMall/index/index.wxml

@@ -1,4 +1,4 @@
-<view class="{{grayTheme?'page':''}}">
+<page-wrap id="Page" class="{{grayTheme?'page':''}}">
   <view class='swiper_box'>
     <swiper class="swiper" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" current="{{currentSwiper}}" bindanimationfinish="swiperChange">
       <block wx:for="{{bannerList}}" wx:key="unique">
@@ -62,4 +62,4 @@
     </view>
   </view> -->
   </view>
-</view>
+</page-wrap>

+ 20 - 21
pages/welfareMall/index/index.wxss

@@ -76,15 +76,14 @@ Page {
 
 .c_l_top_l{
   width: 120rpx;
-
-line-height: 36rpx;
-font-size: 14px;
-font-weight: 700;
-color: #010101;
-text-align: left;
+  line-height: 36rpx;
+  font-size: 28rpx;
+  font-weight: 700;
+  color: #010101;
+  text-align: left;
 }
 .c_l_top_r{
-width: 25px;
+width: 50px;
 line-height: 18px;
 font-size: 11px;
 font-weight: 400;
@@ -110,36 +109,36 @@ text-align: right;
   justify-content: space-between!important;
 }
 .coupon_name{
-font-size: 14px;
+font-size: 28rpx;
 font-weight: 700;
 color: #010101;
-line-height:15px ;
+line-height:30rpx;
 }
 .coupon_num{
-height: 11px;
-font-size: 11px;
+height: 22rpx;
+font-size: 22rpx;
 font-weight: 500;
 color: #A0A0A0;
-margin-top: 6px;
+margin-top: 12rpx;
 }
 
 .coupon_i_r_bottom{
   justify-content: space-between!important;
 }
 .coupon_price{
-font-size: 11px;
+font-size: 22rpx;
 font-weight: 500;
 color: #B01717;
 }
 .coupon_buy{
-  width: 80px;
-height: 29px;
-line-height: 29px;
-background: #B01717;
-border-radius: 14px;
-color: #ffffff;
-text-align: center;
-font-size: 15px;
+  width: 160rpx;
+  height: 58rpx;
+  line-height: 58rpx;
+  background: #B01717;
+  border-radius: 28rpx;
+  color: #ffffff;
+  text-align: center;
+  font-size: 30rpx;
 }
 
 /*用来包裹所有的小圆点  */

+ 2 - 2
pages/welfareMall/personal/personal.wxml

@@ -1,5 +1,5 @@
 <!--pages/welfareMall/personal/personal.wxml-->
-<view class="{{grayTheme?'page':''}}">
+<page-wrap id="Page" class="{{grayTheme?'page':''}}">
 <custom-page head-bg-color="#fff2f3">  
   <view slot="body" class="personal flex-column">
     <!-- 首部个人信息 -->
@@ -41,7 +41,7 @@
       </view>
   </view>
 </custom-page>  
-</view>
+</page-wrap>
 
 <!-- 使用wxs 手机号码中间四位显示为*号 -->
 <wxs module="phone">

+ 2 - 2
project.config.json

@@ -31,7 +31,7 @@
       "outputPath": ""
     },
     "enableEngineNative": false,
-    "useIsolateContext": true,
+    "useIsolateContext": false,
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
@@ -42,7 +42,7 @@
     "useCompilerPlugins": false
   },
   "compileType": "miniprogram",
-  "libVersion": "2.21.0",
+  "libVersion": "2.21.2",
   "appid": "wxcc1cdb8babd3f62c",
   "projectname": "%E9%A3%9E%E7%A0%81",
   "debugOptions": {

+ 5 - 3
utils/request.js

@@ -100,7 +100,7 @@ class request {
    */
   static requestAll(url, data, header, method, notUseLoading) {
       if (!notUseLoading) {
-        wx.showLoading()
+        getApp().showLoading()
       }
       return new Promise((resolve, reject) => {
           wx.request({
@@ -109,7 +109,6 @@ class request {
               header: header,
               method: method,
               success: (res => {
-                  wx.hideLoading()
                   if (res?.data.code === 200) {
                       //200: 服务端业务处理正常结束
                       resolve(res?.data)
@@ -134,7 +133,10 @@ class request {
                     title: '网络异常请稍后',
                   })
                   reject(res)
-              })
+              }),
+              complete: _ => {
+                getApp().hideLoading()
+              }
           })
       })
   }