|
@@ -19,10 +19,10 @@
|
|
|
ref="uploadVNormal" />
|
|
ref="uploadVNormal" />
|
|
|
</div>
|
|
</div>
|
|
|
</van-col>
|
|
</van-col>
|
|
|
- <van-col span="6" v-for="(item, index) in imgArr" :key="index">
|
|
|
|
|
|
|
+ <van-col span="6" v-for="(urls, index) in imgArr" :key="index">
|
|
|
<div class="imgview">
|
|
<div class="imgview">
|
|
|
<van-icon v-if="insert == '1'" name="close" size="16" v-on:click="deleteImg(index)" />
|
|
<van-icon v-if="insert == '1'" name="close" size="16" v-on:click="deleteImg(index)" />
|
|
|
- <img :src="item.serverId" width="100px" height="100px" @click="previewsImg(index)" />
|
|
|
|
|
|
|
+ <img :src="urls.fileUrl" width="100px" height="100px" @click="previewsImg(index)" />
|
|
|
<!-- <img
|
|
<!-- <img
|
|
|
v-else
|
|
v-else
|
|
|
:src="urls.fileUrl"
|
|
:src="urls.fileUrl"
|
|
@@ -107,6 +107,7 @@ export default {
|
|
|
url: process.env.VUE_APP_Target1 + process.env.VUE_APP_BASE_API,
|
|
url: process.env.VUE_APP_Target1 + process.env.VUE_APP_BASE_API,
|
|
|
imgArr: [],
|
|
imgArr: [],
|
|
|
mediaIds: [],
|
|
mediaIds: [],
|
|
|
|
|
+ locationRemark: '',
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -120,8 +121,14 @@ export default {
|
|
|
startPosition: index,
|
|
startPosition: index,
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- newimgarr(localIds) {
|
|
|
|
|
- this.syncUpload(localIds);
|
|
|
|
|
|
|
+ newimgarr(data) {
|
|
|
|
|
+ const { localIds, locationRemark, source } = data;
|
|
|
|
|
+ this.locationRemark = locationRemark;
|
|
|
|
|
+ if (source == 'weixin') {
|
|
|
|
|
+ this.syncUpload(localIds);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$emit('upDataDetail');
|
|
|
|
|
+ }
|
|
|
// if (this.isIOS()) {
|
|
// if (this.isIOS()) {
|
|
|
// this.imgArr = this.imgArr.concat([...localIds]);
|
|
// this.imgArr = this.imgArr.concat([...localIds]);
|
|
|
// // 解决ios微信localId无法直接使用的问题,获取base64后再上传
|
|
// // 解决ios微信localId无法直接使用的问题,获取base64后再上传
|
|
@@ -143,7 +150,7 @@ export default {
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
this.imgArr.push({
|
|
this.imgArr.push({
|
|
|
mediaId: res.serverId,
|
|
mediaId: res.serverId,
|
|
|
- serverId: localId,
|
|
|
|
|
|
|
+ fileUrl: localId,
|
|
|
});
|
|
});
|
|
|
this.syncUpload(localIds, callback);
|
|
this.syncUpload(localIds, callback);
|
|
|
},
|
|
},
|