From f4c4735dcc2a9d1f856c88a427bb5307ce9a752e Mon Sep 17 00:00:00 2001 From: fp <381288604@qq.com> Date: Sun, 13 Jul 2025 10:08:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=B8=8A=E4=BC=A0=E8=A7=86?= =?UTF-8?q?=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/tabBar/xjPage/xj.vue | 42 ++++---------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/pages/tabBar/xjPage/xj.vue b/pages/tabBar/xjPage/xj.vue index dfb0982..20d6d95 100644 --- a/pages/tabBar/xjPage/xj.vue +++ b/pages/tabBar/xjPage/xj.vue @@ -35,7 +35,7 @@ :deletable="true" :show-upload-list="true" :file-list="fileList" - accept="image" + accept="image,video" @after-read="afterRead" @delete="onDelete" > @@ -144,7 +144,7 @@ export default { var arry = []; this.fileList.filter((v, i) => { arry.push({ - name: '', + name: v.name || '', format: v.type, url:v.url }); @@ -156,7 +156,7 @@ export default { var arry = []; this.fileList.filter((v, i) => { arry.push({ - name: '', + name: v.name || '', format: v.type, url:v.url }); @@ -193,42 +193,8 @@ export default { }); }); }, - - uploadFile(file){ - let that = this - console.log('uploadFile',file); - uni.uploadFile({ - url: this.uploadUlr, - filePath: file.url, - name: 'file', //对应后台接口参数名 - method: 'post', - header: { - "Authorization": uni.getStorageSync('token') - }, - formData: { - //要上传的文件 - file: file - }, - success(res) { - let data = JSON.parse(res.data) - // console.log(data); - if (data.url) { - that.form.imageList.push({ - url: data.url, - name: '', - format: file.type - }) - } - }, - fail(res) { - uni.showToast({ - icon: 'error', - title: '图片上传失败!' - }) - } - }) - }, handleBtn () { + console.log(this.form); if(!this.form.apartmentId){ uni.showToast({ icon: 'none',