浏览代码

色值修改

kk.shi 3 年之前
父节点
当前提交
c934fcb022

+ 6 - 1
pages/welfareMall/activityInfo/activityInfo.js

@@ -16,13 +16,18 @@ Page({
      userMobile: '', //用户手机号
      userMobile: '', //用户手机号
      orderInfo: [], //下单信息
      orderInfo: [], //下单信息
      hideWindowValue:false,
      hideWindowValue:false,
-     preventDup:true
+     preventDup:true,
+     config: {},
   },
   },
 
 
   /**
   /**
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad: async function (options) {
   onLoad: async function (options) {
+    let res =  await WelfareMall.getIndexList();
+    this.setData({
+      config:res.data.config
+    })
     let  userMobile = await Activity.getMobileCache();
     let  userMobile = await Activity.getMobileCache();
     if (userMobile.length !== 0) {
     if (userMobile.length !== 0) {
       this.setData({
       this.setData({

+ 4 - 4
pages/welfareMall/activityInfo/activityInfo.wxml

@@ -29,9 +29,9 @@
       </view>
       </view>
 
 
       <view class="info_right flex-column">
       <view class="info_right flex-column">
-      <view class="info_right_top" style="color: {{config.mainColor?config.mainColor:'#B01717'}};" wx:if="{{detail.isPay!=0}}">{{detail.priceFormatter}}元</view>
-      <view class="info_right_top" style="color: {{config.mainColor?config.mainColor:'#B01717'}};" wx:else>免费</view>
-      <view class="info_right_bottom" style="color: {{config.mainColor?config.mainColor:'#B01717'}};">价值¥{{detail.showPriceFormatter}}</view>
+      <view class="info_right_top" style="color: {{config.setColor?config.setColor:'#B01717'}};" wx:if="{{detail.isPay!=0}}">{{detail.priceFormatter}}元</view>
+      <view class="info_right_top" style="color: {{config.setColor?config.setColor:'#B01717'}};" wx:else>免费</view>
+      <view class="info_right_bottom" style="color: {{config.setColor?config.setColor:'#B01717'}};">价值¥{{detail.showPriceFormatter}}</view>
       </view>
       </view>
     </view>
     </view>
     </view>
     </view>
@@ -65,7 +65,7 @@
 
 
     <view class="bottom_button" >
     <view class="bottom_button" >
       <block wx:if="{{detail.status ==2 && detail.stock !=0}}">
       <block wx:if="{{detail.status ==2 && detail.stock !=0}}">
-        <view class="now_buy" style="background-color: {{config.secColor?config.secColor:'#B01717'}};" bindtap="nowBuy" wx:if="{{userMobile.length>0}}">{{buttonText}}</view>
+        <view class="now_buy" style="background-color: {{config.mainColor?config.mainColor:'#B01717'}};" bindtap="nowBuy" wx:if="{{userMobile.length>0}}">{{buttonText}}</view>
         <button class="now_buy_button" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:else>{{buttonText}}</button>
         <button class="now_buy_button" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:else>{{buttonText}}</button>
       </block>
       </block>
       <view class="go_buy"  style="background-color:#bdbdbd" wx:else>{{statusShowText}}</view>
       <view class="go_buy"  style="background-color:#bdbdbd" wx:else>{{statusShowText}}</view>

+ 4 - 2
pages/welfareMall/index/index.js

@@ -19,7 +19,8 @@ Page({
       duration: 500,
       duration: 500,
       currentSwiper:0,
       currentSwiper:0,
       // indicatorDots:true,
       // indicatorDots:true,
-      grayTheme:false
+      grayTheme:false,
+      config: {},
   },
   },
 
 
   /**
   /**
@@ -136,7 +137,8 @@ Page({
       bannerList:res.data.bannerList,
       bannerList:res.data.bannerList,
       navigationList:res.data.navigationList,
       navigationList:res.data.navigationList,
       adList:res.data.adList,
       adList:res.data.adList,
-      grayTheme:res.data.config.grayTheme
+      grayTheme:res.data.config.grayTheme,
+      config:res.data.config
     })
     })
 
 
     this.setThrem(res.data.config.grayTheme)
     this.setThrem(res.data.config.grayTheme)

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

@@ -41,9 +41,9 @@
           <view class="coupon_num" wx:if="{{item.cashCouponNum ==0 && item.discountCouponNum ==0}}"></view>
           <view class="coupon_num" wx:if="{{item.cashCouponNum ==0 && item.discountCouponNum ==0}}"></view>
         </view>
         </view>
         <view class="coupon_i_r_bottom flex-row">
         <view class="coupon_i_r_bottom flex-row">
-          <view class="coupon_price" style="color: {{config.mainColor?config.mainColor:'#B01717'}};">价值 ¥{{item.formatShowPrice}}</view>
-          <view class="coupon_buy" style="background: {{config.secColor?config.secColor:'#B01717'}};" wx:if="{{item.isPay!=0}}">{{item.formatPrice}}元抢</view>
-          <view class="coupon_buy" style="background: {{config.secColor?config.secColor:'#B01717'}};" wx:else>免费领取</view>
+          <view class="coupon_price" style="color: {{config.setColor?config.setColor:'#B01717'}};">价值 ¥{{item.formatShowPrice}}</view>
+          <view class="coupon_buy" style="background: {{config.mainColor?config.mainColor:'#B01717'}};" wx:if="{{item.isPay!=0}}">{{item.formatPrice}}元抢</view>
+          <view class="coupon_buy" style="background: {{config.mainColor?config.mainColor:'#B01717'}};" wx:else>免费领取</view>
         </view>
         </view>
       </view>
       </view>
     </view>
     </view>