This commit is contained in:
PQZ 2024-08-28 18:31:57 +08:00
parent c5d361e593
commit f99b3327f6
2 changed files with 5 additions and 5 deletions

View File

@ -86,7 +86,7 @@
if (res.code == 0) { if (res.code == 0) {
this.formData = res.data this.formData = res.data
this.fileList1 = [{ this.fileList1 = [{
url: this.imageUrl + res.data.photo url: this.formData.photo
}] }]
} }
}) })
@ -109,11 +109,11 @@
lists.map((item) => { lists.map((item) => {
this[`fileList${event.name}`].push({ this[`fileList${event.name}`].push({
...item, ...item,
}) })
}) })
for (let i = 0; i < lists.length; i++) { for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url) const result = await this.uploadFilePromise(lists[i].url)
console.log(result,'reseult')
let item = this[`fileList${event.name}`][fileListLen] let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success', status: 'success',
@ -126,10 +126,10 @@
uploadFilePromise(e) { uploadFilePromise(e) {
console.log(e); console.log(e);
upload({ upload({
url: '/common/upload', url: '/infra/file/upload',
filePath: e, filePath: e,
}).then((res) => { }).then((res) => {
this.formData.photo = res.fileName this.formData.photo = res.data
}) })
}, },
submit() { submit() {

View File

@ -7,7 +7,7 @@
<view class="box-ds" v-for="(item,index) in dataList" :key="index"> <view class="box-ds" v-for="(item,index) in dataList" :key="index">
<view class="d-s"> <view class="d-s">
<view class="left-box"> <view class="left-box">
<image :src="imageUrl+item.photo" mode=""></image> <image :src="item.photo" mode=""></image>
</view> </view>
<view class=""> <view class="">
<view class="box-title" v-if="item.name == 1">成人班</view> <view class="box-title" v-if="item.name == 1">成人班</view>