mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-06 17:36:45 +08:00
feat:修改
This commit is contained in:
2
.env
2
.env
@@ -30,3 +30,5 @@ VITE_FILE_PATH=/upload/
|
||||
|
||||
#h5的基本url
|
||||
VITE_BOE_HOME=//u-pre.boe.com/mobile/pages/index/index
|
||||
# 学习任务页
|
||||
VITE_BOE_STUDY=https://u-pre.boe.com/mobile/pages/study/index
|
||||
@@ -19,3 +19,4 @@ VITE_IMG=/manageApi
|
||||
|
||||
#h5的基本url
|
||||
VITE_BOE_HOME=//u.boe.com/mobile/pages/index/index
|
||||
VITE_BOE_STUDY=https://u.boe.com/mobile/pages/study/index
|
||||
@@ -16,3 +16,4 @@ VITE_IMG=/manageApi-release
|
||||
|
||||
#h5的基本url
|
||||
VITE_BOE_HOME=//u.boe.com/mobile-release/pages/index/index
|
||||
VITE_BOE_STUDY=https://u.boe.com/mobile-release/pages/study/index
|
||||
@@ -97,8 +97,9 @@ export async function request(_url, params) {
|
||||
...method !== 'get' ? { data: JSON.stringify(body) } : {}
|
||||
}).then(resp => resp.data).then(response => {
|
||||
if (response.code !== 200 && response.code !== 0) {
|
||||
console.log('window.location.', window, router)
|
||||
if (response.code === 1000) {
|
||||
(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')
|
||||
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({ path: '/login', query: { returnUrl: router.currentRoute.value.fullPath } }) : window.open(window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL + window.location.protocol + import.meta.env.VITE_BOE_BASE_URL + import.meta.env.VITE_BASE + router.currentRoute.value.fullPath, '_top')
|
||||
}
|
||||
if (response.code === 2001) {
|
||||
router.push({ path: '/FaceTeachSignUp', query: { courseId: router.currentRoute.value.query.courseId, type: 3 } })
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2023-01-16 17:26:39
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-02-22 19:32:18
|
||||
* @LastEditTime: 2023-03-07 15:17:43
|
||||
* @FilePath: /stu_h5/src/components/ReturnHead.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
@@ -89,6 +89,7 @@ export default {
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
router.back();
|
||||
// VITE_BOE_STUDY
|
||||
};
|
||||
const publishClick = () => {
|
||||
if (props.postAdd) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2023-02-08 09:50:10
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-03-07 12:53:34
|
||||
* @LastEditTime: 2023-03-07 15:48:30
|
||||
* @FilePath: /stu_h5/src/router/index.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
@@ -26,7 +26,7 @@ router.beforeEach((to, from, next) => {
|
||||
console.log('toooooooo', to)
|
||||
if (!getCookie('token')) {
|
||||
if (import.meta.env.MODE === "development" || import.meta.env.MODE === "test") {
|
||||
to.path.includes('/login') ? next() : next({ path: '/login', query: { returnUrl: import.meta.env.VITE_BASE + to.fullPath } })
|
||||
to.path.includes('/login') ? next() : next({ path: '/login', query: { returnUrl: to.fullPath } })
|
||||
} else {
|
||||
window.location.href = window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL + window.location.protocol + import.meta.env.VITE_BOE_BASE_URL + import.meta.env.VITE_BASE + to.fullPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user