添加扫码签到功能和相关配置
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import uni from '@dcloudio/vite-plugin-uni'
|
||||
import path from 'path'
|
||||
|
||||
// 用来匹配地址,解决跨域问题
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src')
|
||||
},
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
// 匹配所有 /api 开头的请求
|
||||
'/api': {
|
||||
target: 'http://192.168.43.89:8084', // 你的后端SpringBoot地址
|
||||
changeOrigin: true, // 开启跨域伪装
|
||||
// rewrite: (path) => path.replace(/^\/areyouok/, '')
|
||||
// 举例:前端请求 /api/login → 代理成 http://localhost:8088/login
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user