From 2af62f40a1525c820e824c23a75f0fa8318372ae Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期五, 18 三月 2022 15:34:07 +0800
Subject: [PATCH] 应用中心部分禁用

---
 src/pages/ai/index/App.vue |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue
index 1ab5b8a..181bf92 100644
--- a/src/pages/ai/index/App.vue
+++ b/src/pages/ai/index/App.vue
@@ -143,7 +143,10 @@
                   class="front-page-item"
                   v-for="(item, index) in tempList"
                   :key="index"
-                  @click="checkDetail(item)"
+                  @click="checkDetail(item, 'Appcenter')"
+                  :class="{
+                    disabled: activeName == '搴旂敤涓績' && !item.canUpOrIns,
+                  }"
                 >
                   <div class="icon-img">
                     <span class="icon iconfont" v-if="item.isUpgrade"
@@ -170,7 +173,7 @@
                       type="primary"
                       class="other-btn"
                       round
-                      @click="checkDetail(item)"
+                      @click="checkDetail(item, 'Appcenter')"
                       v-if="activeName == '搴旂敤涓績' && item.price > 0"
                       >婵�娲�</el-button
                     >
@@ -619,6 +622,10 @@
       }
     },
     checkDetail(item, typ) {
+      if (!item.canUpOrIns && typ == "Appcenter") {
+        return false;
+      }
+
       this.inDetail = true;
       this.detailProductID = item.id;
       this.detailPrice = item.price;
@@ -794,6 +801,10 @@
       });
     },
     actived(item) {
+      if (!item.canUpOrIns) {
+        return false;
+      }
+
       let _this = this;
       if (this.activeTab == "sdk") {
         actPageAlg(item.id, "")
@@ -1324,6 +1335,10 @@
             height: 76px;
             border-radius: 4px;
 
+            &.disabled {
+              cursor: default;
+            }
+
             .icon-img {
               width: 58px;
               height: 58px;

--
Gitblit v1.8.0