二手车交易,上传照片抛出异常
This commit is contained in:
@ -84,13 +84,12 @@ export default {
|
||||
},
|
||||
async handleFileRead(file) {
|
||||
const formData = new FormData();
|
||||
console.log("file.file",file.file)
|
||||
if(!file.file){
|
||||
this.$toast('获取文件失败,请重新上传')
|
||||
}
|
||||
formData.append("file", file.file);
|
||||
let res = await uploadImage(formData);
|
||||
/* try {
|
||||
console.log("res", res)
|
||||
} catch (e) {
|
||||
console.log("e", e)
|
||||
}*/
|
||||
// 为文件添加唯一标识符
|
||||
file.uid = Date.now(); // 使用时间戳作为唯一标识符
|
||||
if (this.text == '行驶证照片') {
|
||||
|
Reference in New Issue
Block a user