名称修改
This commit is contained in:
parent
efe0e77a1d
commit
98d98e41f2
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name" : "aidexapp",
|
||||
"name" : "数字南川",
|
||||
"appid" : "__UNI__3570A56",
|
||||
"description" : "aidex敏捷开发平台",
|
||||
"versionName" : "1.8.4",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
"sassImplementationName": "node-sass",
|
||||
"sassImplementationName" : "node-sass",
|
||||
"app-plus" : {
|
||||
// APP-VUE分包,可提APP升启动速度,2.7.12开始支持,兼容微信小程序分包方案,默认关闭
|
||||
"optimization" : {
|
||||
|
@ -27,6 +27,7 @@
|
||||
<view class="add-repair-label">上传照片 <text class="add-repair-optional">(非必填,最多三张)</text></view>
|
||||
<u-upload
|
||||
:fileList="selectedImages"
|
||||
@on-list-change="onListChange"
|
||||
@delete="deletePic"
|
||||
name="upload"
|
||||
multiple
|
||||
@ -84,18 +85,31 @@ export default {
|
||||
deletePic(event) {
|
||||
this.selectedImages.splice(event.index, 1);
|
||||
},
|
||||
|
||||
// 图片列表变化处理
|
||||
onListChange(list) {
|
||||
this.selectedImages = list;
|
||||
},
|
||||
|
||||
async submit() {
|
||||
if(!this.repairInfo.location) {
|
||||
toast('请先填写地址')
|
||||
return
|
||||
}
|
||||
|
||||
if(this.selectedImages.length<=0){
|
||||
this.realSubmit()
|
||||
return
|
||||
}
|
||||
console.log("t1",this.selectedImages)
|
||||
const images = this.selectedImages
|
||||
.map(item => item?.path?.replace('file://', '') || item?.url || null)
|
||||
.filter(path => path !== null);
|
||||
if (images.length === 0) {
|
||||
this.realSubmit();
|
||||
return;
|
||||
}
|
||||
// 遍历selectedImages数组并处理图片路径
|
||||
const images = this.selectedImages.map(item => item.path.replace('file://', ''));
|
||||
|
||||
const result = await uploadFiles({
|
||||
files: images,
|
||||
url: this.vuex_config.baseUrl + '/resource/oss/upload',
|
||||
@ -103,12 +117,12 @@ export default {
|
||||
vm: this // 关键:用于注入 token 等
|
||||
});
|
||||
|
||||
if (result.code == '200') {
|
||||
|
||||
// 遍历result获取data.url加上,分割
|
||||
const urls = result.map(item => item.data?.url || '').filter(url => url !== '');
|
||||
this.repairInfo.orderImgUrl = urls.join(',');
|
||||
this.realSubmit()
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
async realSubmit(){
|
||||
|
Loading…
Reference in New Issue
Block a user