|
|
@ -146,7 +146,8 @@ |
|
|
}) |
|
|
}) |
|
|
}).then(({data}) => { |
|
|
}).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.$cookie.set('token', data.token) |
|
|
|
|
|
|
|
|
// 设置Cookie过期时间为8小时,与后端token同步 - rqrq |
|
|
|
|
|
this.$cookie.set('token', data.token, { expires: '8h' }) |
|
|
this.$router.replace({ name: 'home' }) |
|
|
this.$router.replace({ name: 'home' }) |
|
|
this.$i18n.locale=data.language |
|
|
this.$i18n.locale=data.language |
|
|
localStorage.setItem('locale', data.language) |
|
|
localStorage.setItem('locale', data.language) |
|
|
|