소스 검색

fix(bug)修改商品列表页面文字颜色

xing.li 3 년 전
부모
커밋
fe284548e5
2개의 변경된 파일16개의 추가작업 그리고 12개의 파일을 삭제
  1. 13 9
      pages/welfareMall/activityList/activityList.js
  2. 3 3
      pages/welfareMall/activityList/activityList.wxml

+ 13 - 9
pages/welfareMall/activityList/activityList.js

@@ -12,7 +12,8 @@ Page({
       page:1,
       pageSize:10,
       list:[],
-      init:true
+      init:true,
+      config:{}
   },
 
   /**
@@ -63,9 +64,11 @@ Page({
    * 页面上拉触底事件的处理函数
    */
   onReachBottom: function () {
-      if (this.data.nowMore) {
+      console.log(this.data.noMore)
+      if (this.data.noMore) {
         return
       }
+      console.log(1231233)
       this.setData({
         page: this.data.page + 1
       })
@@ -83,7 +86,7 @@ Page({
       type:1,
       page:1,
       noMore: false,
-      noResult: false,
+     
     })
     this.getActivityList();
   },
@@ -92,7 +95,7 @@ Page({
       type:2,
       page:1,
       noMore: false,
-      noResult: false,
+    
     })
     this.getActivityList();
   },
@@ -107,22 +110,23 @@ Page({
    getActivityList: async function() {
     let res = await WelfareMall.getActivityList(this.data.type,this.data.page,this.data.pageSize)
     let init = true;
-    if(res.data.length==0){
+    if(res.data.list.length==0){
       init = false;
       this.setData({
         init: init,
         noMore: this.data.page == 1 ? false: true,
-        noResult: this.data.page == 1 ? true : false
+        
       })
     }
 
     if(this.data.page!=1){
-      var list = this.data.list.concat(...res.data)
+      var list = this.data.list.concat(...res.data.list)
     }else{
-      var list = res.data
+      var list = res.data.list
     }
     this.setData({
-      list,
+      list:list,
+      config:res.data.config
     })
   }
 })

+ 3 - 3
pages/welfareMall/activityList/activityList.wxml

@@ -25,9 +25,9 @@
         
         </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 class="coupon_price" style="color: {{config.secColor?config.secColor:'#B01717'}};">价值 ¥{{item.formatShowPrice}}</view>
+            <view class="coupon_buy" style="background-color: {{config.mainColor?config.mainColor:'#B01717'}}" wx:if="{{item.isPay!=0}}">{{item.formatPrice}}元抢</view>
+            <view class="coupon_buy"  style="background-color: {{config.mainColor?config.mainColor:'#B01717'}}" wx:else>免费领取</view>
           </view>
         </view>
     </view>