瀏覽代碼

Merge branch 'master' into master-pro

hxl13994548489 9 月之前
父節點
當前提交
f38fc111a3
共有 2 個文件被更改,包括 12 次插入2 次删除
  1. 8 0
      pages/product/index.vue
  2. 4 2
      pages/store/headPhoto.vue

+ 8 - 0
pages/product/index.vue

@@ -468,6 +468,14 @@
 							});
 							this.isSell = false
 							this.sellProducts = []
+						}else{
+							uni.showToast({
+								title: res.data.message,
+								duration: 2000,
+								icon: 'none'
+							});
+							this.isSell = false
+							this.sellProducts = []
 						}
 					})
 			},

+ 4 - 2
pages/store/headPhoto.vue

@@ -15,7 +15,7 @@
 						</view>
 					</view>
 					<view class="grid col-4 grid-square flex-sub booder-top" v-if="form.headPhoto">
-						<view class="bg-img" v-for="(item, index) in form.headPhoto.split(',')" :key="index" @tap="ViewImage"
+						<view class="bg-img" v-for="(item, index) in form.photo" :key="index" @tap="ViewImage"
 							:data-url="form.headPhoto[index]">
 							<image :src="item" mode="aspectFill"></image>
 							<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
@@ -77,7 +77,7 @@
 			if (data.params) {
 				let obj = JSON.parse(decodeURIComponent(data.params));
 				// this.video = obj.video ? obj.video : ''
-				obj.photo = obj.photo ? obj.photo.split(',').filter(id => id !== '') : []
+				obj.photo = obj.photo ? obj.headPhoto.split(',').filter(id => id !== '') : []
 				this.form = obj
 				
 			}
@@ -104,6 +104,7 @@
 
 			},
 			DelImg(e) {
+				
 				uni.showModal({
 					title: '提示',
 					content: '确定要删除?',
@@ -111,6 +112,7 @@
 					confirmText: '确定',
 					success: res => {
 						if (res.confirm) {
+							console.log(this.form)
 							// this.photoList.splice(e.currentTarget.dataset.index, 1)
 							this.form.photo.splice(e.currentTarget.dataset.index, 1)