From 530a6e0fa95ac2110ca56a1fdfe1024c211fd365 Mon Sep 17 00:00:00 2001 From: luch1994 <1097650398@qq.com> Date: Wed, 27 Dec 2023 20:38:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- server/src/router.ts | 2 +- web/src/management/pages/login/index.vue | 1 - web/vue.config.js | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4be7acdb..877c5c46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN cd /xiaoju-survey/web && npm install && npm run build RUN cd /xiaoju-survey/server && npm install && npm run build -RUN cd /xiaoju-survey && cp -af ./web/dist/* ./server/build/apps/ui/public/ +RUN cd /xiaoju-survey && mkdir -p ./build/apps/ui/public/ && cp -af ./web/dist/* ./server/build/apps/ui/public/ # 暴露端口 需要跟server的port一致 EXPOSE 3000 diff --git a/server/src/router.ts b/server/src/router.ts index 1286a095..70b24d0d 100644 --- a/server/src/router.ts +++ b/server/src/router.ts @@ -8,7 +8,7 @@ import appRegistry from './registry'; export async function initRouter(app) { const rootRouter = new Router(); - const entries = await glob(path.join(__dirname, './apps/*/index.ts')); + const entries = await glob(path.join(__dirname, './apps/*/index.{ts,js}')); for (const entry of entries) { const module = await import(entry); diff --git a/web/src/management/pages/login/index.vue b/web/src/management/pages/login/index.vue index d395b3e2..06e9af9e 100644 --- a/web/src/management/pages/login/index.vue +++ b/web/src/management/pages/login/index.vue @@ -130,7 +130,6 @@ export default { this[`${type}Pending`] = false; if (res.code !== CODE_MAP.SUCCESS) { this.$message.error(res.errmsg); - this.refreshCaptcha(); throw new Error('登录/注册失败' + res.errmsg); } this.$store.dispatch('user/login', { diff --git a/web/vue.config.js b/web/vue.config.js index 1f434451..4ed0498b 100644 --- a/web/vue.config.js +++ b/web/vue.config.js @@ -30,7 +30,7 @@ module.exports = defineConfig({ devServer: { proxy: { '/api': { - target: 'http://localhost:3000', + target: 'http://127.0.0.1:3000', changeOrigin: true, }, },