|
|
@ -76,6 +76,7 @@ |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import CommonLayout from '@/layouts/CommonLayout' |
|
|
|
import CommonLayout from '@/layouts/CommonLayout' |
|
|
|
import {login} from '@/services' |
|
|
|
import {login} from '@/services' |
|
|
|
|
|
|
|
import Cookie from 'js-cookie' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'Login', |
|
|
|
name: 'Login', |
|
|
@ -111,6 +112,7 @@ export default { |
|
|
|
const user = result.data.user |
|
|
|
const user = result.data.user |
|
|
|
this.$router.push('/dashboard/workplace') |
|
|
|
this.$router.push('/dashboard/workplace') |
|
|
|
this.$store.commit('account/setUser', user) |
|
|
|
this.$store.commit('account/setUser', user) |
|
|
|
|
|
|
|
Cookie.set('token', result.data.token) |
|
|
|
this.$message.success(result.message, 3) |
|
|
|
this.$message.success(result.message, 3) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.error = result.message |
|
|
|
this.error = result.message |
|
|
|