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