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

创建新的小程序,进出码,体温上报功能迁移基本完成

This commit is contained in:
2023-03-17 04:55:02 +08:00
parent 5b98be9bf9
commit b7bf3bfc15
88 changed files with 4337 additions and 276 deletions

View File

@@ -0,0 +1,25 @@
function scanQRCode(Taro) {
// 只允许从相机扫码
Taro.scanCode({
onlyFromCamera: true,
success(res) {
console.log(res)
if (res.scanType == "WX_CODE" && res.path) {
let searchParams = res.path.split('?');
if (searchParams.length > 1 && searchParams[1].startsWith('scene=guard')) {
Taro.navigateTo({
url: "/pages/scan/entrance"
})
return
}
}
Taro.showToast({
title: "您扫描的不是门禁码",
icon: 'error',
duration: 2000
})
}
})
}
module.exports = scanQRCode;