新增搜索课程和加载组件页面,签到页面添加遮罩防重复扫码,添加 request 便捷方法(get/post/put/delete)

This commit is contained in:
future
2026-06-05 21:26:26 +08:00
committed by liwentao
parent a7af34d22b
commit dc7da19aee
15 changed files with 2469 additions and 125 deletions
+9 -4
View File
@@ -7,17 +7,22 @@ export default defineConfig({
plugins: [uni()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
'@': path.resolve(__dirname, '.')
},
},
server: {
proxy: {
// 匹配所有 /api 开头的请求
// 匹配所有 /api/ 开头的请求(排除静态文件)
'/api': {
target: 'http://192.168.5.15:8084', // 你的后端SpringBoot地址
changeOrigin: true, // 开启跨域伪装
// rewrite: (path) => path.replace(/^\/areyouok/, '')
// 举例:前端请求 /api/login → 代理成 http://localhost:8088/login
// 只代理真正的后端API请求,排除 .js .vue 等静态文件
bypass: function(req, res, proxyOptions) {
if (req.url.indexOf('.js') !== -1 || req.url.indexOf('.vue') !== -1 ||
req.url.indexOf('.css') !== -1 || req.url.indexOf('.json') !== -1) {
return req.url
}
}
}
}
}