1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
epp/weixin-miniprogram/utils/menuList.js

120 lines
2.5 KiB
JavaScript
Raw Normal View History

const switchTab = "switchTab";
const navigateTo = "navigateTo";
const redirectTo = "redirectTo";
let id = 0;
let menuItemDict = {
'login': {
for: ['unknown'],
title: "登录",
image: "code.png",
switchFunc: switchTab,
url: '/pages/index/login',
},
'code': {
for: ['visitor', 'user'],
title: "进出码",
image: "code.png",
switchFunc: switchTab,
url: '/pages/residents/code'
},
'report': {
for: ['user'],
title: "体温上报",
image: "report.png",
switchFunc: switchTab,
url: '/pages/residents/report'
},
'shop': {
for: ['user'],
title: "生活物资",
image: "shopping.svg",
switchFunc: switchTab,
url: '/pages/shop/shop'
},
'apply-record': {
for: ['visitor'],
title: "申请记录",
image: "apply.png",
switchFunc: switchTab,
url: ''
},
'apply-approval': {
for: ['admin'],
title: "申请审批",
image: "apply.png", // ApplyReplay
switchFunc: switchTab,
url: ''
},
'visitor-apply': {
for: ['admin'],
title: "访客审批",
image: "visitor.png",
switchFunc: switchTab,
url: ''
},
'abnormal': {
for: ['admin'],
title: "异常人员",
image: "danger.png",
switchFunc: switchTab,
url: ''
},
'feedback-submit': {
for: ['visitor'],
title: "提交反馈",
image: "fk.png",
switchFunc: switchTab,
url: ''
},
'feedback-list': {
for: ['visitor'],
title: "反馈查看",
image: "feedback.png",
switchFunc: switchTab,
url: ''
},
'feedback-reply': {
for: ['admin'],
title: "反馈回复",
image: "feedback.png",
switchFunc: switchTab,
url: ''
},
'person': {
for: ['admin', 'user'],
title: "个人中心",
image: "person.png",
switchFunc: switchTab,
url: '/pages/person/person'
},
'update-password': {
for: ['user', 'admin'],
title: "密码修改",
image: "updPwd.png",
switchFunc: switchTab,
url: ''
},
'assign': {
for: ['admin'],
title: "分配账号",
image: "count.png",
switchFunc: switchTab,
url: ''
},
'unfinish': {
for: ['admin'],
title: "今日未填", // RedList
image: "_report.png",
switchFunc: switchTab,
url: ''
}
}
let keys = Object.keys(menuItemDict);
for (let key of keys) {
menuItemDict[key].id = id++;
menuItemDict[key].addDot = false;
}
module.exports = menuItemDict