mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 20:36:45 +08:00
-- bug
This commit is contained in:
1
.env
1
.env
@@ -1,6 +1,7 @@
|
|||||||
VITE_BASE=/manage
|
VITE_BASE=/manage
|
||||||
VITE_BASE_API=/
|
VITE_BASE_API=/
|
||||||
VITE_PROXY_URL=http://111.231.196.214:30001/
|
VITE_PROXY_URL=http://111.231.196.214:30001/
|
||||||
|
VITE_LOGIN_URL=https://u-pre.boe.com/web
|
||||||
|
|
||||||
|
|
||||||
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||||
|
|||||||
1
.env.boe
1
.env.boe
@@ -1,6 +1,7 @@
|
|||||||
VITE_BASE=/fe-student
|
VITE_BASE=/fe-student
|
||||||
VITE_BASE_API=/manageApi
|
VITE_BASE_API=/manageApi
|
||||||
|
|
||||||
|
|
||||||
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||||
VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
|
VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
|
||||||
VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId=
|
VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId=
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
VITE_BASE=/fe-student-release
|
VITE_BASE=/fe-student-release
|
||||||
VITE_BASE_API=/manageApi-release
|
VITE_BASE_API=/manageApi-release
|
||||||
|
VITE_LOGIN_URL=https://u.boe.com/web
|
||||||
|
|
||||||
|
|
||||||
VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc-release/course/studyindex?id=
|
VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc-release/course/studyindex?id=
|
||||||
VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc-release/case/detail?id=
|
VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc-release/case/detail?id=
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
* @FilePath: /fe-manage/src/api/config.js
|
* @FilePath: /fe-manage/src/api/config.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
import { message } from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import router from "@/router";
|
||||||
// import { getCookie } from '../api/method'
|
// import { getCookie } from '../api/method'
|
||||||
// const Qs = require("qs");
|
// const Qs = require("qs");
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ const http = axios.create({
|
|||||||
baseURL: process.env.VITE_BASE_API,
|
baseURL: process.env.VITE_BASE_API,
|
||||||
timeout: 1000 * 15,
|
timeout: 1000 * 15,
|
||||||
// headers: { "Content-Type": "multipart/form-data" },
|
// headers: { "Content-Type": "multipart/form-data" },
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: {"Content-Type": "application/json"},
|
||||||
});
|
});
|
||||||
|
|
||||||
http.interceptors.request.use(
|
http.interceptors.request.use(
|
||||||
@@ -49,15 +50,14 @@ http.interceptors.response.use(
|
|||||||
(response) => {
|
(response) => {
|
||||||
// console.log('response', response)
|
// console.log('response', response)
|
||||||
const {
|
const {
|
||||||
data: { code, msg },
|
data: {code, msg},
|
||||||
} = response;
|
} = response;
|
||||||
// console.log('code', code)
|
// console.log('code', code)
|
||||||
if (code === 0 || code === 200) {
|
if (code === 0 || code === 200) {
|
||||||
return response;
|
return response;
|
||||||
} else {
|
} else {
|
||||||
if (code === 1000) {
|
if (code === 1000) {
|
||||||
window.open("https://u-pre.boe.com/web/", '_self');
|
process.env.NODE_ENV === 'development' ? router.push({path: 'login'}) : (window.location.href = process.env.VITE_LOGIN_URL)
|
||||||
// window.open("http://111.231.196.214:12013/manage/login", '_self');
|
|
||||||
}
|
}
|
||||||
console.log("api %o", msg);
|
console.log("api %o", msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
const {defineConfig} = require("@vue/cli-service");
|
const {defineConfig} = require("@vue/cli-service");
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
publicPath: process.env.VITE_BASE,
|
publicPath: "/manage",
|
||||||
// transpileDependencies: true,
|
// transpileDependencies: true,
|
||||||
devServer: {
|
devServer: {
|
||||||
port: 8080,
|
port: 8080,
|
||||||
|
|||||||
Reference in New Issue
Block a user