panhui 3 лет назад
Родитель
Сommit
fa225f0f07
1 измененных файлов с 18 добавлено и 2 удалено
  1. 18 2
      src/views/asset/Detail.vue

+ 18 - 2
src/views/asset/Detail.vue

@@ -495,7 +495,7 @@
                     <van-button @click="publish" color="#FF7F1F" block round>竞价拍卖</van-button>
                     <van-button @click="Add" color="#FFBF27" block round>赠送</van-button>
                     <van-button @click="showLock = true" color="#515976" block round>封存</van-button>
-                    <van-button @click="starCreate" color="#5D7DFF" block round> 铸造星图</van-button>
+                    <van-button @click="starCreate" v-if="canStar" color="#5D7DFF" block round> 铸造星图</van-button>
                 </div>
             </van-action-sheet>
         </div>
@@ -583,7 +583,8 @@ export default {
             showLock: false,
             lockTime: 0,
             transactionPassword: '',
-            destroyCartridge: false
+            destroyCartridge: false,
+            nots: []
         };
     },
     computed: {
@@ -599,6 +600,16 @@ export default {
         },
         isBuy() {
             return this.info.stock && this.info.onShelf;
+        },
+        canStar() {
+            let nots = [...this.nots];
+            let flag = true;
+            nots.forEach(_not => {
+                if (this.info.name.indexOf(_not) !== -1) {
+                    flag = false;
+                }
+            });
+            return flag;
         }
     },
     mounted() {
@@ -615,6 +626,11 @@ export default {
             columns.push(i + 1 + '月');
         }
         this.columns = columns;
+        this.$http.get('/sysConfig/get/xingtu_not').then(res => {
+            if (res.value) {
+                this.nots = res.value.split(',');
+            }
+        });
     },
     methods: {
         allFn() {