WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2021-11-09 02678dabad78baa4a1b5745cdc5cdc907f219c02
bases/Fetcher.js
@@ -82,12 +82,8 @@
        }
        // 正常模式
        else {
            // 代理模式
            if (typeof project.host.proxyType !== 'undefined' && project.host.proxyType !== 'lc') {
                url = '/proxy' + this._data.urlPrefix[1] + (serSuffix || devSuffix);
            }
            // 开发环境地址
            else if (Fetcher.inDevMod) {
            if (Fetcher.inDevMod) {
                url = this._data.urlPrefix[0] + devSuffix;
            }
            // 生产环境地址
@@ -110,7 +106,7 @@
     * @param {object} [options]
     * @return {Promise<any>}
     */
    get(url, data, options = null) {
    get(url, data, options = {}) {
        const params = Qs.stringify(data);
        if (url.indexOf('?') >= 0) {
            url += '&' + params;
@@ -127,7 +123,7 @@
     * @param {object} [options]
     * @return {Promise<any>}
     */
    post(url, data, options = null) {
    post(url, data, options = {}) {
        if (this._data.mock === 'on') {
            return this.get(url, data, options);
        }