|
|
@@ -1051,9 +1051,21 @@ export default {
|
|
|
this.form[i] = res.data[i];
|
|
|
});
|
|
|
|
|
|
- this.currentImgData.push(res.data.bigCover)
|
|
|
- this.form.images = [res.data.shortCover]
|
|
|
- this.form.cover = res.data.shortCover // 覆盖原来的cover,并要使用短链接图片
|
|
|
+ this.form.cover = res.data.shortCover
|
|
|
+
|
|
|
+ if(!this.$util.isEmpty(res.data.images)){
|
|
|
+ const imageUrls = (res.data.images || '').split(',').filter(i => i);
|
|
|
+ this.form.images = imageUrls;
|
|
|
+ this.currentImgData = imageUrls.map(url => {
|
|
|
+ return this.constant.imgUrl + '/' + url + '?x-oss-process=image/resize,m_fill,h_700,w_700'
|
|
|
+ })
|
|
|
+ if(this.form.cover==''){
|
|
|
+ this.form.cover = this.form.images[0]
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.currentImgData.push(res.data.bigCover)
|
|
|
+ this.form.images = [res.data.shortCover]
|
|
|
+ }
|
|
|
|
|
|
this.form.stock = 0
|
|
|
this.form.itemId = ptItemId
|