标准箱扫码
This commit is contained in:
parent
7b2eab096b
commit
f612407fd5
|
|
@ -18,11 +18,11 @@ const scanQrCode = () => {
|
||||||
window.cordova.plugins.zxingScan.startScan(
|
window.cordova.plugins.zxingScan.startScan(
|
||||||
(successResult) => {
|
(successResult) => {
|
||||||
console.log('🚀 ~ 二维码 ~ successResult:', successResult)
|
console.log('🚀 ~ 二维码 ~ successResult:', successResult)
|
||||||
emit('scanSuccess', successResult)
|
emit('scanSuccessBox', successResult)
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
console.log('🚀 ~ 二维码 ~ error:', error)
|
console.log('🚀 ~ 二维码 ~ error:', error)
|
||||||
emit('scanError', new Error(`扫描失败: ${error}`))
|
emit('scanErrorBox', new Error(`扫描失败: ${error}`))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
isPlayBeep: true, //是否播放扫描声音
|
isPlayBeep: true, //是否播放扫描声音
|
||||||
|
|
|
||||||
|
|
@ -477,6 +477,7 @@ const boxScan = async () => {
|
||||||
const handleScanSuccessBox = (result) => {
|
const handleScanSuccessBox = (result) => {
|
||||||
console.log('🚀 ~ handleScanSuccessBox ~ result:', result)
|
console.log('🚀 ~ handleScanSuccessBox ~ result:', result)
|
||||||
boxCode.value = result?.data?.split('?qrcode=')[1] || result?.data || ''
|
boxCode.value = result?.data?.split('?qrcode=')[1] || result?.data || ''
|
||||||
|
console.log('🚀 ~ handleScanSuccessBox ~ boxCode.value:', boxCode.value)
|
||||||
if (boxCode.value === '') {
|
if (boxCode.value === '') {
|
||||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -500,7 +501,7 @@ const boxOut = async () => {
|
||||||
boxCode: boxCode.value,
|
boxCode: boxCode.value,
|
||||||
maTypeId: queryParams.value.typeId,
|
maTypeId: queryParams.value.typeId,
|
||||||
}
|
}
|
||||||
console.log(param)
|
console.log('🚀 ~ boxOut ~ param:', param)
|
||||||
const res = await getBoxBindByCode(param)
|
const res = await getBoxBindByCode(param)
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue