pull/57/head
parent
57737265b5
commit
60dc3db7aa
|
@ -54,6 +54,8 @@
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
login(){
|
login(){
|
||||||
|
var store=this.$store.state
|
||||||
|
|
||||||
// "username": "xiaomeng",
|
// "username": "xiaomeng",
|
||||||
// "password": "lihe12345"
|
// "password": "lihe12345"
|
||||||
if(!this.username){
|
if(!this.username){
|
||||||
|
@ -86,6 +88,7 @@
|
||||||
message: '登陆成功',
|
message: '登陆成功',
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
|
store.equipmentIndex=1
|
||||||
localStorage.setItem('token',res.data.data.token)
|
localStorage.setItem('token',res.data.data.token)
|
||||||
localStorage.setItem('userInfo',JSON.stringify(res.data.data))
|
localStorage.setItem('userInfo',JSON.stringify(res.data.data))
|
||||||
this.$router.push({ name: 'index' })
|
this.$router.push({ name: 'index' })
|
||||||
|
|
Loading…
Reference in New Issue