Commit 7cf3a74a authored by 吴冠's avatar 吴冠

token

parent 061babff
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
}, },
mounted(){ mounted(){
let tokenStr = window.sessionStorage.getItem("token") let tokenStr = sessionStorage.getItem("token")
if(tokenStr){ if(tokenStr){
this.showDefault = false this.showDefault = false
this.userName = window.sessionStorage.getItem("companyName") this.userName = sessionStorage.getItem("companyName")
} }
}, },
data() { data() {
...@@ -54,12 +54,13 @@ ...@@ -54,12 +54,13 @@
jump(){ jump(){
let token=sessionStorage.getItem("token") let token=sessionStorage.getItem("token")
if(token){ if(token){
window.location.href="http://192.168.200.201:8082/#/purchaser/Home" /* window.location.href="http://192.168.200.201:8082/#/purchaser/Home" */
window.location.href=`http://192.168.200.201:8082/#/purchaser/Home?token=${token}`
} }
// window.location.href=`http://localhost:8080/purchaser/Home?token=${token}` /* window.location.href=`http://192.168.200.201:8082/#/purchaser/Home?token=${token}` */
}, },
getUserName(){ getUserName(){
return window.sessionStorage.getItem("companyName"); return sessionStorage.getItem("companyName");
} }
}, },
......
...@@ -22,7 +22,7 @@ import {getAllList} from '@/common/list.js' ...@@ -22,7 +22,7 @@ import {getAllList} from '@/common/list.js'
methods:{ methods:{
async toSearch(){ async toSearch(){
this.$router.push('notice/all') this.$router.push('notice/all')
window.sessionStorage.setItem("content",this.input) sessionStorage.setItem("content",this.input)
} }
}, },
data() { data() {
......
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