yujialong 2 weeks ago
parent 2af18aa23c
commit 796f802fc5
  1. 7
      src/setting.js
  2. 4
      src/utils/api.js
  3. 20
      src/views/review/index.vue

@ -3,9 +3,10 @@
* */
const url = location.host;
const isDev = process.env.NODE_ENV === 'development' // 开发环境
const isPro = url.includes('huorantech.cn') //正式服
// const isPro = url.includes('huorantech.cn') //正式服
const isPro = url.includes('47.97.49.1') //正式服
let jumpPath = `${location.origin}/judgmentPoint/`
let jumpPath = `${location.origin}/panfen/`
let sandPath = `http://121.37.12.51/sandbox` // 沙盘地址
let host = `${location.origin}/`
if (isDev) {
@ -18,7 +19,7 @@ if (isDev) {
host = ips[+localStorage.getItem('ip')]
} else if (isPro) {
sandPath = `https://izhixinyun.com/sandbox`
jumpPath = 'https://judgment.huorantech.cn/'
// jumpPath = 'https://judgment.huorantech.cn/'
}

@ -106,8 +106,8 @@ export default {
editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理
copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理
// 判分点
getBcJudgmentPoint: `${jumpApi}judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页)
getLcJudgmentPoint: `${jumpApi}judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页)
getBcJudgmentPoint: `${host}judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页)
getLcJudgmentPoint: `${host}judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页)
addProjectJudgment: `occupationlab/occupationlab/projectJudgment/addProjectJudgment`, // 添加项目管理、判分点中间表
updateProjectJudgment: `occupationlab/occupationlab/projectJudgment/updateProjectJudgment`, // 判分点中间表批量更新
deleteProjectJudgment: `occupationlab/occupationlab/projectJudgment/deleteProjectJudgment`, // 判分点中间表批量删除

@ -13,20 +13,32 @@ export default {
};
},
mounted () {
const token = sessionStorage.getItem('token')
const cache = localStorage.getItem('reviewPath') // localStorage
let url = `${location.origin}/reviewCenter/`
if (Setting.isDev) url = `http://192.168.31.125:8099/`
if (cache) {
url += `#${cache}${cache.includes('?') ? `&` : '?'}token=${sessionStorage.getItem('token')}&nakadai=1`
url += '#' + this.replaceParam(cache, Date.now())
} else {
url += `#/myReview?token=${sessionStorage.getItem('token')}&nakadai=1`
url += `#/myReview?nakadai=1${Setting.isDev ? `&token=${token}` : ''}&v=${Date.now()}`
}
url += `&v=${Date.now()}`
localStorage.setItem('review_token', sessionStorage.getItem('token'))
console.log("🚀 ~ mounted ~ url:", url)
localStorage.setItem('review_token', token)
this.url = url
},
methods: {
replaceParam (url, newVValue) {
const vParamRegex = /v=[^&]+/g
let newUrl = url.replace(vParamRegex, `v=${newVValue}`)
const [baseUrl, hash] = newUrl.split('#');
if (hash) {
newUrl = `${baseUrl}#${hash.replace(vParamRegex, `v=${newVValue}`)}`
}
return newUrl
}
}
};
</script>

Loading…
Cancel
Save