1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

首页添加 扫门禁码 按钮

This commit is contained in:
程序员小墨 2023-04-15 23:56:15 +08:00
parent a6580355a2
commit 67e18187c0
4 changed files with 139 additions and 123 deletions

View File

@ -1,6 +1,6 @@
还要做的部分
【想一想访客怎么处理】
购物车隐藏
@ -18,8 +18,9 @@
后台管理两个端分开
小程序提审(项目部署到服务器,提审时隐藏小商店)
项目部署到服务器
& 小程序提审(提审时隐藏小商店)
& 发给老班看一看
数据库填充测试数据(以及创建一些测试账号)并备份,线上演示数据修改删除避免真删
@ -29,7 +30,7 @@
# IP 配置
内网穿透124.220.172.110
内网穿透106.75.217.14
nacos106.75.217.14
数据库:本地

View 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

View File

@ -2,6 +2,8 @@
const menuItemDict = require('../../utils/menuList.js')
const getUserGroupByRole = require('../../utils/getUserGroupByRole.js')
import scanQRCode from '../../utils/scanQRCode'
const app = getApp()
Page({
@ -144,6 +146,11 @@ Page({
url: dataset.pageurl
})
break;
case 'function':
if (dataset.pageurl == 'scanQRCode') {
scanQRCode(wx)
}
break;
default:
console.log("切换页面失败", dataset)
break;

View File

@ -1,119 +1,126 @@
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
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'
},
'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