Merge pull request #33 from luch1994/develop

[Fix]: 修复部署的问题
This commit is contained in:
luch 2023-12-27 21:02:57 +08:00 committed by GitHub
commit cc71eba353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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);

View File

@ -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', {

View File

@ -30,7 +30,7 @@ module.exports = defineConfig({
devServer: {
proxy: {
'/api': {
target: 'http://localhost:3000',
target: 'http://127.0.0.1:3000',
changeOrigin: true,
},
},