Kaynağa Gözat

福利购图片统一调整

kk.shi 3 yıl önce
ebeveyn
işleme
7779053400

+ 1 - 1
components/couponWrap/index.js

@@ -85,7 +85,7 @@ Component({
             })
             let info =  await getColor();
             this.setData({
-              config:info
+              config:info.config
             })
         },
         exFoldPanel(e) {

+ 5 - 1
components/couponWrap/index.wxml

@@ -21,7 +21,11 @@
                           </block>
                         </block>
                       </view>
-                      <view class="coupon-condition" style="color: {{config.secColor?config.secColor:'#B01717'}};">{{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>

+ 14 - 1
components/couponWrap/index.wxss

@@ -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 {

+ 5 - 5
pages/luckDraw/profile.js

@@ -1,8 +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 WelfareMall from '../../api/welfareMall';
+import {getMobileCache, getPhoneNumberNew as getPhoneNumberSync, getColor} from '../../utils/user'
 Page({
 
     /**
@@ -48,11 +47,12 @@ Page({
             this.getUserPrizeList();
         }
 
-        let info =  await WelfareMall.getIndexList();
+        let info =  await getColor();
         this.setData({
-          prizeImgList:info.data.prizeImgList,
-          config:info.data.config,
+          prizeImgList:info.prizeImgList,
+          config:info.config,
         })
+        console.log(info.prizeImgList)
     },
 
     /**

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

@@ -31,7 +31,7 @@ Page({
     console.log(options)
     let info =  await getColor();
     this.setData({
-      config:info
+      config:info.config
     })
     let  userMobile = await Activity.getMobileCache();
     if (userMobile.length !== 0) {

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

@@ -74,11 +74,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>

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

@@ -178,7 +178,7 @@ margin-left: 56rpx;
 height: 20px;
 font-size: 18px;
 font-weight: 700;
-color: #B01717;
+/* color: #B01717; */
 margin-top: 30px;
 }
 
@@ -197,7 +197,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;

+ 1 - 1
pages/welfareMall/index/index.js

@@ -143,7 +143,7 @@ Page({
     })
     let info =  await getColor();
     this.setData({
-      config:info
+      config:info.config
     })
 
     this.setThrem(res.data.config.grayTheme)

+ 1 - 1
pages/welfareMall/order/orderCompletion.js

@@ -37,7 +37,7 @@ Page({
       // this.data.orderSn = options.ordersn;
       let info =  await getColor();
       this.setData({
-        config:info
+        config:info.config
       })
   },
 

+ 6 - 4
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({
 
@@ -19,6 +19,7 @@ Page({
     hasUserInfo:false,
     personHeadList: [],
     staffImgList: [],
+    config: {},
 
   },
   onChooseAvatar(e) {
@@ -103,11 +104,12 @@ Page({
   async getIndexList(){
     let res =  await WelfareMall.getPersonalData();
     await this.getPath(res.data.navigationList);
-    let info =  await WelfareMall.getIndexList();
+    let info =  await getColor();
     this.setData({
       navigationList:res.data.navigationList,
-      personHeadList:info.data.personHeadList,
-      staffImgList:info.data.staffImgList,
+      personHeadList:info.personHeadList,
+      staffImgList:info.staffImgList,
+      config:info.config
     })
   },
 

+ 5 - 5
utils/user.js

@@ -43,14 +43,14 @@ function getPhoneNumberNew(e, func) {
  * 获取统一颜色
  */
 async function getColor(){
-  let config = wx.getStorageSync('config') || null 
-  if(config != null){
-    return config;
+  let configinfo = wx.getStorageSync('configinfo') || null 
+  if(configinfo != null){
+    return configinfo;
   }
   let res = await WelfareMall.getIndexList();
     //颜色存到缓存中
-  wx.setStorageSync('config',res.data.config);
-  return res.data.config;
+  wx.setStorageSync('configinfo',res.data);
+  return res.data;
 }
 
 module.exports = {