1
This commit is contained in:
		
							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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 孙萌
						孙萌