bobo 3 rokov pred
rodič
commit
cd74d34913

+ 9 - 7
pages/welfareMall/activityInfo/activityInfo.wxml

@@ -1,4 +1,4 @@
-<page-wrap id="#Page">
+<!-- <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">
@@ -65,12 +65,14 @@
 
     </view>
 
-    <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 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="go_buy"  style="background-color:#bdbdbd" wx:else>{{statusShowText}}</view>
-
+    
     <view class="bg-zindex" wx:if="{{hideWindowValue}}">
 
         <view class="success_window flex-column">
@@ -83,4 +85,4 @@
         </view>
       <image class="widow_del" src="/images/welfareMall/window_del.png"  bindtap="goToOrderList"></image>
     </view>
-</page-wrap>
+<!-- </page-wrap>-->

+ 1 - 2
pages/welfareMall/activityInfo/activityInfo.wxss

@@ -114,8 +114,6 @@ margin-left: 56rpx;
   background-color: #B01717;
   border-radius: 50rpx;
   text-align: center;
-  position: fixed;
-  bottom: 100rpx;
 }
 
 .bottom_button {
@@ -127,6 +125,7 @@ margin-left: 56rpx;
   display: flex;
   align-items: center;
   justify-content: center;
+  z-index: 3;
 }
 .now_buy {
   width: 316px!important;

+ 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,
     })
   }
 })

+ 23 - 31
pages/welfareMall/activityList/activityList.wxml

@@ -10,40 +10,32 @@
       <view class="t_b_i_border {{type==1?'active':''}}"></view>
     </view>
 
-    </view>
-
+  </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>
+        <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>
-</page-wrap>
+    <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无券包 ————</view>
+    <view class="no_result" wx:if="{{noMore}}">—— 人家也是有底线的 ——</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;
+}

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

@@ -76,12 +76,11 @@ 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: 50px;
@@ -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;
 }
 
 /*用来包裹所有的小圆点  */