From af86d1d20aa8217b18c70df5d896fd5b0f69e757 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Fri, 10 Feb 2023 09:58:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/init/viper/viper.go | 10 +++++----- frontend/src/views/app-store/index.vue | 4 +++- frontend/src/views/home/index.vue | 2 +- frontend/vite.config.ts | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/backend/init/viper/viper.go b/backend/init/viper/viper.go index 46e64c146..7a5b241ae 100644 --- a/backend/init/viper/viper.go +++ b/backend/init/viper/viper.go @@ -40,10 +40,10 @@ func Init() { } global.CONF = serverConfig global.CONF.BaseDir = baseDir - global.CONF.System.DataDir = global.CONF.BaseDir + "/1panel/data" - global.CONF.System.Cache = global.CONF.BaseDir + "/1panel/data/cache" - global.CONF.System.Backup = global.CONF.BaseDir + "/1panel/data/backup" - global.CONF.System.DbPath = global.CONF.BaseDir + "/1panel/data/db" - global.CONF.System.LogPath = global.CONF.BaseDir + "/1panel/log" + global.CONF.System.DataDir = global.CONF.BaseDir + "/1panel" + global.CONF.System.Cache = global.CONF.System.DataDir + "/cache" + global.CONF.System.Backup = global.CONF.System.DataDir + "/backup" + global.CONF.System.DbPath = global.CONF.System.DataDir + "/db" + global.CONF.System.LogPath = global.CONF.System.DataDir + "/log" global.Viper = v } diff --git a/frontend/src/views/app-store/index.vue b/frontend/src/views/app-store/index.vue index 119b852ed..50ec55fa7 100644 --- a/frontend/src/views/app-store/index.vue +++ b/frontend/src/views/app-store/index.vue @@ -33,7 +33,9 @@ const buttons = [ ]; onMounted(() => { SearchAppInstalled({ update: true, page: 1, pageSize: 100 }).then((res) => { - buttons[2].count = res.data.items.length; + if (res.data.items) { + buttons[2].count = res.data.items.length; + } showButton.value = true; }); }); diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue index 86f44f393..029cfbd4a 100644 --- a/frontend/src/views/home/index.vue +++ b/frontend/src/views/home/index.vue @@ -37,7 +37,7 @@ {{ $t('home.appInstalled') }}
- + {{ baseInfo?.appInstalldNumber }}
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 12e0e622d..a44b9a548 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -37,7 +37,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { open: viteEnv.VITE_OPEN, proxy: { '/api/v1': { - target: 'http://172.16.10.181:9999/', + target: 'http://localhost:9999/', changeOrigin: true, }, },