| | |
| | | if (config.data) { |
| | | // config.data = qs.stringify(config.data) |
| | | } |
| | | }else if(config.method == 'get' && config.data){ |
| | | config.params = config.data |
| | | } |
| | | const userStore = useUserStore() |
| | | const TOKEN = userStore.userInfo.token |
| | |
| | | config.headers['token'] = TOKEN |
| | | // config.params['token'] = TOKEN |
| | | } |
| | | config.params['language'] = getStorage('lang') || "en" |
| | | if(!config.params['not_language']) config.params['language'] = getStorage('lang') || "en" |
| | | |
| | | if (config.loading) { |
| | | showLoadingToast({ forbidClick: true, duration: 0 }) |
| | | isClose = true |
| | | } |
| | | |
| | | return config |
| | | }, error => { |
| | | return Promise.reject(error) |