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

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

@@ -20,7 +20,7 @@
                     <span>{{ info.price }}</span>
                 </div>
                 <div class="flex1"></div>
-                <div class="text1">
+                <div class="text1" v-if="info.total !== 1">
                     <span>{{ info.sale }}/</span>
                     <span>{{ info.total }}</span>
                 </div>

+ 7 - 8
src/main/nine-space/src/views/creator/Detail.vue

@@ -157,13 +157,6 @@ export default {
             }
             return {};
         },
-        isMinter() {
-            let authorities = [...(this.info.authorities || [])];
-            let info = authorities.find(item => {
-                return item.name == 'ROLE_MINTER';
-            });
-            return !!info;
-        },
         sourceType() {
             if (this.isMinter) {
                 return 'OFFICIAL,USER';
@@ -183,10 +176,16 @@ export default {
             list: [],
             empty: false,
             hots: [],
-            url: '/collection/all'
+            url: '/collection/all',
+            isMinter: true
         };
     },
     mounted() {
+        if (this.$route.query.type) {
+            this.isMinter = false;
+        } else {
+            this.isMinter = true;
+        }
         this.getInfo();
         this.getHot();
     },

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

@@ -17,7 +17,7 @@
                     <span>限量</span>
                     <span>{{ info.total }}份</span>
                 </div>
-                <div class="text" v-if="info.salable && info.stock > 0">
+                <div class="text" v-if="info.salable && !isSold && info.total !== 1">
                     <span>已售 {{ info.sale }}</span>
                     <span>剩余 {{ info.stock }}</span>
                 </div>
@@ -78,7 +78,8 @@
                             :to="{
                                 path: '/creatorDetail',
                                 query: {
-                                    id: info.ownerId
+                                    id: info.ownerId,
+                                    type: 'DEFAULT'
                                 }
                             }"
                         >