Commit cd395c3b by daqian

modify: 首页背景色

parent fd2186a7
...@@ -26,6 +26,7 @@ wxService.page({ ...@@ -26,6 +26,7 @@ wxService.page({
pageId: 3, pageId: 3,
baseUserInfo: null, baseUserInfo: null,
cardMember: null, cardMember: null,
pageBackgroundColor: 0
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -142,6 +143,9 @@ wxService.page({ ...@@ -142,6 +143,9 @@ wxService.page({
if(!res) return false if(!res) return false
const {result,data} = res.data const {result,data} = res.data
if(result == 0){ if(result == 0){
this.setData({
pageBackgroundColor: data.page.backgroundColor
})
// 动态设置title // 动态设置title
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: data.page.title title: data.page.title
......
<!--pages/userCenter.wxml--> <!--pages/userCenter.wxml-->
<view class='user-center'> <view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};">
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部--> <!-- 1 轮播 2 个人中心 3 图片导航 4 底部-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem"> <block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!--{{pItem.type}}--> <!--{{pItem.type}}-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment