From eaa3c7fd639a666c749cb74727a01fb0c99872fc 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 17:08:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 6 +++--- src/views/app/AppHomeView.vue | 30 +++++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index cbee8d0..7644954 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -30,8 +30,8 @@ API.setErrorHandle(errorHandle) export default { // 登录 - register: (params) => API.POSTJSON("/tenant/v1/tenant/create", params), + register: (params) => API.POSTJSON("/tenant/v1/create", params), login: (params) => API.POSTJSON("/user/v1/login", params), - appList: (params) => API.POSTJSON("/tenant/v1/app/list", params), - appCreate: (params) => API.POSTJSON("/tenant/v1/app/create", params) + appList: (params) => API.POSTJSON("/manager/v1/list", params), + appCreate: (params) => API.POSTJSON("/manager/v1/create", params) } diff --git a/src/views/app/AppHomeView.vue b/src/views/app/AppHomeView.vue index f43aa0c..820f5dc 100644 --- a/src/views/app/AppHomeView.vue +++ b/src/views/app/AppHomeView.vue @@ -8,23 +8,31 @@ import { ElMessage } from "element-plus" const Api = API const appList = ref([]) const init = () => { - Api.appList({ type: "APP" }).then((res) => { - appList.value = res + Api.appList({ pageNumber: 0, pageSize: 100 }).then((res) => { + appList.value = res.content }) } const appCreate = () => { ElMessage.success("新建应用成功") - Api.appCreate({ type: "APP", appName: name.value }).then(() => { + Api.appCreate({ + downloadUrl: downloadUrl.value, + packageName: packageName.value, + appName: name.value + }).then(() => { init() showDialog.value = false }) } const name = ref(undefined) +const downloadUrl = ref(undefined) +const packageName = ref(undefined) const showDialog = ref(false) const detail = ref(undefined) const showDetailsDialog = ref(false) const addApp = () => { name.value = undefined + downloadUrl.value = undefined + packageName.value = undefined showDialog.value = true } const showApp = (scope) => { @@ -60,6 +68,22 @@ init() :prefix-icon="PriceTag" :clearable="true" /> + +