This commit is contained in:
parent
a5feed46f7
commit
04ba0ed1bf
|
|
@ -219,7 +219,7 @@ const scanStart = async () => {
|
||||||
|
|
||||||
// 处理扫描成功事件
|
// 处理扫描成功事件
|
||||||
const handleScanSuccess = (result) => {
|
const handleScanSuccess = (result) => {
|
||||||
qrCode.value = result?.text || ''
|
qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||||
if (qrCode.value === '') {
|
if (qrCode.value === '') {
|
||||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ const uploadImg = () => {
|
||||||
|
|
||||||
// 处理扫描成功事件
|
// 处理扫描成功事件
|
||||||
const handleScanSuccess = (result) => {
|
const handleScanSuccess = (result) => {
|
||||||
qrCode.value = result?.text || ''
|
qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||||
if (qrCode.value === '') {
|
if (qrCode.value === '') {
|
||||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -178,6 +178,7 @@ const onCameraError = (message) => {
|
||||||
const onCameraSuccess = (file) => {
|
const onCameraSuccess = (file) => {
|
||||||
// const file1 = "data:image/jpeg;base64," + file;
|
// const file1 = "data:image/jpeg;base64," + file;
|
||||||
const file1 = file
|
const file1 = file
|
||||||
|
uni.showToast({ title: file, icon: 'none', duration: 20000 })
|
||||||
let params = {
|
let params = {
|
||||||
image: file1,
|
image: file1,
|
||||||
jiju_type: '',
|
jiju_type: '',
|
||||||
|
|
@ -186,47 +187,47 @@ const onCameraSuccess = (file) => {
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ onCameraSuccess ~ params:', params)
|
console.log('🚀 ~ onCameraSuccess ~ params:', params)
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
const signUrl = params
|
// const signUrl = params
|
||||||
if (opts.isLease) {
|
// if (opts.isLease) {
|
||||||
const params = {
|
// const params = {
|
||||||
id: opts.id,
|
// id: opts.id,
|
||||||
leaseSignUrl: signUrl,
|
// leaseSignUrl: signUrl,
|
||||||
leaseSignType: signType.value,
|
// leaseSignType: signType.value,
|
||||||
}
|
// }
|
||||||
console.log('🚀 ~ success: ~ params:', params)
|
// console.log('🚀 ~ success: ~ params:', params)
|
||||||
updateLeaseApplyInfoSign(params).then((res) => {
|
// updateLeaseApplyInfoSign(params).then((res) => {
|
||||||
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
// console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
||||||
uni.navigateBack()
|
// uni.navigateBack()
|
||||||
})
|
// })
|
||||||
} else if (opts.isBack) {
|
// } else if (opts.isBack) {
|
||||||
const params = {
|
// const params = {
|
||||||
id: opts.id,
|
// id: opts.id,
|
||||||
backSignUrl: signUrl,
|
// backSignUrl: signUrl,
|
||||||
backSignType: signType.value,
|
// backSignType: signType.value,
|
||||||
}
|
// }
|
||||||
console.log('🚀 ~ success: ~ params:', params)
|
// console.log('🚀 ~ success: ~ params:', params)
|
||||||
updateSignById(params).then((res) => {
|
// updateSignById(params).then((res) => {
|
||||||
console.log('🚀 ~ uploadImg-退料 ~ res:', res)
|
// console.log('🚀 ~ uploadImg-退料 ~ res:', res)
|
||||||
uni.navigateBack()
|
// uni.navigateBack()
|
||||||
})
|
// })
|
||||||
} else {
|
// } else {
|
||||||
const params = {
|
// const params = {
|
||||||
signUrl: signUrl,
|
// signUrl: signUrl,
|
||||||
signType: signType.value,
|
// signType: signType.value,
|
||||||
}
|
// }
|
||||||
updateSign(params).then((res) => {
|
// updateSign(params).then((res) => {
|
||||||
console.log('🚀 ~ uploadImg-个人中心 ~ res:', res)
|
// console.log('🚀 ~ uploadImg-个人中心 ~ res:', res)
|
||||||
getSignData()
|
// getSignData()
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
} catch (error) {
|
// } catch (error) {
|
||||||
console.log('🚀 ~ uploadImg ~ error:', error)
|
// console.log('🚀 ~ uploadImg ~ error:', error)
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '上传失败',
|
// title: '上传失败',
|
||||||
icon: 'none',
|
// icon: 'none',
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
// 上传
|
// 上传
|
||||||
const uploadImg2 = async (base64Data) => {
|
const uploadImg2 = async (base64Data) => {
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ const codeScan = async () => {
|
||||||
|
|
||||||
// 处理扫描成功事件
|
// 处理扫描成功事件
|
||||||
const handleScanSuccess = (result) => {
|
const handleScanSuccess = (result) => {
|
||||||
qrCode.value = result?.text || ''
|
qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||||
if (qrCode.value === '') {
|
if (qrCode.value === '') {
|
||||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ const codeScan = () => {
|
||||||
|
|
||||||
// 处理扫描成功事件
|
// 处理扫描成功事件
|
||||||
const handleScanSuccess = (result) => {
|
const handleScanSuccess = (result) => {
|
||||||
qrCode.value = result?.text || ''
|
qrCodeScan.value = result?.text?.split('?qrcode=')[1] || result?.text
|
||||||
if (qrCode.value === '') {
|
if (qrCode.value === '') {
|
||||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue