|
@@ -88,9 +88,14 @@ export default {
|
|
|
this.isDisabled = false
|
|
|
if (data.status) {
|
|
|
const { token } = data.data
|
|
|
+ const { next } = this.$route.query
|
|
|
this.$store.commit('user/updateToken', token)
|
|
|
this.$cookie.set('token', token)
|
|
|
- this.$router.replace({ name: 'home' })
|
|
|
+ if (next) {
|
|
|
+ location.replace(decodeURIComponent(next))
|
|
|
+ } else {
|
|
|
+ this.$router.replace({ name: 'home' })
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
this.$message.error(data.msg)
|