Commit cb6f57a8 by 陆志强

Merge branch 'fix/login'

parents 5fdf3edf 00d487d0
import Cookie from 'js-cookie'
export default function({token, onFinished} = {token: ''}) {
const store = this.$store
const { uin } = this.$route.query
const { id } = this.$route.params
token && Cookie.set('token', token, { expires: 10 });
store._actions['users/getUerInfo'][0](uin)
store._actions['users/postInfo'][0](id)
this.$store.dispatch('users/getUerInfo', { uin })
setTimeout(() => {
this.$store.dispatch('users/postInfo', { id })
}, 1000)
onFinished && onFinished()
return this
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment