| | |
| | | } |
| | | } else { |
| | | if (response.statusCode == 200) { |
| | | if (this.interceptor.response && typeof this.interceptor.response === 'function') { |
| | | if (this.interceptor.response && typeof this.interceptor.response === |
| | | 'function') { |
| | | let resInterceptors = this.interceptor.response(response.data); |
| | | if (resInterceptors !== false) { |
| | | resolve(resInterceptors); |
| | |
| | | } |
| | | } |
| | | |
| | | // 夿æ¯å¦ä¸ºå®æ´ URLï¼å¦ææ¯åä¸ä½¿ç¨ baseUrl |
| | | if (options.url.includes('http://') || options.url.includes('https://')) { |
| | | options.url = options.url; |
| | | } else { |
| | | // å¤æç¨æ·ä¼ éçURLæ¯å¦/å¼å¤´,妿䏿¯,å ä¸/ï¼è¿é使ç¨äºuViewçtest.jséªè¯åºçurl()æ¹æ³ |
| | | options.url = validate.url(options.url) ? options.url : (this.config.baseUrl + (options.url.indexOf('/') == 0 ? |
| | | options.url = validate.url(options.url) ? options.url : (this.config.baseUrl + (options.url |
| | | .indexOf('/') == 0 ? |
| | | options.url : '/' + options.url)); |
| | | } |
| | | |
| | | // æ¯å¦æ¾ç¤ºloading |
| | | // å ä¸ä¸ªæ¯å¦å·²ætimer宿¶å¨ç夿ï¼å¦åæä¸¤ä¸ªåæ¶è¯·æ±çæ¶åï¼åè
伿¸
é¤åè
ç宿¶å¨id |