| | |
| | | instance.interceptors.request.use( |
| | | (config) => { |
| | | const arr = urlKyc.filter((item) => item === url); |
| | | |
| | | if (arr.length !== 0 && store.state.user.kyc !== 2) { |
| | | return Toast.fail(i18n.t("请先实名认证!")); |
| | | } |
| | |
| | | instance.interceptors.response.use( |
| | | (result) => { |
| | | this.destroy(url); |
| | | |
| | | if (result.data.code == 0 || result.data.code == 200) { |
| | | return result.data; |
| | | } else if (result.data.code == 401) { |
| | |
| | | if (result.data.msg != undefined) { |
| | | Toast(i18n.t(result.data.msg)); |
| | | } |
| | | console.log(result, "====="); |
| | | return Promise.reject(result.data); |
| | | } |
| | | }, |