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 +++++++++++++++++--
vue.config.js | 2 +-
2 files changed, 18 insertions(+), 3 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;
diff --git a/vue.config.js b/vue.config.js
index 198dc60..7b45f90 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -95,7 +95,7 @@
},
"/data/api-v/app/findAllApp": {
// target: '/',
- target: "http://localhost:8080/",
+ target: "http://localhost:8081/",
changeOrigin: true,
pathRewrite: {
"^/data/api-v/app/findAllApp": "apps.json",
--
Gitblit v1.8.0