WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2024-03-19 a250b6216753cfd0c0622a1fbc0f3254fc8e0a4f
bases/Fetcher.js
@@ -125,7 +125,7 @@
     * @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) => {
@@ -150,8 +150,8 @@
                    // 捕获响应
                    options && options.onCapture && options.onCapture({
                        url: this._createUrlPrefix(options) + url,
                        request: JSON.stringify(data),
                        response: JSON.stringify(response.data),
                        request: data,
                        response: { ...response.data },
                        httpCode: response.statusCode,
                    });
                    /**
@@ -173,7 +173,7 @@
                        // 捕获响应
                        options && options.onCapture && options.onCapture({
                            url: this._createUrlPrefix(options) + url,
                            request: JSON.stringify(data),
                            request: data,
                            httpCode: error && error.status,
                            httpMsg: msg + (error.message ? (' / ' + error.message) : ''),
                        });