From 68b96b56c3324b7458e7921bd1087357cb649318 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期五, 10 六月 2022 16:04:50 +0800
Subject: [PATCH] 应用中心激活
---
src/pages/ai/index/App.vue | 13 +++++++------
src/pages/ai/index/detail.vue | 19 +++++++++++++------
vue.config.js | 6 +++---
3 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue
index be21ae0..5f54c3b 100644
--- a/src/pages/ai/index/App.vue
+++ b/src/pages/ai/index/App.vue
@@ -66,7 +66,7 @@
class="quick-item"
v-for="(item, index) in recomandUpdateList"
:key="index"
- @click="checkDetail(item, 'inactive')"
+ @click="checkDetail(item, 'inactive', item.sdk_name)"
>
<div class="icon-img">
<span class="icon iconfont" v-if="item.isUpgrade"
@@ -143,7 +143,7 @@
class="front-page-item"
v-for="(item, index) in tempList"
:key="index"
- @click="checkDetail(item)"
+ @click="checkDetail(item, null, item.sdk_name)"
:class="{
disabled: activeName == '搴旂敤涓績' && !item.canUpOrIns,
}"
@@ -173,7 +173,7 @@
type="primary"
class="other-btn"
round
- @click="checkDetail(item)"
+ @click="checkDetail(item, null, item.sdk_name)"
v-if="activeName == '搴旂敤涓績' && item.price > 0"
>婵�娲�</el-button
>
@@ -285,7 +285,7 @@
class="front-page-item item-dimmed"
v-for="(item, index) in tempDarkList"
:key="index"
- @click="checkDetail(item, 'activeNotInstall')"
+ @click="checkDetail(item, 'activeNotInstall', item.sdk_name)"
>
<div class="icon-img">
<img
@@ -363,6 +363,7 @@
:detailProductID="detailProductID"
:detailType="detailType"
:detailPrice="detailPrice"
+ :isSdk="isSdk"
v-if="inDetail"
@flushSdk="getAllSdk"
@flushApp="getAllApps"
@@ -621,11 +622,11 @@
this.tempDarkList = [];
}
},
- checkDetail(item, typ) {
+ checkDetail(item, typ, sdkName) {
/* if (!item.canUpOrIns && typ == "Appcenter") {
return false;
} */
-
+ this.isSdk = Boolean(sdkName);
this.inDetail = true;
this.detailProductID = item.id;
this.detailPrice = item.price;
diff --git a/src/pages/ai/index/detail.vue b/src/pages/ai/index/detail.vue
index 72c4606..9e80e23 100644
--- a/src/pages/ai/index/detail.vue
+++ b/src/pages/ai/index/detail.vue
@@ -311,6 +311,7 @@
type: String,
},
detailPrice: {},
+ isSdk: {},
},
directives: {
focus: {
@@ -615,9 +616,9 @@
});
return;
}
- if (this.actType == "sdk") {
+ if (this.isSdk) {
//婵�娲荤畻娉�
- actPageAlg(this.actId, this.activeCode)
+ actPageAlg(this.detailProductID, this.activeCode)
.then((res) => {
if (res.data.isSuccess) {
this.productDetailVisible = false;
@@ -634,11 +635,14 @@
}
})
.catch((e) => {
- console.log(e);
+ this.$notify({
+ type: "error",
+ message: e.msg,
+ });
});
- } else if (this.actType == "app") {
+ } else {
//婵�娲诲簲鐢�
- actApp(this.actId, this.activeCode)
+ actApp(this.detailProductID, this.activeCode)
.then((res) => {
if (res.data.isSuccess) {
this.productDetailVisible = false;
@@ -655,7 +659,10 @@
}
})
.catch((e) => {
- console.log(e);
+ this.$notify({
+ type: "error",
+ message: e.msg,
+ });
});
}
},
diff --git a/vue.config.js b/vue.config.js
index d1117ca..a4832f0 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -67,8 +67,8 @@
// }
});
-//const serverUrl = "http://192.168.20.189:7009"
-const serverUrl = "http://192.168.20.116:7009";
+const serverUrl = "http://192.168.20.189:7009";
+//const serverUrl = "http://192.168.20.116:7009";
const iotdataServerUrl = "http://192.168.8.10:9000";
// const cir = require("circular-dependency-plugin");
@@ -118,7 +118,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