import { observable, action } from 'mobx-miniprogram'

export const user = observable({
  userinfo: {},
  token: '',

  setToken: action(function(token) {
    this.token = token
  }),
  setUserinfo: action(function(ui) {
    this.userinfo = ui
  }),
})