修改登录逻辑,配合前后端联调

This commit is contained in:
spllzh
2025-08-11 19:33:08 +08:00
parent e764dfd2fe
commit 3b3a7d0f94
4 changed files with 68 additions and 41 deletions

View File

@@ -6,7 +6,7 @@ function resolve(dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title || 'vue Admin Template' // page title
const name = defaultSettings.title || 'AI平台' // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.
@@ -36,7 +36,17 @@ module.exports = {
warnings: false,
errors: true
},
before: require('./mock/mock-server.js')
// before: require('./mock/mock-server.js'), // 注释掉 mock 服务器
proxy: {
'/api': {
target: 'http://localhost:9060', // 从环境变量获取后端服务器地址
changeOrigin: true,
pathRewrite: {
'^/api': '/api' // 保持 /api 前缀
},
logLevel: 'debug' // 开发环境下显示代理日志
}
}
},
configureWebpack: {
// provide the app's title in webpack's name field, so that