diff --git a/src/pages/back/backCode.vue b/src/pages/back/backCode.vue index 7cfa942..70684cb 100644 --- a/src/pages/back/backCode.vue +++ b/src/pages/back/backCode.vue @@ -219,7 +219,7 @@ const scanStart = async () => { // 处理扫描成功事件 const handleScanSuccess = (result) => { - qrCode.value = result?.text || '' + qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text if (qrCode.value === '') { uni.showToast({ title: '扫码识别失败', icon: 'none' }) } else { diff --git a/src/pages/back/backCodeAdd.vue b/src/pages/back/backCodeAdd.vue index 98e9447..ae33ebd 100644 --- a/src/pages/back/backCodeAdd.vue +++ b/src/pages/back/backCodeAdd.vue @@ -279,7 +279,7 @@ const uploadImg = () => { // 处理扫描成功事件 const handleScanSuccess = (result) => { - qrCode.value = result?.text || '' + qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text if (qrCode.value === '') { uni.showToast({ title: '扫码识别失败', icon: 'none' }) } else { diff --git a/src/pages/my/signature.vue b/src/pages/my/signature.vue index f6f2d96..40cc509 100644 --- a/src/pages/my/signature.vue +++ b/src/pages/my/signature.vue @@ -178,6 +178,7 @@ const onCameraError = (message) => { const onCameraSuccess = (file) => { // const file1 = "data:image/jpeg;base64," + file; const file1 = file + uni.showToast({ title: file, icon: 'none', duration: 20000 }) let params = { image: file1, jiju_type: '', @@ -186,47 +187,47 @@ const onCameraSuccess = (file) => { } console.log('🚀 ~ onCameraSuccess ~ params:', params) - try { - const signUrl = params - if (opts.isLease) { - const params = { - id: opts.id, - leaseSignUrl: signUrl, - leaseSignType: signType.value, - } - console.log('🚀 ~ success: ~ params:', params) - updateLeaseApplyInfoSign(params).then((res) => { - console.log('🚀 ~ uploadImg-领料 ~ res:', res) - uni.navigateBack() - }) - } else if (opts.isBack) { - const params = { - id: opts.id, - backSignUrl: signUrl, - backSignType: signType.value, - } - console.log('🚀 ~ success: ~ params:', params) - updateSignById(params).then((res) => { - console.log('🚀 ~ uploadImg-退料 ~ res:', res) - uni.navigateBack() - }) - } else { - const params = { - signUrl: signUrl, - signType: signType.value, - } - updateSign(params).then((res) => { - console.log('🚀 ~ uploadImg-个人中心 ~ res:', res) - getSignData() - }) - } - } catch (error) { - console.log('🚀 ~ uploadImg ~ error:', error) - uni.showToast({ - title: '上传失败', - icon: 'none', - }) - } + // try { + // const signUrl = params + // if (opts.isLease) { + // const params = { + // id: opts.id, + // leaseSignUrl: signUrl, + // leaseSignType: signType.value, + // } + // console.log('🚀 ~ success: ~ params:', params) + // updateLeaseApplyInfoSign(params).then((res) => { + // console.log('🚀 ~ uploadImg-领料 ~ res:', res) + // uni.navigateBack() + // }) + // } else if (opts.isBack) { + // const params = { + // id: opts.id, + // backSignUrl: signUrl, + // backSignType: signType.value, + // } + // console.log('🚀 ~ success: ~ params:', params) + // updateSignById(params).then((res) => { + // console.log('🚀 ~ uploadImg-退料 ~ res:', res) + // uni.navigateBack() + // }) + // } else { + // const params = { + // signUrl: signUrl, + // signType: signType.value, + // } + // updateSign(params).then((res) => { + // console.log('🚀 ~ uploadImg-个人中心 ~ res:', res) + // getSignData() + // }) + // } + // } catch (error) { + // console.log('🚀 ~ uploadImg ~ error:', error) + // uni.showToast({ + // title: '上传失败', + // icon: 'none', + // }) + // } } // 上传 const uploadImg2 = async (base64Data) => { diff --git a/src/pages/repair/testedInBound/codeList.vue b/src/pages/repair/testedInBound/codeList.vue index 3f316ff..f864537 100644 --- a/src/pages/repair/testedInBound/codeList.vue +++ b/src/pages/repair/testedInBound/codeList.vue @@ -166,7 +166,7 @@ const codeScan = async () => { // 处理扫描成功事件 const handleScanSuccess = (result) => { - qrCode.value = result?.text || '' + qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text if (qrCode.value === '') { uni.showToast({ title: '扫码识别失败', icon: 'none' }) } else { diff --git a/src/pages/repair/testedInBound/codeScan.vue b/src/pages/repair/testedInBound/codeScan.vue index 7903d6f..80a039e 100644 --- a/src/pages/repair/testedInBound/codeScan.vue +++ b/src/pages/repair/testedInBound/codeScan.vue @@ -126,7 +126,7 @@ const codeScan = () => { // 处理扫描成功事件 const handleScanSuccess = (result) => { - qrCode.value = result?.text || '' + qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text if (qrCode.value === '') { uni.showToast({ title: '扫码识别失败', icon: 'none' }) } else {