首页添加 扫门禁码 按钮
This commit is contained in:
parent
a6580355a2
commit
67e18187c0
9
TODOs.md
9
TODOs.md
@ -1,6 +1,6 @@
|
|||||||
还要做的部分
|
还要做的部分
|
||||||
|
|
||||||
|
【想一想访客怎么处理】
|
||||||
|
|
||||||
购物车隐藏
|
购物车隐藏
|
||||||
|
|
||||||
@ -18,8 +18,9 @@
|
|||||||
|
|
||||||
后台管理两个端分开
|
后台管理两个端分开
|
||||||
|
|
||||||
小程序提审(项目部署到服务器,提审时隐藏小商店)
|
项目部署到服务器
|
||||||
|
& 小程序提审(提审时隐藏小商店)
|
||||||
|
& 发给老班看一看
|
||||||
|
|
||||||
数据库填充测试数据(以及创建一些测试账号)并备份,线上演示数据修改删除避免真删
|
数据库填充测试数据(以及创建一些测试账号)并备份,线上演示数据修改删除避免真删
|
||||||
|
|
||||||
@ -29,7 +30,7 @@
|
|||||||
|
|
||||||
# IP 配置
|
# IP 配置
|
||||||
|
|
||||||
内网穿透:124.220.172.110
|
内网穿透:106.75.217.14
|
||||||
nacos:106.75.217.14
|
nacos:106.75.217.14
|
||||||
数据库:本地
|
数据库:本地
|
||||||
|
|
||||||
|
1
weixin-miniprogram/image/icon/scan.svg
Normal file
1
weixin-miniprogram/image/icon/scan.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1681574114426" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2661" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M242 512c0 24.8 20.2 45 45 45h450c24.8 0 45-20.2 45-45s-20.2-45-45-45H287c-24.8 0-45 20.2-45 45zM842 62H632c-24.9 0-45 20.1-45 45s20.1 45 45 45h180c33.1 0 60 26.9 60 60v180c0 24.9 20.1 45 45 45s45-20.1 45-45V182c0-66.3-53.7-120-120-120zM107 437c24.9 0 45-20.1 45-45V212c0-33.1 26.9-60 60-60h180c24.9 0 45-20.1 45-45s-20.1-45-45-45H182c-66.3 0-120 53.7-120 120v210c0 24.9 20.1 45 45 45zM392 872H212c-33.1 0-60-26.9-60-60V632c0-24.9-20.1-45-45-45s-45 20.1-45 45v210c0 66.3 53.7 120 120 120h210c24.9 0 45-20.1 45-45s-20.1-45-45-45zM917 587c-24.9 0-45 20.1-45 45v180c0 33.1-26.9 60-60 60H632c-24.9 0-45 20.1-45 45s20.1 45 45 45h210c66.3 0 120-53.7 120-120V632c0-24.9-20.1-45-45-45z" fill="#FF6031" p-id="2662"></path></svg>
|
After Width: | Height: | Size: 1.0 KiB |
@ -2,6 +2,8 @@
|
|||||||
const menuItemDict = require('../../utils/menuList.js')
|
const menuItemDict = require('../../utils/menuList.js')
|
||||||
const getUserGroupByRole = require('../../utils/getUserGroupByRole.js')
|
const getUserGroupByRole = require('../../utils/getUserGroupByRole.js')
|
||||||
|
|
||||||
|
import scanQRCode from '../../utils/scanQRCode'
|
||||||
|
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
@ -144,6 +146,11 @@ Page({
|
|||||||
url: dataset.pageurl
|
url: dataset.pageurl
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
|
case 'function':
|
||||||
|
if (dataset.pageurl == 'scanQRCode') {
|
||||||
|
scanQRCode(wx)
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("切换页面失败", dataset)
|
console.log("切换页面失败", dataset)
|
||||||
break;
|
break;
|
||||||
|
@ -1,119 +1,126 @@
|
|||||||
const switchTab = "switchTab";
|
const switchTab = "switchTab";
|
||||||
const navigateTo = "navigateTo";
|
const navigateTo = "navigateTo";
|
||||||
const redirectTo = "redirectTo";
|
const redirectTo = "redirectTo";
|
||||||
let id = 0;
|
let id = 0;
|
||||||
|
|
||||||
let menuItemDict = {
|
let menuItemDict = {
|
||||||
'login': {
|
'login': {
|
||||||
for: ['unknown'],
|
for: ['unknown'],
|
||||||
title: "登录",
|
title: "登录",
|
||||||
image: "code.png",
|
image: "code.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: '/pages/index/login',
|
url: '/pages/index/login',
|
||||||
},
|
},
|
||||||
'code': {
|
'code': {
|
||||||
for: ['visitor', 'user'],
|
for: ['visitor', 'user'],
|
||||||
title: "进出码",
|
title: "进出码",
|
||||||
image: "code.png",
|
image: "code.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: '/pages/residents/code'
|
url: '/pages/residents/code'
|
||||||
},
|
},
|
||||||
'report': {
|
'gateCode': {
|
||||||
for: ['user'],
|
for: ['visitor', 'user'],
|
||||||
title: "体温上报",
|
title: "扫门禁码",
|
||||||
image: "report.png",
|
image: "scan.svg",
|
||||||
switchFunc: switchTab,
|
switchFunc: "function",
|
||||||
url: '/pages/residents/report'
|
url: 'scanQRCode'
|
||||||
},
|
},
|
||||||
'shop': {
|
'report': {
|
||||||
for: ['user'],
|
for: ['user'],
|
||||||
title: "生活物资",
|
title: "体温上报",
|
||||||
image: "shopping.svg",
|
image: "report.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: '/pages/shop/shop'
|
url: '/pages/residents/report'
|
||||||
},
|
},
|
||||||
'apply-record': {
|
'shop': {
|
||||||
for: ['visitor'],
|
for: ['user'],
|
||||||
title: "申请记录",
|
title: "生活物资",
|
||||||
image: "apply.png",
|
image: "shopping.svg",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: '/pages/shop/shop'
|
||||||
},
|
},
|
||||||
'apply-approval': {
|
'apply-record': {
|
||||||
for: ['admin'],
|
for: ['visitor'],
|
||||||
title: "申请审批",
|
title: "申请记录",
|
||||||
image: "apply.png", // ApplyReplay
|
image: "apply.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: ''
|
||||||
},
|
},
|
||||||
'visitor-apply': {
|
'apply-approval': {
|
||||||
for: ['admin'],
|
for: ['admin'],
|
||||||
title: "访客审批",
|
title: "申请审批",
|
||||||
image: "visitor.png",
|
image: "apply.png", // ApplyReplay
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: ''
|
||||||
},
|
},
|
||||||
'abnormal': {
|
'visitor-apply': {
|
||||||
for: ['admin'],
|
for: ['admin'],
|
||||||
title: "异常人员",
|
title: "访客审批",
|
||||||
image: "danger.png",
|
image: "visitor.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: ''
|
||||||
},
|
},
|
||||||
'feedback-submit': {
|
'abnormal': {
|
||||||
for: ['visitor'],
|
for: ['admin'],
|
||||||
title: "提交反馈",
|
title: "异常人员",
|
||||||
image: "fk.png",
|
image: "danger.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: ''
|
||||||
},
|
},
|
||||||
'feedback-list': {
|
'feedback-submit': {
|
||||||
for: ['visitor'],
|
for: ['visitor'],
|
||||||
title: "反馈查看",
|
title: "提交反馈",
|
||||||
image: "feedback.png",
|
image: "fk.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: ''
|
||||||
},
|
},
|
||||||
'feedback-reply': {
|
'feedback-list': {
|
||||||
for: ['admin'],
|
for: ['visitor'],
|
||||||
title: "反馈回复",
|
title: "反馈查看",
|
||||||
image: "feedback.png",
|
image: "feedback.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: ''
|
||||||
},
|
},
|
||||||
'person': {
|
'feedback-reply': {
|
||||||
for: ['admin', 'user'],
|
for: ['admin'],
|
||||||
title: "个人中心",
|
title: "反馈回复",
|
||||||
image: "person.png",
|
image: "feedback.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: '/pages/person/person'
|
url: ''
|
||||||
},
|
},
|
||||||
'update-password': {
|
'person': {
|
||||||
for: ['user', 'admin'],
|
for: ['admin', 'user'],
|
||||||
title: "密码修改",
|
title: "个人中心",
|
||||||
image: "updPwd.png",
|
image: "person.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: '/pages/person/person'
|
||||||
},
|
},
|
||||||
'assign': {
|
'update-password': {
|
||||||
for: ['admin'],
|
for: ['user', 'admin'],
|
||||||
title: "分配账号",
|
title: "密码修改",
|
||||||
image: "count.png",
|
image: "updPwd.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: ''
|
||||||
},
|
},
|
||||||
'unfinish': {
|
'assign': {
|
||||||
for: ['admin'],
|
for: ['admin'],
|
||||||
title: "今日未填", // RedList
|
title: "分配账号",
|
||||||
image: "_report.png",
|
image: "count.png",
|
||||||
switchFunc: switchTab,
|
switchFunc: switchTab,
|
||||||
url: ''
|
url: ''
|
||||||
}
|
},
|
||||||
}
|
'unfinish': {
|
||||||
let keys = Object.keys(menuItemDict);
|
for: ['admin'],
|
||||||
for (let key of keys) {
|
title: "今日未填", // RedList
|
||||||
menuItemDict[key].id = id++;
|
image: "_report.png",
|
||||||
menuItemDict[key].addDot = false;
|
switchFunc: switchTab,
|
||||||
}
|
url: ''
|
||||||
|
}
|
||||||
module.exports = menuItemDict
|
}
|
||||||
|
let keys = Object.keys(menuItemDict);
|
||||||
|
for (let key of keys) {
|
||||||
|
menuItemDict[key].id = id++;
|
||||||
|
menuItemDict[key].addDot = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = menuItemDict
|
||||||
|
Loading…
Reference in New Issue
Block a user