维修上传修复
This commit is contained in:
parent
e9200dd520
commit
47c79129ca
|
|
@ -457,35 +457,27 @@ const uploadSignUrlFj = (file, item) => {
|
|||
},
|
||||
success: (uploadRes) => {
|
||||
console.log("xxxxxxxxxx",uploadRes)
|
||||
let urlObj = null
|
||||
if(!uploadRes.data.code){
|
||||
uploadRes = JSON.parse(decryptWithSM4(uploadRes.data))
|
||||
urlObj = JSON.parse(decryptWithSM4(uploadRes.data))
|
||||
}else{
|
||||
uploadRes =JSON.parse(uploadRes.data)
|
||||
}
|
||||
console.log('🚀 ~ uploadSignUrlFj ~ uploadRes:', urlObj)
|
||||
|
||||
if (uploadRes.code && uploadRes.code == 200) {
|
||||
if (urlObj.code && urlObj.code == 200) {
|
||||
let obj = {
|
||||
name: uploadRes.data.name,
|
||||
url: uploadRes.data.url,
|
||||
name: urlObj.data.name,
|
||||
url: urlObj.data.url,
|
||||
}
|
||||
if (item == 'part') {
|
||||
partFileList.value = [obj]
|
||||
partImgUrl = uploadRes.data.url
|
||||
partImgUrl.value = urlObj.data.url
|
||||
} else if (item == 'ret') {
|
||||
returnFileList.value = [obj]
|
||||
returnImgUrl = uploadRes.data.url
|
||||
returnImgUrl.value = urlObj.data.url
|
||||
}
|
||||
// item.bmFileInfos = [obj]
|
||||
// item.imgBeseUrl = uploadRes.data.url
|
||||
// imgList.value.push({
|
||||
// url: uploadRes.data.url, // Show local path first
|
||||
// serverUrl: uploadRes.data.url // Store server URL
|
||||
// })
|
||||
// bmFileInfos.value.push({
|
||||
// name: uploadRes.data.name,
|
||||
// url: uploadRes.data.url,
|
||||
// taskType: '10'
|
||||
// })
|
||||
|
||||
uni.showToast({ title: '上传成功', icon: 'none' })
|
||||
} else {
|
||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||
|
|
|
|||
|
|
@ -436,10 +436,10 @@ const uploadSignUrlFj = (file, item) => {
|
|||
}
|
||||
if (item == 'part') {
|
||||
partFileList.value = [obj]
|
||||
partImgUrl = uploadRes.data.url
|
||||
partImgUrl.value = uploadRes.data.url
|
||||
} else if (item == 'ret') {
|
||||
returnFileList.value = [obj]
|
||||
returnImgUrl = uploadRes.data.url
|
||||
returnImgUrl.value = uploadRes.data.url
|
||||
}
|
||||
// item.bmFileInfos = [obj]
|
||||
// item.imgBeseUrl = uploadRes.data.url
|
||||
|
|
|
|||
Loading…
Reference in New Issue