diff --git a/src/api/api.js b/src/api/api.js index a064ffd..260783f 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -1,14 +1,18 @@ import axios from 'axios'; import router from '../router'; + +const url = location.host +const dev = process.env.NODE_ENV === 'development' // 开发环境 +let host = `${location.origin}/` +if (dev) { + // 本地 + host = 'http://121.37.12.51/' // 中台测试服 + // host = 'http://192.168.31.151:9000/' // 榕 + // host = 'http://192.168.31.137:9000/' // 赓 +} // 创建axios实例 const service = axios.create({ - // baseURL: "http://www.huorantech.cn:9000",//线上 - // baseURL: "http://124.71.12.62:9000",//线上 - baseURL: "http://39.108.250.202:9000/", // 中台测试服 - // baseURL: "http://192.168.31.137:9000/", // 赓 - // baseURL: "http://192.168.31.151:9000/", // 榕 - // baseURL: "http://192.168.31.125:9000/", // 坤 - // baseURL: 'http://39.108.250.202:9000', + baseURL: host, // 测试 timeout: 30000 // 请求超时时间 }) // 添加request拦截器 diff --git a/src/api/http.js b/src/api/http.js index 55bb292..567b97c 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -4,16 +4,16 @@ import {get, post,deletes,put} from './api.js' // import axios from "./"; // /api为配置跨域的路径变量 export const getProjectBySystemId= (params) => { - return get( '/occupationlab/projectManage/getProjectBySystemId',params) + return get( '/occupationlab/occupationlab/projectManage/getProjectBySystemId',params) } export const getProjectDetail= (params) => { - return get( '/occupationlab/projectManage/getProjectDetail',params) + return get( '/occupationlab/occupationlab/projectManage/getProjectDetail',params) } export const submit= (params) => { return post( '/bank/bank/submit',params) } export const getSubjectInfo= (params) => { - return get( '/judgment/lcSubject/getSubjectInfo',params) + return get( '/judgment/judgment/lcSubject/getSubjectInfo',params) } export const getQueryCache= () => { return get( '/bank/bank/queryCache') @@ -29,10 +29,10 @@ export const deleteCache= () => { } // 学生查看考核状态 export const checkTest= (params) => { - return get( '/occupationlab/assessment/getDetailById', {...params}) + return get( '/occupationlab/occupationlab/assessment/getDetailById', {...params}) } export const checkTest2= (params) => { - return post( '/occupationlab/assessment/pageStuAssessment',{ + return post( '/occupationlab/occupationlab/assessment/pageStuAssessment',{ pageNum: 1, pageSize: 10000, ...params @@ -40,7 +40,7 @@ export const checkTest2= (params) => { } export const reportDetail = (reportId) => { - return get( '/occupationlab/achievement/reportDetail',{ + return get( '/occupationlab/occupationlab/achievement/reportDetail',{ reportId }) } \ No newline at end of file diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index c7761f3..cd5f44a 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -39,7 +39,7 @@ export default { `http://www.occupationlab.com` : process.env.NODE_ENV === 'development' ? `http://192.168.31.155:8082` : - `http://39.108.250.202/student` + `http://121.37.12.51/student` let assessmentId = sessionStorage.getItem('assessmentId') if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){ href = `${host}/#/ass/list` diff --git a/src/pages/lobbyManager/list/index.vue b/src/pages/lobbyManager/list/index.vue index 71ba811..6a8f6fa 100644 --- a/src/pages/lobbyManager/list/index.vue +++ b/src/pages/lobbyManager/list/index.vue @@ -238,7 +238,6 @@