api等修复

20240205
yujialong 2 years ago
parent 26a2656859
commit 2336946c0b
  1. 18
      src/api/api.js
  2. 12
      src/api/http.js
  3. 2
      src/layouts/header/index.vue
  4. 23
      src/pages/lobbyManager/list/index.vue
  5. 2
      src/setting.js

@ -1,14 +1,18 @@
import axios from 'axios'; import axios from 'axios';
import router from '../router'; 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实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
// baseURL: "http://www.huorantech.cn:9000",//线上 baseURL: host, // 测试
// 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',
timeout: 30000 // 请求超时时间 timeout: 30000 // 请求超时时间
}) })
// 添加request拦截器 // 添加request拦截器

@ -4,16 +4,16 @@ import {get, post,deletes,put} from './api.js'
// import axios from "./"; // import axios from "./";
// /api为配置跨域的路径变量 // /api为配置跨域的路径变量
export const getProjectBySystemId= (params) => { export const getProjectBySystemId= (params) => {
return get( '/occupationlab/projectManage/getProjectBySystemId',params) return get( '/occupationlab/occupationlab/projectManage/getProjectBySystemId',params)
} }
export const getProjectDetail= (params) => { export const getProjectDetail= (params) => {
return get( '/occupationlab/projectManage/getProjectDetail',params) return get( '/occupationlab/occupationlab/projectManage/getProjectDetail',params)
} }
export const submit= (params) => { export const submit= (params) => {
return post( '/bank/bank/submit',params) return post( '/bank/bank/submit',params)
} }
export const getSubjectInfo= (params) => { export const getSubjectInfo= (params) => {
return get( '/judgment/lcSubject/getSubjectInfo',params) return get( '/judgment/judgment/lcSubject/getSubjectInfo',params)
} }
export const getQueryCache= () => { export const getQueryCache= () => {
return get( '/bank/bank/queryCache') return get( '/bank/bank/queryCache')
@ -29,10 +29,10 @@ export const deleteCache= () => {
} }
// 学生查看考核状态 // 学生查看考核状态
export const checkTest= (params) => { export const checkTest= (params) => {
return get( '/occupationlab/assessment/getDetailById', {...params}) return get( '/occupationlab/occupationlab/assessment/getDetailById', {...params})
} }
export const checkTest2= (params) => { export const checkTest2= (params) => {
return post( '/occupationlab/assessment/pageStuAssessment',{ return post( '/occupationlab/occupationlab/assessment/pageStuAssessment',{
pageNum: 1, pageNum: 1,
pageSize: 10000, pageSize: 10000,
...params ...params
@ -40,7 +40,7 @@ export const checkTest2= (params) => {
} }
export const reportDetail = (reportId) => { export const reportDetail = (reportId) => {
return get( '/occupationlab/achievement/reportDetail',{ return get( '/occupationlab/occupationlab/achievement/reportDetail',{
reportId reportId
}) })
} }

@ -39,7 +39,7 @@ export default {
`http://www.occupationlab.com` : `http://www.occupationlab.com` :
process.env.NODE_ENV === 'development' ? process.env.NODE_ENV === 'development' ?
`http://192.168.31.155:8082` : `http://192.168.31.155:8082` :
`http://39.108.250.202/student` `http://121.37.12.51/student`
let assessmentId = sessionStorage.getItem('assessmentId') let assessmentId = sessionStorage.getItem('assessmentId')
if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){ if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){
href = `${host}/#/ass/list` href = `${host}/#/ass/list`

@ -238,7 +238,6 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
const projectId = sessionStorage.getItem('projectId') const projectId = sessionStorage.getItem('projectId')
const startTime = sessionStorage.getItem('startTime') const startTime = sessionStorage.getItem('startTime')
import { addOperation, getOperation } from '@/api/http' import { addOperation, getOperation } from '@/api/http'
@ -527,28 +526,6 @@ export default {
// //
toPart(){ toPart(){
this.$router.push('/index/list') this.$router.push('/index/list')
// let token = sessionStorage.getItem('token')
// let cid = sessionStorage.getItem('cid')
// let systemId = sessionStorage.getItem('systemId')
// let projectId = sessionStorage.getItem('projectId')
// let assessmentId = sessionStorage.getItem('assessmentId')
// let classId = sessionStorage.getItem('classId')
// if (projectId){
// //线
// // location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId+'&projectId='+projectId+'&assessmentId='+assessmentId+'&classId='+classId
// //
// location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId+'&projectId='+projectId+'&assessmentId='+assessmentId+'&classId='+classId
// //
// // location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId+'&projectId='+projectId+'&assessmentId='+assessmentId+'&classId='+classId
// }else{
// //线
// // location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
// //
// location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
// //
// // location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId
// }
}, },
dblClickFn(item,val){/* 选中/预览 单/双击函数 */ dblClickFn(item,val){/* 选中/预览 单/双击函数 */
let that = this let that = this

@ -15,7 +15,7 @@ const Setting = {
// 页面切换时,是否显示模拟的进度条 // 页面切换时,是否显示模拟的进度条
showProgressBar: true, showProgressBar: true,
// 接口请求地址 // 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.125:8888' : 'http://39.108.250.202:8000', // apiBaseURL: env === 'development' ? 'http://192.168.31.125:8888' : 'http://121.37.12.51:8000',
apiBaseURL: env === 'development' ? 'http://192.168.31.151:9000' : 'http://www.liuwanr.cn', apiBaseURL: env === 'development' ? 'http://192.168.31.151:9000' : 'http://www.liuwanr.cn',
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3, modalDuration: 3,

Loading…
Cancel
Save