微信小程序 提审时隐藏功能;微信小程序添加微信快捷登录、随便看看(登的user用户)
This commit is contained in:
55
weixin-miniprogram/custom-tab-bar/index.js
Normal file
55
weixin-miniprogram/custom-tab-bar/index.js
Normal file
@@ -0,0 +1,55 @@
|
||||
Component({
|
||||
data: {
|
||||
selected: 0,
|
||||
color: "#000000",
|
||||
selectedColor: "#FF8966",
|
||||
list: null, // 在 toggleCustomTabBar.js 中动态设置下面的菜单项
|
||||
rawList: [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "image/icon/_home.png",
|
||||
"selectedIconPath": "image/icon/home.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/residents/code",
|
||||
"text": "进出码",
|
||||
"iconPath": "image/icon/_code.png",
|
||||
"selectedIconPath": "image/icon/code.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/residents/report",
|
||||
"text": "体温上报",
|
||||
"iconPath": "image/icon/_report.png",
|
||||
"selectedIconPath": "image/icon/report.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/shop/shop",
|
||||
"text": "生活物资",
|
||||
"iconPath": "image/icon/_shopping.png",
|
||||
"selectedIconPath": "image/icon/shopping.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/person/person",
|
||||
"text": "我",
|
||||
"iconPath": "image/icon/_person.png",
|
||||
"selectedIconPath": "image/icon/person.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
onShow() {
|
||||
console.log("[CustomTabBar] onLoad")
|
||||
},
|
||||
attached() {
|
||||
},
|
||||
methods: {
|
||||
switchTab(e) {
|
||||
const data = e.currentTarget.dataset
|
||||
const url = '/' + data.path
|
||||
wx.switchTab({ url })
|
||||
this.setData({
|
||||
selected: data.index
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user