| | |
| | | spellURL(devSuffix, serSuffix) { |
| | | let url = ''; |
| | | // mock地址 |
| | | if ($hostBoot.isDevMod()) { |
| | | if ($hostBoot.isOnMock()) { |
| | | url = this._data.urlPrefix[0].replace('api/', '') + devSuffix + '.json'; |
| | | } else { |
| | | url = this._data.urlPrefix[0] + devSuffix; |
| | | } |
| | | if ($hostBoot.isOnMock()) { |
| | | url = this._data.urlPrefix[0].replace('api/', '') + devSuffix + '.json'; |
| | | } |
| | | // 正常地址 |
| | | else { |
| | |
| | | * @param {String} url |
| | | * @param {*} [data] |
| | | * @param {object} [options] |
| | | * @return {Promise<any>|} |
| | | * @return {Promise<any>} |
| | | */ |
| | | query(type, url, data = null, options = {}) { |
| | | return new Promise((resolve, reject) => { |
| | |
| | | title: msg, |
| | | icon: 'none', |
| | | mask: false, |
| | | duration: type === 'fail' ? 3000 : 2000, |
| | | duration: (type === 'fail' || type === 'error') ? 3000 : 2000, |
| | | }); |
| | | } |
| | | |