Merge remote-tracking branch 'refs/remotes/origin/main'

main
Aaron 2025-02-04 00:25:54 +08:00
commit 2df9411858
3 changed files with 12 additions and 11 deletions

View File

@ -23,7 +23,8 @@ const handleCode = async (code: number, msg: string) => {
//创建axsio 赋给常量service
const service = axios.create({
baseURL: "/api",
baseURL: "https://sh-ocr-api.bskies.cc/",
// baseURL: "/api",
timeout: 30000,
headers: {
'Content-Type': 'application/json;charset=UTF-8',

View File

@ -64,7 +64,7 @@ const submitForm = async (formEl) => {
ElMessage.success("登录成功")
setTimeout(()=>{
router.push("/");
},200)
},400)
}
} else {

View File

@ -15,13 +15,13 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
server: {
proxy: {
'/api': {
target: 'https://sh-ocr-api.bskies.cc/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
// server: {
// proxy: {
// '/api': {
// target: 'https://sh-ocr-api.bskies.cc/',
// changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '')
// }
// }
// }
})