submit
This commit is contained in:
parent
320285403d
commit
53f297ed93
@ -260,12 +260,10 @@ export default {
|
|||||||
filePath: url,
|
filePath: url,
|
||||||
name: "file",
|
name: "file",
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
console.log(res,'res')
|
||||||
const { path } = JSON.parse(res.data).data;
|
const { path } = JSON.parse(res.data).data;
|
||||||
console.log('@@@@', path)
|
|
||||||
resolve(path);
|
resolve(path);
|
||||||
if (type === 'check') {
|
|
||||||
this.chenckId(path)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -278,9 +276,9 @@ export default {
|
|||||||
async afterRead(event) {
|
async afterRead(event) {
|
||||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
let lists = [].concat(event.file)
|
let lists = [].concat(event.file)
|
||||||
let fileListLen = this[`fileList`].length
|
let fileListLen = this[`fileList1`].length
|
||||||
lists.map((item) => {
|
lists.map((item) => {
|
||||||
this[`fileList`].push({
|
this[`fileList1`].push({
|
||||||
...item,
|
...item,
|
||||||
status: 'uploading',
|
status: 'uploading',
|
||||||
message: '上传中'
|
message: '上传中'
|
||||||
@ -289,8 +287,8 @@ export default {
|
|||||||
for (let i = 0; i < lists.length; i++) {
|
for (let i = 0; i < lists.length; i++) {
|
||||||
const result = await this.uploadFilePromise(lists[i].url, 'check')
|
const result = await this.uploadFilePromise(lists[i].url, 'check')
|
||||||
console.log(result)
|
console.log(result)
|
||||||
let item = this[`fileList`][fileListLen]
|
let item = this[`fileList1`][fileListLen]
|
||||||
this[`fileList`].splice(fileListLen, 1, Object.assign(item, {
|
this[`fileList1`].splice(fileListLen, 1, Object.assign(item, {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
message: '',
|
message: '',
|
||||||
url: result
|
url: result
|
||||||
|
Loading…
Reference in New Issue
Block a user