@Action publicasyncGetUserInfo() { if (this.token === '') { throwError('GetUserInfo: token is undefined!') } const { data } = await getUserInfo({ id: this.id }) if (!data) { throwError('Verification failed, please Login again.') }
const { roles, name, avatar, email } = data.user // roles must be a non-empty array if (!roles || roles.length <= 0) { throwError('GetUserInfo: roles must be a non-null array!') }
// https://webpack.js.org/configuration/devtool/#development // Change development env source map if you want. // The default in vue-cli is 'eval-cheap-module-source-map'. config .when(process.env.NODE_ENV === 'development', config => config.devtool('source-map') )