为改新的浅蓝色做准备
This commit is contained in:
@@ -46,66 +46,23 @@ Page({
|
||||
that0 = this;
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var userInfodata = wx.getStorageSync("userInfo")
|
||||
var sel = 3;
|
||||
var sel = 4;
|
||||
var ifsel = 0;
|
||||
|
||||
if (userId && userInfodata) {
|
||||
var userInfo = JSON.parse(userInfodata)
|
||||
ifsel = userInfo.bdshEnable;
|
||||
that0.GetSignInfo();
|
||||
}
|
||||
|
||||
// 根据用户权限调整选中索引
|
||||
if (ifsel == 1) {
|
||||
sel = 3;
|
||||
that0.getTabBar().setData({
|
||||
"list": [{
|
||||
"pagePath": "/pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "/images/footer-icon-01.png",
|
||||
"selectedIconPath": "/images/footer-icon-01-active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/news/index",
|
||||
"iconPath": "/images/footer-icon-05.png",
|
||||
"selectedIconPath": "/images/footer-icon-05-active.png",
|
||||
"text": "资讯"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/my/index",
|
||||
"text": "我的",
|
||||
"iconPath": "/images/footer-icon-04.png",
|
||||
"selectedIconPath": "/images/footer-icon-04-active.png"
|
||||
}
|
||||
]
|
||||
})
|
||||
sel = 3; // 在特殊权限菜单中,"我的"选项索引为3
|
||||
} else {
|
||||
that0.getTabBar().setData({
|
||||
"list": [{
|
||||
"pagePath": "/pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "/images/footer-icon-01.png",
|
||||
"selectedIconPath": "/images/footer-icon-01-active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/news/index",
|
||||
"iconPath": "/images/footer-icon-05.png",
|
||||
"selectedIconPath": "/images/footer-icon-05-active.png",
|
||||
"text": "资讯"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/business/index",
|
||||
"iconPath": "/images/footer-icon-02.png",
|
||||
"selectedIconPath": "/images/footer-icon-02-active.png",
|
||||
"text": "门店"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/my/index",
|
||||
"text": "我的",
|
||||
"iconPath": "/images/footer-icon-04.png",
|
||||
"selectedIconPath": "/images/footer-icon-04-active.png"
|
||||
}
|
||||
]
|
||||
})
|
||||
sel = 4; // 在普通菜单中,"我的"选项索引为4
|
||||
}
|
||||
|
||||
// 只设置选中状态,菜单列表由全局配置管理
|
||||
that0.getTabBar().setData({
|
||||
selected: sel
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user