| | |
| | | import { setStore, getStore } from '@/utils/store' |
| | | import { validatenull } from '@/utils/validate' |
| | | import md5 from 'js-md5' |
| | | import { ElMessage } from 'element-plus'; |
| | | import { showNotify } from 'vant'; |
| | | import { setToken, setRefreshToken, removeToken, removeRefreshToken } from '@/utils/auth' |
| | | |
| | | const user = { |
| | |
| | | .then((res) => { |
| | | const data = res.data |
| | | if (data.error_description) { |
| | | ElMessage.error(data.error_description) |
| | | showNotify({ type: 'danger', message: data.error_description }) |
| | | } else { |
| | | commit('SET_LOGIN_FLAG', true) |
| | | commit('SET_TOKEN', data.access_token) |