This commit is contained in:
parent
a5feed46f7
commit
04ba0ed1bf
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue