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