| | |
| | | urlPrefix: options.urlPrefix || ['/api/common/', '/api/common/'], |
| | | }; |
| | | if (project.host.mock === 'on') { |
| | | if (project.host.assetsPath.indexOf('..') === 0) { |
| | | this._defaultConfig.url = Fetcher.host + '/' + project.host.assetsPath.replace('/assets', '/mocks'); |
| | | } else { |
| | | this._defaultConfig.url = Fetcher.host + project.host.assetsPath.replace('/assets', '/mocks'); |
| | | } |
| | | } else { |
| | | this._defaultConfig.url = Fetcher.host; |
| | | } |
| | |
| | | msg += '解析通讯数据异常!'; |
| | | } |
| | | setTimeout(() => { |
| | | this.message('error', msg); |
| | | this.message('fail', msg); |
| | | }, 20); |
| | | } |
| | | |
| | |
| | | title: msg, |
| | | icon: 'none', |
| | | mask: true, |
| | | duration: type === 'error' ? 5000 : 3000, |
| | | duration: type === 'fail' ? 3000 : 2000, |
| | | }); |
| | | } |
| | | |