上传
This commit is contained in:
parent
c5d361e593
commit
f99b3327f6
@ -86,7 +86,7 @@
|
||||
if (res.code == 0) {
|
||||
this.formData = res.data
|
||||
this.fileList1 = [{
|
||||
url: this.imageUrl + res.data.photo
|
||||
url: this.formData.photo
|
||||
}]
|
||||
}
|
||||
})
|
||||
@ -109,11 +109,11 @@
|
||||
lists.map((item) => {
|
||||
this[`fileList${event.name}`].push({
|
||||
...item,
|
||||
|
||||
})
|
||||
})
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await this.uploadFilePromise(lists[i].url)
|
||||
console.log(result,'reseult')
|
||||
let item = this[`fileList${event.name}`][fileListLen]
|
||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||
status: 'success',
|
||||
@ -126,10 +126,10 @@
|
||||
uploadFilePromise(e) {
|
||||
console.log(e);
|
||||
upload({
|
||||
url: '/common/upload',
|
||||
url: '/infra/file/upload',
|
||||
filePath: e,
|
||||
}).then((res) => {
|
||||
this.formData.photo = res.fileName
|
||||
this.formData.photo = res.data
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
|
@ -7,7 +7,7 @@
|
||||
<view class="box-ds" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="d-s">
|
||||
<view class="left-box">
|
||||
<image :src="imageUrl+item.photo" mode=""></image>
|
||||
<image :src="item.photo" mode=""></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="box-title" v-if="item.name == 1">成人班</view>
|
||||
|
Loading…
Reference in New Issue
Block a user