添加物业费支付页面、活动状态报名显示、车位参数
This commit is contained in:
@@ -102,33 +102,35 @@
|
||||
onMounted(() => {})
|
||||
|
||||
// 扫码
|
||||
const scanCode = async () => {
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: '扫码中...',
|
||||
mask: true
|
||||
})
|
||||
const scanCode = () => {
|
||||
// uni.showLoading({
|
||||
// title: '扫码中...',
|
||||
// mask: true
|
||||
// })
|
||||
|
||||
const res = await uni.scanCode({
|
||||
onlyFromCamera: false,
|
||||
scanType: ['qrCode', 'barCode']
|
||||
})
|
||||
|
||||
// 扫码成功,赋值
|
||||
deviceNo.value = res.result
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '扫码成功',
|
||||
icon: 'success'
|
||||
})
|
||||
} catch (err) {
|
||||
uni.hideLoading()
|
||||
console.log('扫码失败', err)
|
||||
uni.showToast({
|
||||
title: '扫码取消/失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
uni.scanCode({
|
||||
onlyFromCamera: false,
|
||||
scanType: ['qrCode', 'barCode'],
|
||||
success: (res) => {
|
||||
// uni.hideLoading()
|
||||
console.log('扫码成功', res)
|
||||
// 过滤模拟器/调试模式返回的 mock 数据
|
||||
if (!res.result || res.result.toUpperCase() === 'TEST') {
|
||||
uni.showToast({ title: '扫码识别失败,请手动输入设备号', icon: 'none' })
|
||||
return
|
||||
}
|
||||
deviceNo.value = res.result
|
||||
uni.showToast({ title: '扫码成功', icon: 'success' })
|
||||
},
|
||||
fail: (err) => {
|
||||
// uni.hideLoading()
|
||||
console.log('扫码失败', err)
|
||||
uni.showToast({ title: '扫码取消/失败', icon: 'none' })
|
||||
},
|
||||
complete: () => {
|
||||
// uni.hideLoading()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 提交缴费
|
||||
|
||||
Reference in New Issue
Block a user