18 lines
358 B
Plaintext
18 lines
358 B
Plaintext
<script>
|
|
import store from '@/store'
|
|
|
|
export default {
|
|
created() {
|
|
const { params, query } = this.$route
|
|
const { path } = params
|
|
if (query.token) {
|
|
store.dispatch('user/setToken', query.token)
|
|
}
|
|
this.$router.replace({ path: '/' + path, query })
|
|
},
|
|
render: function(h) {
|
|
return h() // avoid warning message
|
|
}
|
|
}
|
|
</script>
|