From 66a8c8ba200c77cb924e382d0ae49eab4d06eee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Fri, 23 Aug 2024 18:19:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0release=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 4 +- src/router/index.ts | 6 ++ src/stores/manager.ts | 11 +++ src/views/MainView.vue | 1 + src/views/app/AppHomeView.vue | 12 +++- src/views/app/AppReleaseView.vue | 113 +++++++++++++++++++++++++++++++ 6 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 src/stores/manager.ts create mode 100644 src/views/app/AppReleaseView.vue diff --git a/src/api/index.js b/src/api/index.js index 7644954..f83095e 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -33,5 +33,7 @@ export default { register: (params) => API.POSTJSON("/tenant/v1/create", params), login: (params) => API.POSTJSON("/user/v1/login", params), appList: (params) => API.POSTJSON("/manager/v1/list", params), - appCreate: (params) => API.POSTJSON("/manager/v1/create", params) + appCreate: (params) => API.POSTJSON("/manager/v1/create", params), + releaseList: (params) => API.POSTJSON("/release/v1/list", params), + releaseAdd: (params) => API.POSTJSON("/release/v1/add", params) } diff --git a/src/router/index.ts b/src/router/index.ts index b506537..214a156 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -5,6 +5,7 @@ import RegisterView from "@/views/RegisterView.vue" import MainView from "@/views/MainView.vue" import ImHomeView from "@/views/im/ImHomeView.vue" import AppHomeView from "@/views/app/AppHomeView.vue" +import AppReleaseView from "@/views/app/AppReleaseView.vue" const router = createRouter({ history: createWebHashHistory(), @@ -54,6 +55,11 @@ const router = createRouter({ path: "/appManager", name: "应用信息", component: AppHomeView + }, + { + path: "/AppRelease", + name: "版本记录", + component: AppReleaseView } ] } diff --git a/src/stores/manager.ts b/src/stores/manager.ts new file mode 100644 index 0000000..8a9e458 --- /dev/null +++ b/src/stores/manager.ts @@ -0,0 +1,11 @@ +import { ref, computed } from "vue" +import { defineStore } from "pinia" + +export const useManagerStore = defineStore("token", () => { + const appId = ref(undefined) + function setAppId(t: string) { + appId.value = t + } + + return { appId, setAppId } +}) diff --git a/src/views/MainView.vue b/src/views/MainView.vue index 011c931..485b3c3 100644 --- a/src/views/MainView.vue +++ b/src/views/MainView.vue @@ -35,6 +35,7 @@ 版本管理 应用信息 + 版本记录 diff --git a/src/views/app/AppHomeView.vue b/src/views/app/AppHomeView.vue index 820f5dc..8ceeed8 100644 --- a/src/views/app/AppHomeView.vue +++ b/src/views/app/AppHomeView.vue @@ -4,6 +4,12 @@ import API from "@/api/index.js" import { ref } from "vue" import { PriceTag } from "@element-plus/icons-vue" import { ElMessage } from "element-plus" +import { useRouter } from "vue-router" +import { useManagerStore } from "@/stores/manager" + +const router = useRouter() + +const manager = useManagerStore() const Api = API const appList = ref([]) @@ -35,9 +41,9 @@ const addApp = () => { packageName.value = undefined showDialog.value = true } -const showApp = (scope) => { - detail.value = undefined - // showDetailsDialog.value = true +const showApp = (item) => { + manager.setAppId(item.appId) + router.push("/AppRelease") } init() diff --git a/src/views/app/AppReleaseView.vue b/src/views/app/AppReleaseView.vue new file mode 100644 index 0000000..d5fbc83 --- /dev/null +++ b/src/views/app/AppReleaseView.vue @@ -0,0 +1,113 @@ + + + + +