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, }, },