panhui 4 лет назад
Родитель
Сommit
e00b2cd5d3

+ 1 - 1
src/main/nine-space/src/components/Post.vue

@@ -5,7 +5,7 @@
                 <div class="img" ref="wrap"></div>
                 <div class="content" v-if="!img" ref="post" @click.stop>
                     <van-image
-                        :src="getImg(info.pics || info.pic)"
+                        :src="getImg(info.pic || info.pic)"
                         width="80vw"
                         height="80vw"
                         fit="cover"

+ 1 - 1
src/main/nine-space/src/components/product/productInfo.vue

@@ -9,7 +9,7 @@
         class="product"
         @click="click"
     >
-        <van-image width="100%" height="calc(45vw - 21.6px)" :src="getImg(changeImgs(info.pics))" fit="cover" />
+        <van-image width="100%" height="calc(45vw - 21.6px)" :src="getImg(changeImgs(info.pic))" fit="cover" />
 
         <div class="content">
             <div class="name van-ellipsis">

+ 1 - 1
src/main/nine-space/src/views/Submit.vue

@@ -6,7 +6,7 @@
                 width="74"
                 height="104"
                 :radius="6"
-                :src="getImg(changeImgs(info.pics || info.pic))"
+                :src="getImg(changeImgs(info.pic || info.pic))"
                 fit="cover"
             />
             <div class="product-content">

+ 2 - 2
src/main/nine-space/src/views/product/Detail.vue

@@ -160,7 +160,7 @@ export default {
     },
     computed: {
         banners() {
-            return this.info.pics || [];
+            return this.info.pic || [];
         },
         properties() {
             return this.info.properties || [];
@@ -171,7 +171,7 @@ export default {
         boxs() {
             let list = [...this.blindBoxItems];
             return list.map(item => {
-                return this.changeImgs(item.pics);
+                return this.changeImgs(item.pic);
             });
         }
     },

+ 1 - 1
src/main/pc-space/src/components/CollectionInfo.vue

@@ -8,7 +8,7 @@
         }"
         class="collect"
     >
-        <el-image class="imgBox" :src="getImg(changeImgs(info.pics))" fit="cover"></el-image>
+        <el-image class="imgBox" :src="getImg(changeImgs(info.pic))" fit="cover"></el-image>
 
         <div class="introduce">{{ info.name }}</div>
         <div class="price">

+ 28 - 13
src/main/pc-space/src/views/AssetDetail.vue

@@ -86,7 +86,7 @@
                         <div class="btn-list">
                             <div class="btn-item" @click="changeShow">
                                 <i class="font_family icon-icon-gongkaizhanshi"></i>
-                                <span>公开展示</span>
+                                <span>{{ info.publicShow ? '取消展示' : '公开展示' }}</span>
                             </div>
                             <div class="btn-item">
                                 <i class="font_family icon-icon-zengsong"></i>
@@ -212,7 +212,7 @@ export default {
         boxs() {
             let list = [...this.blindBoxItems];
             return list.map(item => {
-                return this.getImg(this.changeImgs(item.pics));
+                return this.getImg(this.changeImgs(item.pic));
             });
         }
     },
@@ -286,18 +286,33 @@ export default {
                 });
         },
         changeShow() {
-            this.$confirm('藏品将公开展示,无报价', '公开展示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                center: true
-            })
-                .then(() => {
-                    return this.$http.post(`/asset/publicShow?id=${this.info.id}`);
+            if (!this.info.publicShow) {
+                this.$confirm('藏品将公开展示,无报价', '公开展示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    center: true
                 })
-                .then(res => {
-                    this.getDetail();
-                    this.$message.success('展示成功');
-                });
+                    .then(() => {
+                        return this.$http.post(`/asset/publicShow?id=${this.info.id}`);
+                    })
+                    .then(res => {
+                        this.getDetail();
+                        this.$message.success('展示成功');
+                    });
+            } else {
+                this.$confirm('藏品将取消展示', '取消展示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    center: true
+                })
+                    .then(() => {
+                        return this.$http.post(`/asset/cancelPublic?id=${this.info.id}`);
+                    })
+                    .then(res => {
+                        this.getDetail();
+                        this.$message.success('取消展示');
+                    });
+            }
         }
     }
 };

+ 2 - 2
src/main/pc-space/src/views/CollectionDetail.vue

@@ -193,7 +193,7 @@ export default {
     },
     computed: {
         banners() {
-            return this.info.pics || [];
+            return this.info.pic || [];
         },
         properties() {
             return this.info.properties || [];
@@ -204,7 +204,7 @@ export default {
         boxs() {
             let list = [...this.blindBoxItems];
             return list.map(item => {
-                return this.getImg(this.changeImgs(item.pics));
+                return this.getImg(this.changeImgs(item.pic));
             });
         }
     },