@ -66,6 +66,7 @@ const user = {
}
commit('SET_NAME', user.userName)
commit('SET_AVATAR', avatar)
localStorage.setItem('USER_POOL_NAME_CURRENT',user.poolName)
resolve(res)
}).catch(error => {
reject(error)
@ -22,6 +22,9 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(config => {
if(localStorage.getItem('USER_POOL_NAME_CURRENT')){
config.headers['poolName'] = localStorage.getItem('USER_POOL_NAME_CURRENT');
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false
// 是否需要防止数据重复提交