bate版本提交

This commit is contained in:
2025-04-14 21:52:19 +08:00
parent 0bbe30bc7e
commit 6a6dabeca1
15 changed files with 466 additions and 111 deletions

View File

@@ -13,11 +13,11 @@ const router = useRouter();
let baseURL = ''
if (process.env.NODE_ENV === 'development') {
// 生产环境
baseURL = "http://120.26.251.180:8085/api/"
// baseURL = "http://192.168.0.108:8085/api/"
baseURL = "http://120.26.251.180:8085/"
// baseURL = "http://192.168.0.114:8085/"
} else {
// 开发环境
baseURL = ""
baseURL = "http://120.26.251.180:8085/"
}
// 请求拦截器
@@ -72,9 +72,9 @@ export function getAxios({ url, params }) {
// axios的post请求
export function postAxios({ url, data }) {
if (url != 'account/login') {
if (url != 'api/account/login') {
axios.post('account/cheekalive', {
axios.post('api/account/cheekalive', {
userId: getUser().userId,
currcode: getToken(),
},
@@ -84,6 +84,14 @@ export function postAxios({ url, data }) {
}
}
).then(res => {
if (res) {
} else {
alert("账号在其他地方登录!")
router.push('/login')
}
}).catch(err => {
if (err.message == "Network Error") {
// alert("网络错误,请检查网络连接")