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

141 lines
3.1 KiB
JavaScript
Raw Permalink Normal View History

2023-04-15 23:56:15 +08:00
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'
},
'gateCode': {
for: ['visitor', 'user'],
title: "扫门禁码",
image: "scan.svg",
switchFunc: "function",
url: 'scanQRCode'
},
'report': {
for: ['user'],
title: "体温上报",
image: "report.png",
switchFunc: switchTab,
url: '/pages/residents/report'
},
2023-04-18 01:16:44 +08:00
'reportHistory': {
for: ['user'],
title: "体温上报历史记录",
image: "history.svg",
switchFunc: navigateTo,
url: '/pages/residents/reportHistory'
},
2023-04-15 23:56:15 +08:00
'shop': {
for: ['user'],
title: "生活物资",
image: "shopping.svg",
switchFunc: switchTab,
url: '/pages/shop/shop'
},
'myOrder': {
for: ['user'],
title: "我的订单",
image: "order.svg",
switchFunc: navigateTo,
url: '/pages/shop/myOrder'
},
// '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: ''
// },
2023-04-15 23:56:15 +08:00
'person': {
for: ['admin', 'user'],
title: "个人中心",
image: "person.png",
switchFunc: switchTab,
url: '/pages/person/person'
},
'update-password': {
for: ['user', 'admin'],
2023-04-17 18:46:15 +08:00
title: "修改密码",
2023-04-15 23:56:15 +08:00
image: "updPwd.png",
2023-04-17 18:46:15 +08:00
switchFunc: navigateTo,
url: '/pages/person/updpwd'
2023-04-15 23:56:15 +08:00
},
// 'assign': {
// for: ['admin'],
// title: "分配账号",
// image: "count.png",
// switchFunc: switchTab,
// url: ''
// },
// 'unfinish': {
// for: ['admin'],
// title: "今日未填", // RedList
// image: "_report.png",
// switchFunc: switchTab,
// url: ''
// }
2023-04-15 23:56:15 +08:00
}
let keys = Object.keys(menuItemDict);
for (let key of keys) {
menuItemDict[key].id = id++;
menuItemDict[key].addDot = false;
}
module.exports = menuItemDict