Просмотр исходного кода

Merge remote-tracking branch 'origin/skk/feat/welfare_color'

xing.li лет назад: 3
Родитель
Сommit
377a156ccf

+ 6 - 1
components/couponWrap/index.js

@@ -1,6 +1,7 @@
 // components/couponWrap/index.js
 import { parseTime } from '../../utils/util';
 import activity from '../../api/activity'
+import {getColor} from '../../utils/user'
 
 Component({
     externalClasses: ['class', 'coupon-circule-ex-class', 'coupon-item-ex-class'],
@@ -37,7 +38,7 @@ Component({
      * 组件的方法列表
      */
     methods: {
-        prepareData() {
+      async prepareData() {
             if (!this.data.couponList || this.data.couponList.length == 0) {
                 this.data.list = [];
                 this.data.flodMap = {};
@@ -82,6 +83,10 @@ Component({
             this.setData({
                 list: this.data.couponList
             })
+            let info =  await getColor();
+            this.setData({
+              config:info.config
+            })
         },
         exFoldPanel(e) {
             const index = e.currentTarget.dataset.index

+ 12 - 8
components/couponWrap/index.wxml

@@ -5,7 +5,7 @@
            <!-- 礼包 -->
            <view class="coupon-card">
                 <view class="coupon-card-left">
-                      <view class="coupon-prices {{nums.priceClass(item)}}">
+                      <view class="coupon-prices {{nums.priceClass(item)}}" style="color: {{config.secColor?config.secColor:'#B01717'}};">
                         <block wx:if="{{item.type.value == 'C'}}">
                             <text>{{nums.formatReduceCost(item)}}</text>
                             <text class="_unit">元</text>
@@ -21,25 +21,29 @@
                           </block>
                         </block>
                       </view>
-                      <view class="coupon-condition">{{nums.formatLeastCost(item)}}</view>
+                      <view class="coupon-condition" style="color: {{config.secColor?config.secColor:'#B01717'}};">
+                        <view class="coupon-condition-start" style="background: {{config.secColor?config.secColor:'#B01717'}};"></view>
+                        {{nums.formatLeastCost(item)}}
+                        <view  class="coupon-condition-start" style="background: {{config.secColor?config.secColor:'#B01717'}};"></view>
+                      </view>
                 </view>
                 <view class="coupon-card-right">
                     <view class="_title">{{item.title}}</view>
                     <view class="_time_des">{{item.validTimesStr}}</view>
                 </view>
                 <block wx:if="{{item.isSn}}">
-                    <view wx:if="{{item.couponState == 0}}" class="coupon-card-btn">
+                    <view wx:if="{{item.couponState == 0}}" class="coupon-card-btn" style="background: {{config.mainColor?config.mainColor:'#B01717'}};">
                       <jumpmallapp>立即使用</jumpmallapp>
                     </view>
                     <view class="coupon-card-btn gray" wx:else>
                         {{item.stateStr}}
                     </view>
                 </block>
-                <view class="coupon-card-num" wx:else>
+                <view class="coupon-card-num" wx:else style="background: {{config.mainColor?config.mainColor:'#B01717'}};">
                     {{item.num}}张
                 </view>
            </view>
-           <view class="coupon-split">
+           <view class="coupon-split" style="color: {{config.mainColor?config.mainColor:'#B01717'}};">
                  <view class="coupon-circule _left coupon-circule-ex-class" ></view>
                  <view class="coupon-circule _right coupon-circule-ex-class"></view>
            </view>
@@ -57,7 +61,7 @@
                         </block>
                         <block wx:elif="{{item.bindShopType == 2 || item.bindShopType == 4}}">
                            <text>适用部分门店</text>
-                           <text class="look_more_txt" data-index="{{index}}" catchtap="toFixStorePage">点击查看>></text>
+                           <text class="look_more_txt" data-index="{{index}}" catchtap="toFixStorePage" style="color: {{config.secColor?config.secColor:'#B01717'}};">点击查看>></text>
                         </block>
                         <block wx:elif="{{item.bindShopType == 3 }}">
                            <text>随领取门店可用</text>
@@ -70,11 +74,11 @@
                         </block>
                         <block wx:elif="{{item.bindGoodsType == 2 || item.bindGoodsType == 4}}">
                            <text>适用部分商品</text>
-                           <text class="look_more_txt" data-index="{{index}}" catchtap="toFixFoodPage">点击查看>></text>
+                           <text class="look_more_txt" data-index="{{index}}" catchtap="toFixFoodPage" style="color: {{config.secColor?config.secColor:'#B01717'}};">点击查看>></text>
                         </block>
                         <block wx:if="{{item.bindGoodsType == 3}}">
                           <text>不适用商品</text>
-                          <text class="look_more_txt" data-index="{{index}}" catchtap="toFixFoodPageNo">点击查看>></text>
+                          <text class="look_more_txt" data-index="{{index}}" catchtap="toFixFoodPageNo" style="color: {{config.secColor?config.secColor:'#B01717'}};">点击查看>></text>
                         </block>
                    </view>
                    <view class="coupon-detail-line">

+ 19 - 6
components/couponWrap/index.wxss

@@ -38,14 +38,14 @@
 
 .coupon-condition {
     font-size: 20rpx;
-    color: #b0d342;
+    /* color: #b0d342; */
     display: inline-block;
     vertical-align: middle;
 }
 
 .coupon-prices {
     font-size: 70rpx;
-    color: #b0d342;
+    /* color: #b0d342; */
     font-weight: 600;
     height: 88rpx;
     vertical-align: baseline;
@@ -60,7 +60,7 @@
 .coupon-prices ._unit {
     font-size: 30rpx;
 }
-.coupon-condition:before, .coupon-condition:after {
+/* .coupon-condition:before, .coupon-condition:after {
     width: 6px;
     height: 6px;
     background: #b0d342;
@@ -71,6 +71,19 @@
     vertical-align: middle;
     position: relative;
     top: -3rpx;
+} */
+
+.coupon-condition-start {
+  width: 6px;
+  height: 6px;
+  /* background: #b0d342; */
+  transform:rotate(45deg);
+  margin: 0 6rpx;
+  display: inline-block;
+  content: "";
+  vertical-align: middle;
+  position: relative;
+  top: -3rpx;
 }
 
 .coupon-card-right {
@@ -106,7 +119,7 @@
     display: inline-block;
     right: 32rpx;
     top: 38rpx;
-    background: #b0d342;
+    /* background: #b0d342; */
     border-radius: 32rpx;
     color: #fff;
     font-size: 26rpx;
@@ -117,7 +130,7 @@
 }
 
 .coupon-split {
-    border-top: 2rpx dashed  #b0d342;
+    border-top: 2rpx dashed;
     position: relative;
 }
 .coupon-circule {
@@ -168,7 +181,7 @@
 
 .look_more_txt {
     padding-left: 20rpx;
-    color: #b0d342;
+    /* color: #b0d342; */
     font-size: 22rpx;
 }
 

+ 12 - 3
pages/luckDraw/profile.js

@@ -1,7 +1,7 @@
 // pages/luckDraw/profile.js
 import LuckDraw from '../../api/luck-draw'
 import { parseTime } from '../../utils/util'
-import {getMobileCache, getPhoneNumberNew as getPhoneNumberSync} from '../../utils/user'
+import {getMobileCache, getPhoneNumberNew as getPhoneNumberSync, getColor} from '../../utils/user'
 Page({
 
     /**
@@ -24,13 +24,15 @@ Page({
         thirdPrizeNum: 0,
         goodsType: 1,
         goodsItemList: [],
-        showCustomPreview: false
+        showCustomPreview: false,
+        prizeImgList: [],
+        config: {},
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
+    onLoad: async function (options) {
         this.setData({
             isLogin: getMobileCache() != '',
             mobileTop:getMobileCache(),
@@ -44,6 +46,13 @@ Page({
             })
             this.getUserPrizeList();
         }
+
+        let info =  await getColor();
+        this.setData({
+          prizeImgList:info.prizeImgList,
+          config:info.config,
+        })
+        console.log(info.prizeImgList)
     },
 
     /**

+ 16 - 17
pages/luckDraw/profile.wxml

@@ -16,32 +16,31 @@
   <!-- 优惠券内容 -->
   <view hidden="{{hidden1}}">
     <view class="coupon-wrap-list">
-        <coupon-wrap wx:if="{{goodsItemList.length>0}}" 
-        coupon-list="{{goodsItemList}}"
-        class="coupon_wrap"
-        coupon-item-ex-class="coupon-item-style"
-        coupon-circule-ex-class="coupon-circule-style"
-        />
+      <coupon-wrap wx:if="{{goodsItemList.length>0}}" coupon-list="{{goodsItemList}}" class="coupon_wrap" coupon-item-ex-class="coupon-item-style" coupon-circule-ex-class="coupon-circule-style" />
     </view>
-    
+
     <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可用优惠券 ————</view>
     <view class="no_result" wx:if="{{noMore}}">—— 人家也是有底线的 ——</view>
   </view>
 
   <!-- 奖品 -->
   <view hidden="{{hidden2}}">
-    <view class="prize-content flex-row" wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" data-src="{{item.goodsData.fullPhotoUrl}}" catchtap="toLookHitPhoto">
-      <view class="coupon-content">
-        <view class="coupon-title over-ellipsis">{{item.goodsName?item.goodsName:'未设置名称'}}</view>
-        <view class="coupon-data flex-row">
-          <view class="coupon-data-time">{{item.createTime}}</view>
-          <view class="coupon-refund flex-row">
-            <view class="lower-coupon-text">立即兑换</view>
+    <view wx:for="{{goodsItemList}}" wx:key="index" data-id="{{item.id}}" data-src="{{item.goodsData.fullPhotoUrl}}" catchtap="toLookHitPhoto">
+      <image class="prize-content-img" src="{{prizeImgList.length > 0 && prizeImgList[0].figure?prizeImgList[0].figure:'https://dy.shpr.top/welfareGo/luck-draw1.png'}}">
+      </image>
+      <view class="prize-content flex-row">
+        <view class="coupon-content">
+          <view class="coupon-title over-ellipsis">{{item.goodsName?item.goodsName:'未设置名称'}}</view>
+          <view class="coupon-data flex-row">
+            <view class="coupon-data-time">{{item.createTime}}</view>
+            <view class="coupon-refund flex-row" style="color: {{config.secColor?config.secColor:'#B01717'}};">
+              <view class="lower-coupon-text" style="color: {{config.secColor?config.secColor:'#B01717'}};">立即兑换</view>
+            </view>
           </view>
         </view>
-      </view>
-      <view class="coupon-img flex-column">
-        <image class="coupon-img-url" src="{{item.fullGoodsBigImage}}"></image>
+        <view class="coupon-img flex-column">
+          <image class="coupon-img-url" src="{{item.fullGoodsBigImage}}"></image>
+        </view>
       </view>
     </view>
     <view class="no_result" wx:if="{{noResult}}">———— 抱歉,您暂无可领取奖品 ————</view>

+ 11 - 4
pages/luckDraw/profile.wxss

@@ -70,10 +70,17 @@ page{
 .coupon,.prize-content{
   width: 707rpx;
   height: 203rpx;
-  background-image: url(https://dy.shpr.top/welfareGo/luck-draw1.png);
-  background-size: 100% 100%;
   justify-content: space-between;
   margin-bottom: 19rpx;
+  position: relative;
+}
+
+.prize-content-img{
+  width: 707rpx;
+  height: 203rpx;
+  /* background-image: url(https://dy.shpr.top/welfareGo/luck-draw1.png);
+  background-size: 100% 100%; */
+  position: absolute;
 }
 
 .coupon-title,.coupon-data{
@@ -116,14 +123,14 @@ page{
 .coupon-refund{
   width: 139rpx;
   height: 40rpx;
-  border: 1px solid #b0d342;
+  border: 1px solid;
   border-radius: 50rpx;
 }
 
 .lower-coupon-text{
   font-size: 22rpx;
   font-weight: 500;
-  color: #b0d342;
+  /* color: #b0d342; */
 }
 
 .no_result {

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

@@ -4,7 +4,7 @@ import Activity from '../../../api/activity';
 import Statistics from '../../../components/statistics/index'
 const util = require('../../../utils/util.js');
 const app = getApp();
-import {getMobileCache, getPhoneNumberNew as getPhoneNumberSync} from '../../../utils/user'
+import {getMobileCache, getPhoneNumberNew as getPhoneNumberSync, getColor} from '../../../utils/user'
 Page({
 
   /**
@@ -22,6 +22,7 @@ Page({
      config: {},
      orderSn:"",
      department: '',
+     valueImgList: [],
   },
 
   /**
@@ -29,10 +30,6 @@ Page({
    */
   onLoad: async function (options) {
     console.log(options)
-    let res =  await WelfareMall.getIndexList();
-    this.setData({
-      config:res.data.config
-    })
     let  userMobile = await Activity.getMobileCache();
     if (userMobile.length !== 0) {
       this.setData({
@@ -67,8 +64,13 @@ Page({
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow: function () {
-
+  onShow: async function () {
+    wx.setStorageSync('configinfo',null);
+    let info =  await getColor();
+    this.setData({
+      config:info.config,
+      valueImgList: info.valueImgList,
+    })
   },
 
   /**

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

@@ -28,10 +28,13 @@
         </view>
       </view>
 
-      <view class="info_right flex-column">
-      <view class="info_right_top" style="color: {{config.secColor?config.secColor:'#B01717'}};" wx:if="{{detail.isPay!=0}}">{{detail.priceFormatter}}元</view>
-      <view class="info_right_top" style="color: {{config.secColor?config.secColor:'#B01717'}};" wx:else>免费</view>
-      <view class="info_right_bottom" style="color: {{config.secColor?config.secColor:'#B01717'}};">价值¥{{detail.showPriceFormatter}}</view>
+      <view>
+        <image class="info_right-img" src="{{valueImgList.length > 0 && valueImgList[0].figure?valueImgList[0].figure:'https://dy.shpr.top/welfareGo/price_bg1.png'}}"></image>
+        <view class="info_right flex-column">
+          <view class="info_right_top" style="color: {{config.secColor?config.secColor:'#B01717'}};" wx:if="{{detail.isPay!=0}}">{{detail.priceFormatter}}元</view>
+          <view class="info_right_top" style="color: {{config.secColor?config.secColor:'#B01717'}};" wx:else>免费</view>
+          <view class="info_right_bottom" style="color: {{config.secColor?config.secColor:'#B01717'}};">价值¥{{detail.showPriceFormatter}}</view>
+        </view>
       </view>
     </view>
     </view>
@@ -74,11 +77,11 @@
     <view class="bg-zindex" wx:if="{{hideWindowValue}}">
 
         <view class="success_window flex-column">
-        <view class="w_title">购买成功</view>
+        <view class="w_title" style="color: {{config.secColor?config.secColor:'#B01717'}};">购买成功</view>
         <view class="w_name">{{detail.name}}</view>
         <view class="w_text">已发送至您的卡包</view>
         <view class="w_border"></view>
-        <view class="w_go_order" bindtap="goToOrderInfo">去看看</view>
+        <view class="w_go_order" bindtap="goToOrderInfo" style="background-color: {{config.mainColor?config.mainColor:'#B01717'}};">去看看</view>
 
         </view>
       <image class="widow_del" src="/images/welfareMall/window_del.png"  bindtap="goToOrderList"></image>

+ 11 - 4
pages/welfareMall/activityInfo/activityInfo.wxss

@@ -31,9 +31,16 @@ Page {
 .info_right{
   width: 204rpx;
   height: 236rpx;
-  background-image: url(https://dy.shpr.top/welfareGo/price_bg1.png);
+  position: relative;
+  /* background-image: url(https://dy.shpr.top/welfareGo/price_bg1.png);
   background-repeat: no-repeat;
-  background-size: 100% 100%;  
+  background-size: 100% 100%;   */
+}
+
+.info_right-img{
+  width: 204rpx;
+  height: 236rpx;
+  position: absolute;
 }
 .info_name{
   height: 25px;
@@ -178,7 +185,7 @@ margin-left: 56rpx;
 height: 20px;
 font-size: 18px;
 font-weight: 700;
-color: #B01717;
+/* color: #B01717; */
 margin-top: 30px;
 }
 
@@ -197,7 +204,7 @@ margin-top:30px;
 .w_go_order{
   width: 164px;
   height: 42px;
-  background: #B01717;
+  /* background: #B01717; */
   border-radius: 20px;
   text-align: center;
   color: #fff;

+ 7 - 2
pages/welfareMall/couponFitFood/index.js

@@ -1,18 +1,19 @@
 // pages/welfareMall/couponFitFood/index.js
 import activity from '../../../api/activity'
+import {getColor} from '../../../utils/user'
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
-
+      config: {},
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
+    onLoad: async function (options) {
         console.log(options)
         if (!options.couponId) {
             wx.reLaunch({
@@ -25,6 +26,10 @@ Page({
             bindGoodsType: options.bindGoodsType
         })
         this.loadData()
+        let info =  await getColor();
+        this.setData({
+          config:info.config
+        })
     },
 
     /**

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

@@ -4,8 +4,8 @@
     <view class="food_body">
         
         <view class="card_body">
-            <view class="coupon_title">{{couponName}}</view>
-            <view class="coupon-split">
+            <view class="coupon_title" style="color: {{config.secColor?config.secColor:'#B01717'}};">{{couponName}}</view>
+            <view class="coupon-split" style="background-color: {{config.mainColor?config.mainColor:'#B01717'}};">
                  <view class="coupon-circule _left" ></view>
                  <view class="coupon-circule _right"></view>
            </view>

+ 3 - 3
pages/welfareMall/couponFitFood/index.wxss

@@ -6,14 +6,14 @@
 }
 
 .card_body {
-    background: #FFF6F5;
+    background: #F6F8EB;
     border-radius: 12rpx;
     width: 690rpx;
     margin: auto;
 }
 
 .coupon-split {
-    border-top: 2rpx dashed  #F06255;
+    border-top: 2rpx dashed;
     position: relative;
 }
 .coupon-circule {
@@ -35,7 +35,7 @@
     font-size: 40rpx;
     padding: 30rpx 0 30rpx 40rpx;
     font-weight: bold;
-    color: #F06255;
+    /* color: #F06255; */
 }
 ._s_t {
     font-size: 30rpx;

+ 3 - 3
pages/welfareMall/feedback/feedback.js

@@ -1,7 +1,7 @@
 // pages/welfareMall/feedback/feedback.js
 import WelfareMall from '../../../api/welfareMall'
 import Upload from '../../../api/upload'
-import {getMobileCache, getPhoneNumber as getPhoneNumberSync} from '../../../utils/user'
+import {getMobileCache, getPhoneNumber as getPhoneNumberSync, getColor} from '../../../utils/user'
 Page({
 
   /**
@@ -183,9 +183,9 @@ Page({
   },
 
   async getIndexList(){
-    let res =  await WelfareMall.getIndexList();
+    let res =  await getColor();
     this.setData({
-      config:res.data.config
+      config:res.config
     })
   },
   goToRefund (){

+ 9 - 3
pages/welfareMall/historical/historical.js

@@ -1,7 +1,7 @@
 // pages/welfareMall/historical/historical.js
 import WelfareMall from '../../../api/welfareMall'
 import { parseTime } from '../../../utils/util'
-import {getMobileCache, getPhoneNumber as getPhoneNumberSync} from '../../../utils/user'
+import {getMobileCache, getPhoneNumber as getPhoneNumberSync, getColor} from '../../../utils/user'
 Page({
 
   /**
@@ -14,14 +14,20 @@ Page({
     noResult: false,
     noMore: false,
     mobileTop: 'TONY WU',
-    orderList: []
+    orderList: [],
+    config: {},
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function (options) {
+  onLoad: async function (options) {
     this.getOrderList();
+    let info =  await getColor();
+    this.setData({
+      config:info.config
+    })
+    console.log(info)
   },
 
   // 订单数据

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

@@ -23,8 +23,8 @@
       <view class="content-line"></view>
       <view class="content-lower">
         <view class="lower-total">共{{item.goodsList.length}}件商品 合计¥{{item.payPriceFormatter}}</view>
-        <view class="lower-order-style flex-row">
-          <view class="lower-order-text">订单详情</view>
+        <view class="lower-order-style flex-row" style="color: {{config.secColor?config.secColor:'#B01717'}};">
+          <view class="lower-order-text" style="color: {{config.secColor?config.secColor:'#B01717'}};">订单详情</view>
         </view>
       </view>
     </view>

+ 2 - 2
pages/welfareMall/historical/historical.wxss

@@ -138,14 +138,14 @@ page{
   height: 46rpx;
   box-sizing: border-box;
   background: #FFFFFF;
-  border: 1px solid #B01717;
+  border: 1px solid;
   border-radius: 10rpx;
 }
 
 .lower-order-text{
   font-size: 22rpx;
   font-weight: 500;
-  color: #B01717;
+  /* color: #B01717; */
 }
 
 .no_result {

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

@@ -3,6 +3,7 @@
 
 import WelfareMall from '../../../api/welfareMall';
 const util = require('../../../utils/util.js');
+import {getColor} from '../../../utils/user'
 const app = getApp();
 Page({
 
@@ -27,7 +28,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-      
+    
   },
 
   /**
@@ -41,6 +42,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
+    wx.setStorageSync('configinfo',null);
     this.getIndexList()
   },
 
@@ -138,7 +140,11 @@ Page({
       navigationList:res.data.navigationList,
       adList:res.data.adList,
       grayTheme:res.data.config.grayTheme,
-      config:res.data.config
+      // config:res.data.config
+    })
+    let info =  await getColor();
+    this.setData({
+      config:info.config
     })
 
     this.setThrem(res.data.config.grayTheme)

+ 7 - 2
pages/welfareMall/order/orderCompletion.js

@@ -1,6 +1,6 @@
 // pages/welfareMall/order/orderCompletion.js
 import WelfareMall from '../../../api/welfareMall'
-import {getMobileCache, getPhoneNumber as getPhoneNumberSync} from '../../../utils/user'
+import {getMobileCache, getPhoneNumber as getPhoneNumberSync, getColor} from '../../../utils/user'
 Page({
 
   /**
@@ -18,12 +18,13 @@ Page({
     reason: '',
     inputValue: '',
     repeat: false,
+    config: {},
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function (options) {
+  onLoad: async function (options) {
     // var that = this;
     // that.orderSn = options.ordersn
     if(!options.ordersn){
@@ -34,6 +35,10 @@ Page({
     })
       this.getOrder(options.ordersn);
       // this.data.orderSn = options.ordersn;
+      let info =  await getColor();
+      this.setData({
+        config:info.config
+      })
   },
 
   

+ 7 - 7
pages/welfareMall/order/orderCompletion.wxml

@@ -25,7 +25,7 @@
             <view>
               <view class="round" wx:if="{{orderDetail.goodsList[0].round}}">轮次:{{orderDetail.goodsList[0].round}}</view>
               <view class="middle-text">{{orderDetail.goodsList[0].activityName}}</view>
-              <view class="look-coupon-detail" catchtap="extendCouponWrap"><text class="word_text">查看券包详情</text>
+              <view class="look-coupon-detail" catchtap="extendCouponWrap"><text class="word_text" style="color: {{config.secColor?config.secColor:'#B01717'}};">查看券包详情</text>
                 <image wx:if="{{!isExtend}}" class="fold-btn" src="../../../images/welfareMall/down-ico.png" />
                 <image wx:else class="fold-btn" src="../../../images/welfareMall/up-ico.png" />
               </view>
@@ -67,14 +67,14 @@
       </view>
     </view>
     <view class="order-rt flex-row">
-      <view class="order-refund flex-row" wx:if="{{orderDetail.status.value == 1}}" catchtap="toCancelOrder">
-        <view class="lower-order-text">取消订单</view>
+      <view class="order-refund flex-row" wx:if="{{orderDetail.status.value == 1}}" catchtap="toCancelOrder" style="color: {{config.secColor?config.secColor:'#B01717'}};">
+        <view class="lower-order-text" style="color: {{config.secColor?config.secColor:'#B01717'}};">取消订单</view>
       </view>
-      <view class="order-refund flex-row" wx:if="{{orderDetail.status.value == 1}}" catchtap="goPay">
-        <view class="lower-order-text">去支付</view>
+      <view class="order-refund flex-row" wx:if="{{orderDetail.status.value == 1}}" catchtap="goPay" style="color: {{config.secColor?config.secColor:'#B01717'}};">
+        <view class="lower-order-text" style="color: {{config.secColor?config.secColor:'#B01717'}};">去支付</view>
       </view>
-      <view class="order-refund flex-row" wx:if="{{(orderDetail.status.value == 2 || orderDetail.status.value == 5) && orderDetail.goodsList[0].activity.isPay == 1}}" catchtap="getMode">
-        <view class="lower-order-text">申请退款</view>
+      <view class="order-refund flex-row" wx:if="{{(orderDetail.status.value == 2 || orderDetail.status.value == 5) && orderDetail.goodsList[0].activity.isPay == 1}}" catchtap="getMode" style="color: {{config.secColor?config.secColor:'#B01717'}};">
+        <view class="lower-order-text" style="color: {{config.secColor?config.secColor:'#B01717'}};">申请退款</view>
       </view>
     </view>
     <!-- <modal hidden="{{hidden}}" title="退款原因" confirm-text="提交" cancel-text="取消" bindcancel="cancel" bindconfirm="confirm">

+ 3 - 3
pages/welfareMall/order/orderCompletion.wxss

@@ -179,7 +179,7 @@ page{
   width: 150rpx;
   height: 51rpx;
   background: #FFFFFF;
-  border: 1px solid #B01717;
+  border: 1px solid;
   border-radius: 10rpx;
   margin-left: 10rpx;
 }
@@ -187,7 +187,7 @@ page{
 .lower-order-text{
   font-size: 22rpx;
   font-weight: 500;
-  color: #B01717;
+  /* color: #B01717; */
 }
 
 .bg-zindex{
@@ -275,7 +275,7 @@ page{
 }
 .look-coupon-detail .word_text {
   font-size: 24rpx;
-  color: #F06255;
+  /* color: #F06255; */
   text-decoration: underline;
 }
 .look-coupon-detail .fold-btn {

+ 9 - 2
pages/welfareMall/personal/personal.js

@@ -1,7 +1,7 @@
 // pages/welfareMall/personal/personal.js
 import WelfareMall from '../../../api/welfareMall'
 import activity from '../../../api/activity'
-import {getMobileCache, getPhoneNumberNew as getPhoneNumberSync} from '../../../utils/user'
+import {getMobileCache, getPhoneNumberNew as getPhoneNumberSync, getColor} from '../../../utils/user'
 const app = getApp();
 Page({
 
@@ -16,7 +16,10 @@ Page({
     navigationList:[],
     couponPath: false,
     avatarUrl : 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0',
-    hasUserInfo:false
+    hasUserInfo:false,
+    personHeadList: [],
+    staffImgList: [],
+    config: {},
 
   },
   onChooseAvatar(e) {
@@ -101,8 +104,12 @@ Page({
   async getIndexList(){
     let res =  await WelfareMall.getPersonalData();
     await this.getPath(res.data.navigationList);
+    let info =  await getColor();
     this.setData({
       navigationList:res.data.navigationList,
+      personHeadList:info.personHeadList,
+      staffImgList:info.staffImgList,
+      config:info.config
     })
   },
 

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

@@ -1,6 +1,6 @@
 <!--pages/welfareMall/personal/personal.wxml-->
 <page-wrap id="Page" class="{{grayTheme?'page':''}}">
-  <custom-page head-bg-image="https://dy.shpr.top/welfareGo/personal-my.png" bind:sizes="handlePageSizes">
+  <custom-page head-bg-image="{{personHeadList.length > 0 && personHeadList[0].figure?personHeadList[0].figure:'https://dy.shpr.top/welfareGo/personal-my.png'}}" bind:sizes="handlePageSizes">
     <view slot="body" class="sign-scroll-body">
     <view slot="body" class="personal flex-column">
       <!-- 首部个人信息 -->
@@ -56,7 +56,7 @@
       </view>
       <!-- 员工通道 -->
       <view><button class="wx-isLogin-broadcast" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getStaff"></button>
-        <view class="broadcast" catchtap="toStaff"></view>
+        <image class="broadcast" catchtap="toStaff" src="{{staffImgList.length > 0 && staffImgList[0].figure?staffImgList[0].figure:'https://dy.shpr.top/welfareGo/broadcast1.png'}}"></image>
       </view>
       <!-- 内容 -->
       <view class="content flex-column">

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

@@ -237,8 +237,8 @@ page{
 .broadcast{
   width: 678rpx;
   height: 130rpx;
-  background-image: url(https://dy.shpr.top/welfareGo/broadcast1.png);
-  background-size: 100% 100%;
+  /* background-image: url(https://dy.shpr.top/welfareGo/broadcast1.png);
+  background-size: 100% 100%; */
   margin-top: 50rpx;
 }
 

+ 23 - 1
utils/user.js

@@ -1,3 +1,4 @@
+import WelfareMall from '../api/welfareMall'
 function getUserInfo() {
     return wx.getStorageSync('userInfo') || null;
 }
@@ -38,10 +39,31 @@ function getPhoneNumberNew(e, func) {
   
 }
 
+/**
+ * 获取统一颜色
+ */
+async function getColor(){
+  let configinfo = wx.getStorageSync('configinfo') || null 
+  if(configinfo != null){
+    return configinfo;
+  }
+  let res = await WelfareMall.getIndexList();
+  //数据重组
+  let info = res.data;
+  delete info['activityList'];
+  delete info['adList'];
+  delete info['bannerList'];
+  delete info['navigationList'];
+    //颜色存到缓存中
+  wx.setStorageSync('configinfo',info);
+  return info;
+}
+
 module.exports = {
     getUserInfo,
     getMobileCache,
     getPhoneNumber,
-    getPhoneNumberNew
+    getPhoneNumberNew,
+    getColor
 }