|
@@ -52,8 +52,8 @@
|
|
|
:del-icon="edit"
|
|
:del-icon="edit"
|
|
|
file-mediatype="image"
|
|
file-mediatype="image"
|
|
|
mode="grid"
|
|
mode="grid"
|
|
|
- :limit="1"
|
|
|
|
|
- title="最多选择1张图片"
|
|
|
|
|
|
|
+ :limit="9"
|
|
|
|
|
+ title="最多选择9张图片"
|
|
|
v-model="formData.photos"
|
|
v-model="formData.photos"
|
|
|
/>
|
|
/>
|
|
|
</view>
|
|
</view>
|
|
@@ -97,9 +97,12 @@ export default {
|
|
|
ownerName: data.contact_name,
|
|
ownerName: data.contact_name,
|
|
|
contact: data.contact_phone,
|
|
contact: data.contact_phone,
|
|
|
address: data.address,
|
|
address: data.address,
|
|
|
- photos: [{
|
|
|
|
|
- "url":data.store_photo,
|
|
|
|
|
- }]
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ this.formData.photos = [];
|
|
|
|
|
+ let photos = data.store_photo.split(",")
|
|
|
|
|
+ for (let i = 0; i < photos.length; i++) {
|
|
|
|
|
+ let photo = photos[i];
|
|
|
|
|
+ this.formData.photos.push({url:photo})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -143,7 +146,7 @@ export default {
|
|
|
// 执行提交逻辑
|
|
// 执行提交逻辑
|
|
|
uni.showLoading({ title: '正在保存...' });
|
|
uni.showLoading({ title: '正在保存...' });
|
|
|
if(this.formData.storeId>0){
|
|
if(this.formData.storeId>0){
|
|
|
- updateStore(this.formData.storeId,this.formData.storeName,this.formData.ownerName,this.formData.contact,this.formData.address,imageUrlarr[0])
|
|
|
|
|
|
|
+ updateStore(this.formData.storeId,this.formData.storeName,this.formData.ownerName,this.formData.contact,this.formData.address,imageUrlarr.join(","))
|
|
|
.then(res=>{
|
|
.then(res=>{
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
if(res.code == 0){
|
|
if(res.code == 0){
|
|
@@ -162,7 +165,7 @@ export default {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
}else{
|
|
}else{
|
|
|
- addStore(this.formData.storeName,this.formData.ownerName,this.formData.contact,this.formData.address,imageUrlarr[0])
|
|
|
|
|
|
|
+ addStore(this.formData.storeName,this.formData.ownerName,this.formData.contact,this.formData.address,imageUrlarr.join(","))
|
|
|
.then(res=>{
|
|
.then(res=>{
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
if(res.code == 0){
|
|
if(res.code == 0){
|