/*
 * @Description: 获取用户信息更新
 * @Author: 欧阳承珺
 * @LastEditors: 欧阳承珺
 * @Date: 2022-11-08 09:15:06
 * @LastEditTime: 2022-11-08 09:42:08
 */
export default function({store, app: {$axios}}) {
  if(store.state.token !== '') {
    $axios.get('members/getMemberInfo').then((res)=> {
      if(res.code === 200) {
        store.commit('setUser',res.result)
        localStorage.setItem('userInfo',JSON.stringify(res.result))
      }
    })
  }
}