| | |
| | | if (response.data.code === 5112) { |
| | | uni.showToast({ |
| | | title: '登录过期,正在重新跳转授权', |
| | | icon: 'none', |
| | | duration: 2000, |
| | | success() { |
| | | setTimeout(() => { |
| | |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | // if (response.data.message) { |
| | | // const tm = response.data.message |
| | | // const list = tm.split(' ') |
| | | // let msg = list[0] |
| | | // if (list.length > 1 && response.data.data) { |
| | | // msg = decryptedData(list[1], list[0]) |
| | | // response.data.data = decryptedData(list[1], response.data.data) |
| | | // response.data.message = msg |
| | | // } |
| | | // } |
| | | if (response.data.message) { |
| | | const tm = response.data.message |
| | | const list = tm.split(' ') |
| | | let msg = list[0] |
| | | if (list.length > 1 && response.data.data) { |
| | | msg = decryptedData(list[1], list[0]) |
| | | response.data.data = decryptedData(list[1], response.data.data) |
| | | console.log(response.data.data) |
| | | response.data.message = msg |
| | | } |
| | | } |
| | | return response.data; |
| | | }, (response) => { |
| | | return Promise.reject(response) |