Kaynağa Gözat

feat(福利Go)卡券中心 添加滤镜

xing.li 3 yıl önce
ebeveyn
işleme
27495ea233

+ 2 - 2
app.json

@@ -36,13 +36,13 @@
     "list": [  {
       "text": "首页",
       "pagePath": "pages/welfareMall/index/index",
-      "selectedIconPath": "images/welfareMall/home-active.png",
+      "selectedIconPath": "images/welfareMall/home.png",
       "iconPath": "images/welfareMall/home.png"
   },
   {
       "text": "我的",
       "pagePath": "pages/welfareMall/personal/personal",
-      "selectedIconPath": "images/welfareMall/user-active.png",
+      "selectedIconPath": "images/welfareMall/user.png",
       "iconPath": "images/welfareMall/user.png"
   }
   ]

+ 2 - 2
app.wxss

@@ -35,7 +35,7 @@ display: -webkit-box;
 -webkit-line-clamp: 2;
 }
 
-/* page{
+.page{
   -webkit-filter: grayscale(100%);
   filter: grayscale(100%);
-} */
+}

BIN
images/welfareMall/home_black.png


BIN
images/welfareMall/user_black.png


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

@@ -52,7 +52,7 @@
 <image src="/images/welfareMall/buy_info.png" class="bottom_icon"></image>
 <view class="bottom_tilte_text">购买须知</view>
 </view>
-<rich-text class="bottom_title_b" nodes="{{detail.remark}}"></rich-text>
+<rich-text class="bottom_title_b" nodes="{{detail.buyRemark}}"></rich-text>
 
 </view>
 

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

@@ -16,14 +16,15 @@ Page({
       autoplay: true,
       interval: 2000,
       duration: 500,
-      indicatorDots:true
+      indicatorDots:true,
+      grayTheme:false
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-      this.getIndexList()
+      
   },
 
   /**
@@ -37,7 +38,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    this.getIndexList()
   },
 
   /**
@@ -113,11 +114,34 @@ Page({
     this.setData({
       activityList:res.data.activityList,
       bannerList:res.data.bannerList,
-      navigationList:res.data.navigationList
+      navigationList:res.data.navigationList,
+      grayTheme:res.data.config.grayTheme
     })
+
+    this.setThrem(res.data.config.grayTheme)
+  
  
   },
+  //设置滤镜
+  setThrem(grayTheme){
+    app.globalData.grayTheme = grayTheme;
+    let index0 = "images/welfareMall/home-active.png"
+    let index1 = "images/welfareMall/user-active.png"
+
+    if(grayTheme){
+      index0 = "images/welfareMall/home_black.png"
+      index1 = "images/welfareMall/user_black.png"
+    }
 
+    wx.setTabBarItem({
+      index: 0,
+      selectedIconPath: index0
+    })
+    wx.setTabBarItem({
+      index: 1,
+      selectedIconPath: index1
+    })
+  },
   goToBanner(e){
     var appId = e.currentTarget.dataset.appid;
     var path = e.currentTarget.dataset.path;

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

@@ -1,5 +1,5 @@
 
-
+<view class="{{grayTheme?'page':''}}">
 <view>
 <swiper  class="swiper"
 indicator-dots="{{indicatorDots}}"
@@ -59,4 +59,4 @@ indicator-dots="{{indicatorDots}}"
     </view>
   </view> -->
 </view>
-
+</view>

+ 5 - 1
pages/welfareMall/personal/personal.js

@@ -2,6 +2,7 @@
 import WelfareMall from '../../../api/welfareMall'
 import activity from '../../../api/activity'
 import {getMobileCache, getPhoneNumber as getPhoneNumberSync} from '../../../utils/user'
+const app = getApp();
 Page({
 
   /**
@@ -11,6 +12,7 @@ Page({
     isLogin: false,
     mobileTop: 'TONY WU',
     countNum: 0,
+    grayTheme:false
   },
 
   /**
@@ -97,7 +99,9 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    this.setData({
+      grayTheme: app.globalData.grayTheme
+    })
   },
 
   /**

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

@@ -1,4 +1,5 @@
 <!--pages/welfareMall/personal/personal.wxml-->
+<view class="{{grayTheme?'page':''}}">
 <view class="personal flex-column">
   <!-- 首部个人信息 -->
   <view class="head flex-column">
@@ -98,6 +99,7 @@
     </view>
   </view>
 </view>
+</view>
 
 <!-- 使用wxs 手机号码中间四位显示为*号 -->
 <wxs module="phone">