Commit 3847ca83 authored by FE-安焕焕's avatar FE-安焕焕 👣

修改路由跳转问题

parent f4f653d2
...@@ -7,29 +7,25 @@ import qs from 'qs' ...@@ -7,29 +7,25 @@ import qs from 'qs'
export function getpersonMassage(params) { export function getpersonMassage(params) {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.get(`${sapi}/api/login/me`,params,{headers: { return axios.get(`${sapi}/api/login/me`,params,{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
// 用户退出 // 用户退出
export function loginOUT() { export function loginOUT() {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.get(`${sapi}/api/login/logout`,{headers: { return axios.get(`${sapi}/api/login/logout`,{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
//通过某一来源查询简历信息 //通过某一来源查询简历信息
export function adoptOneSeeResumeList(parmars) { export function adoptOneSeeResumeList(parmars) {
return axios.post(`${sapi}/api/resume/findListBySource`,parmars,{headers: { return axios.post(`${sapi}/api/resume/findListBySource`,parmars,{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
//通过渠道机简历信息 //通过渠道机简历信息
export function getChannelMassage() { export function getChannelMassage() {
return axios.get(`${sapi}/api/resume/getSourceList`,{headers: { return axios.get(`${sapi}/api/resume/getSourceList`,{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
\ No newline at end of file
...@@ -7,8 +7,7 @@ import qs from 'qs' ...@@ -7,8 +7,7 @@ import qs from 'qs'
export function login(params) { export function login(params) {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.post(`${sapi}/api/login/doLogin`,params,{headers: { return axios.post(`${sapi}/api/login/doLogin`,params,{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
//修改密码 //修改密码
......
...@@ -19,8 +19,7 @@ export function downloadone (parmars) { ...@@ -19,8 +19,7 @@ export function downloadone (parmars) {
// 搜索 // 搜索
export function sousuoList (parmars) { export function sousuoList (parmars) {
return axios.post(`${sapi}/api/resume/findListByQueryVO`,parmars,{headers: { return axios.post(`${sapi}/api/resume/findListByQueryVO`,parmars,{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
//查看简历详情页 //查看简历详情页
...@@ -51,8 +50,7 @@ export function OPTION (parmars) { ...@@ -51,8 +50,7 @@ export function OPTION (parmars) {
// 删除简历 // 删除简历
export function deleteREsume (deleteallArr) { export function deleteREsume (deleteallArr) {
return axios.post(`${sapi}/api/resume/delete`,JSON.stringify(deleteallArr),{headers: { return axios.post(`${sapi}/api/resume/delete`,JSON.stringify(deleteallArr),{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
// 单条下载简历 // 单条下载简历
...@@ -84,21 +82,18 @@ export function recodeLIST (parmars) { ...@@ -84,21 +82,18 @@ export function recodeLIST (parmars) {
//通过某一来源查询简历信息 //通过某一来源查询简历信息
export function adoptOneSeeResumeList(parmars) { export function adoptOneSeeResumeList(parmars) {
return axios.post(`${sapi}/api/resume/findListBySource`,parmars,{headers: { return axios.post(`${sapi}/api/resume/findListBySource`,parmars,{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
// 新增约面信息 // 新增约面信息
export function addinterview(parmars) { export function addinterview(parmars) {
return axios.post(`${sapi}/api/resumeInterview/add`,parmars,{headers: { return axios.post(`${sapi}/api/resumeInterview/add`,parmars,{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
// 修改流程状态 // 修改流程状态
export function updatastatus(parmars) { export function updatastatus(parmars) {
return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${parmars.id}/${parmars.status}`,{headers: {
'Content-Type':'application/json', 'Content-Type':'application/json'
'X-Requested-With':'XMLHttpRequest'
}}) }})
} }
\ No newline at end of file
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
</template> </template>
<script> <script>
import {getpersonMassage,loginOUT,adoptOneSeeResumeList,getChannelMassage} from '../api/home.server.js' import {getpersonMassage,loginOUT,adoptOneSeeResumeList,getChannelMassage} from '../api/home.server.js'
import localstorage from '../service/localstorage.service.js'
export default{ export default{
data() { data() {
return { return {
...@@ -99,6 +100,8 @@ import {getpersonMassage,loginOUT,adoptOneSeeResumeList,getChannelMassage} from ...@@ -99,6 +100,8 @@ import {getpersonMassage,loginOUT,adoptOneSeeResumeList,getChannelMassage} from
loginOut(){ loginOut(){
loginOUT().then(res=>{ loginOUT().then(res=>{
if(res.data.success==true){ if(res.data.success==true){
localstorage.remove('token')
localstorage.remove('isADMIN')
this.$router.push('/login') this.$router.push('/login')
} }
}) })
...@@ -132,7 +135,7 @@ import {getpersonMassage,loginOUT,adoptOneSeeResumeList,getChannelMassage} from ...@@ -132,7 +135,7 @@ import {getpersonMassage,loginOUT,adoptOneSeeResumeList,getChannelMassage} from
}, },
// 普通用户权限 // 普通用户权限
getMenu(){ getMenu(){
let condition=localStorage.getItem('isADMIN') let condition=localstorage.get('isADMIN')
this.isadmin=condition this.isadmin=condition
if(condition == 'false'){ if(condition == 'false'){
this.menuList[3].child.splice(0,1) this.menuList[3].child.splice(0,1)
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
<script> <script>
import { login} from '../../api/login.server.js' import { login} from '../../api/login.server.js'
import localstorage from '../../service/localstorage.service.js'
export default { export default {
data () { data () {
return { return {
...@@ -85,8 +86,9 @@ export default { ...@@ -85,8 +86,9 @@ export default {
} }
if(res.data.success==true){ if(res.data.success==true){
this.ISIDMIN=res.data.body this.ISIDMIN=res.data.body
localstorage.set('token', res.data.body.token)
this.$router.push({name:"allResume"}) this.$router.push({name:"allResume"})
localStorage.setItem('isADMIN',JSON.stringify(this.ISIDMIN)) localstorage.set('isADMIN',JSON.stringify(this.ISIDMIN))
return return
} }
if(res.data.success==false){ if(res.data.success==false){
......
...@@ -7,30 +7,30 @@ ...@@ -7,30 +7,30 @@
<span style="border-radius:5px;width:80px;height:30px;background:rgba(0,146,255,1); position: absolute;left:75%;line-height:30px;text-align:center;font-size:20px;color:#FFFFFF" @click="downloadONE(downresume)">下载</span> <span style="border-radius:5px;width:80px;height:30px;background:rgba(0,146,255,1); position: absolute;left:75%;line-height:30px;text-align:center;font-size:20px;color:#FFFFFF" @click="downloadONE(downresume)">下载</span>
</p> </p>
<div style="width:40%;height:250px;float:left;margin-left:60px"> <div style="width:40%;height:250px;float:left;margin-left:60px">
<span class="userD">姓名:{{resume.ownerName}}</span><br> <span class="userD">姓名:{{resume&&resume.ownerName}}</span><br>
<span class="userD">联系电话:{{resume.ownerMobile}}</span><br> <span class="userD">联系电话:{{resume&&resume.ownerMobile}}</span><br>
<span class="userD">电子邮箱:{{resume.email}}</span><br> <span class="userD">电子邮箱:{{resume&&resume.email}}</span><br>
<span class="userD">所在地:{{resume.locationCity}}</span><br> <span class="userD">所在地:{{resume&&resume.locationCity}}</span><br>
</div> </div>
<div style="float:left;height:250px;width:40%"> <div style="float:left;height:250px;width:40%">
<span class="ageD">年龄:{{resume.ownerAge}}</span><br> <span class="ageD">年龄:{{resume&&resume.ownerAge}}</span><br>
<span class="ageD">职位:{{resume.ownerExpectTitles}}</span><br> <span class="ageD">职位:{{resume&&resume.ownerExpectTitles}}</span><br>
<span class="ageD">学历:{{resume.ownerHighestDegree}}</span><br> <span class="ageD">学历:{{resume&&resume.ownerHighestDegree}}</span><br>
<span class="ageD">经验:{{resume.workYearsOriginal}}</span><br> <span class="ageD">经验:{{resume&&resume.workYearsOriginal}}</span><br>
</div> </div>
</div> </div>
<div style="float:left;width:100%"> <div style="float:left;width:100%">
<p style="width:90%;height:30px;line-height30px;background:rgba(0,146,255,1);"> <p style="width:90%;height:30px;line-height30px;background:rgba(0,146,255,1);">
<img src="https://o7oe0d6qz.qnssl.com/image/qiuzhi.png" alt="" style="width:29px;height:20px;margin-left:20px;vertical-align:middle;margin-top:-7px"> <img src="https://o7oe0d6qz.qnssl.com/image/qiuzhi.png" alt="" style="width:29px;height:20px;margin-left:20px;vertical-align:middle;margin-top:-7px">
<span style="font-size:18px;margin:5px 0 0 5px;color:#FFFFFF">求职状态:{{resume.statusMessage}}</span> <span style="font-size:18px;margin:5px 0 0 5px;color:#FFFFFF">求职状态:{{resume&&resume.statusMessage}}</span>
</p> </p>
<div style="width:40%;height:150px;float:left;margin-left:60px"> <div style="width:40%;height:150px;float:left;margin-left:60px">
<span class="qiwangzhiye">期望行业:{{resume.industries}}</span><br> <span class="qiwangzhiye">期望行业:{{resume&&resume.industries}}</span><br>
<span class="qiwangzhiye">期望职位:{{resume.expectTitles}}</span> <span class="qiwangzhiye">期望职位:{{resume&&resume.expectTitles}}</span>
</div> </div>
<div style="width:40%;height:150px;float:left;"> <div style="width:40%;height:150px;float:left;">
<span class="noneyD">期望薪资:{{resume.expectSalary}}</span><br> <span class="noneyD">期望薪资:{{resume&&resume.expectSalary}}</span><br>
<span class="noneyD">期望地点:{{resume.city}}</span> <span class="noneyD">期望地点:{{resume&&resume.city}}</span>
</div> </div>
</div> </div>
<div class="workExperience" style="float:left;width:100%"> <div class="workExperience" style="float:left;width:100%">
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</p> </p>
<div> <div>
<p style="margin-top:30px;margin-left:60px;font-size:15px;width:80%;line-height:30px"> <p style="margin-top:30px;margin-left:60px;font-size:15px;width:80%;line-height:30px">
{{resume.selfEvaluate}} {{resume&&resume.selfEvaluate}}
</p> </p>
</div> </div>
</div> </div>
......
...@@ -83,11 +83,7 @@ export default new Router({ ...@@ -83,11 +83,7 @@ export default new Router({
path: '/upload', path: '/upload',
name: 'upload', name: 'upload',
component: upload component: upload
},{ }
path: '/resumeDetail',
name: 'resumeDetail',
component: resumeDetail
},
] ]
}, },
], ],
......
import Cookie from './cookie.service.js' import localstorage from './localstorage.service.js'
export default{ export default{
init: function (router) { init: function (router) {
router.beforeEach((to, form, next) => { router.beforeEach((to, form, next) => {
let token = Cookie.get('quantgroup_token') let token = localstorage.get('token')
if (!token&&to.name!=='login'&&to.name!=='text') { if (!token&&to.name!=='login'&&to.name!=='text') {
window.location.href = `${window.location.origin}/login` window.location.href = `${window.location.origin}/login`
return return
......
export default{
set: function (name, value) {window.localStorage.setItem(name, value)},
get: function (name) {
return window.localStorage.getItem(name)
},
remove: function (name) {window.localStorage.removeItem(name)}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment