mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 11:56:48 +08:00
feat:增加动态获取协议(http/https)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export const BASE = 'https://u-pre.boe.com'
|
||||
export const BASE = window.location.protocol + '//u-pre.boe.com'
|
||||
export const GET_USER_LIST = `/userbasic/user/list post`
|
||||
export const GET_USER_INFO = `/userbasic/user/info post`
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ export async function request(_url, params) {
|
||||
}).then(resp => resp.data).then(response => {
|
||||
if (response.code !== 200 && response.code !== 0) {
|
||||
if (response.code === 1000) {
|
||||
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({path: '/login'}) : window.open(import.meta.env.VITE_BASE_LOGIN_URL, '_top')
|
||||
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({path: '/login'}) : window.open(window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL, '_top')
|
||||
}
|
||||
if (response.code === 2001) {
|
||||
router.push({path: '/FaceTeachSignUp', query: {courseId: router.currentRoute.value.query.courseId,type:3}})
|
||||
|
||||
Reference in New Issue
Block a user