Commit a8fcca92 by 陆志强

fix: 修复登录

parent 5fdf3edf
import Cookie from 'js-cookie' import Cookie from 'js-cookie'
export default function({token, onFinished} = {token: ''}) { export default function({token, onFinished} = {token: ''}) {
const store = this.$store
const { uin } = this.$route.query const { uin } = this.$route.query
const { id } = this.$route.params const { id } = this.$route.params
token && Cookie.set('token', token, { expires: 10 }); token && Cookie.set('token', token, { expires: 10 });
store._actions['users/getUerInfo'][0](uin) this.$store.dispatch('users/getUerInfo', { uin })
store._actions['users/postInfo'][0](id) this.$store.dispatch('users/postInfo', { id })
onFinished && onFinished() onFinished && onFinished()
return this 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