UNPKG

@lxlib/theme

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.

247 lines 40.8 kB
/** * @fileoverview added by tsickle * Generated from: src/services/http/http.client.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ import { HttpClient, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { of, throwError } from 'rxjs'; import { catchError, switchMap, tap } from 'rxjs/operators'; import { LxlibThemeConfig } from '../../theme.config'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common/http"; import * as i2 from "../../theme.config"; /** * 封装HttpClient,主要解决: * + 优化HttpClient在参数上便利性 * + 统一实现 loading * + 统一处理时间格式问题 */ // tslint:disable-next-line:class-name export class _HttpClient { /** * @param {?} http * @param {?} cog */ constructor(http, cog) { this.http = http; this._loading = false; this.cog = Object.assign({ nullValueHandling: 'include', dateValueHandling: 'timestamp' }, (/** @type {?} */ (cog)).http); } /** * 是否正在加载中 * @return {?} */ get loading() { return this._loading; } /** * @param {?} params * @return {?} */ parseParams(params) { /** @type {?} */ const newParams = {}; Object.keys(params).forEach((/** * @param {?} key * @return {?} */ key => { /** @type {?} */ let _data = params[key]; // 忽略空值 if (this.cog.nullValueHandling === 'ignore' && _data == null) return; // 将时间转化为:时间戳 (秒) if (this.cog.dateValueHandling === 'timestamp' && _data instanceof Date) { _data = _data.valueOf(); } newParams[key] = _data; })); return new HttpParams({ fromObject: newParams }); } /** * @param {?} url * @param {?=} params * @return {?} */ appliedUrl(url, params) { if (!params) return url; url += ~url.indexOf('?') ? '' : '?'; /** @type {?} */ const arr = []; // tslint:disable-next-line: forin for (const key in params) { arr.push(`${key}=${params[key]}`); } return url + arr.join('&'); } /** * @return {?} */ begin() { Promise.resolve(null).then((/** * @return {?} */ () => (this._loading = true))); } /** * @return {?} */ end() { Promise.resolve(null).then((/** * @return {?} */ () => (this._loading = false))); } /** * GET 请求 * @param {?} url * @param {?} params * @param {?=} options * @return {?} */ get(url, params, options = {}) { return this.request('GET', url, Object.assign({ params }, options)); } /** * POST 请求 * @param {?} url * @param {?} body * @param {?} params * @param {?=} options * @return {?} */ post(url, body, params, options = {}) { return this.request('POST', url, Object.assign({ body, params }, options)); } /** * DELETE 请求 * @param {?} url * @param {?} params * @param {?=} options * @return {?} */ delete(url, params, options = {}) { return this.request('DELETE', url, Object.assign({ params }, options)); } // #endregion // #region jsonp /** * `jsonp` 请求 * * @param {?} url URL地址 * @param {?=} params 请求参数 * @param {?=} callbackParam CALLBACK值,默认:JSONP_CALLBACK * @return {?} */ jsonp(url, params, callbackParam = 'JSONP_CALLBACK') { this.begin(); return this.http.jsonp(this.appliedUrl(url, params), callbackParam).pipe(tap((/** * @return {?} */ () => this.end())), catchError((/** * @param {?} res * @return {?} */ res => { this.end(); return throwError(res); }))); } /** * PATCH 请求 * @param {?} url * @param {?} body * @param {?} params * @param {?=} options * @return {?} */ patch(url, body, params, options = {}) { return this.request('PATCH', url, Object.assign({ body, params }, options)); } /** * PUT 请求 * @param {?} url * @param {?} body * @param {?} params * @param {?=} options * @return {?} */ put(url, body, params, options = {}) { return this.request('PUT', url, Object.assign({ body, params }, options)); } /** * 发送传统表单请求(即:`application/x-www-form-urlencoded`) * @param {?} url * @param {?} body * @param {?} params * @param {?=} options * @return {?} */ form(url, body, params, options = {}) { return this.request('POST', url, Object.assign(Object.assign({ body, params }, options), { headers: { 'content-type': `application/x-www-form-urlencoded`, } })); } /** * @param {?} method * @param {?} url * @param {?=} options * @return {?} */ request(method, url, options = {}) { this.begin(); if (options.params) options.params = this.parseParams(options.params); return of(null).pipe(tap((/** * @return {?} */ () => this.begin())), switchMap((/** * @return {?} */ () => this.http.request(method, url, options))), tap((/** * @return {?} */ () => this.end())), catchError((/** * @param {?} res * @return {?} */ res => { this.end(); return throwError(res); }))); } } _HttpClient.decorators = [ { type: Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ _HttpClient.ctorParameters = () => [ { type: HttpClient }, { type: LxlibThemeConfig } ]; /** @nocollapse */ _HttpClient.ɵprov = i0.ɵɵdefineInjectable({ factory: function _HttpClient_Factory() { return new _HttpClient(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.LxlibThemeConfig)); }, token: _HttpClient, providedIn: "root" }); if (false) { /** * @type {?} * @private */ _HttpClient.prototype.cog; /** * @type {?} * @private */ _HttpClient.prototype._loading; /** * @type {?} * @private */ _HttpClient.prototype.http; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cC5jbGllbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AbHhsaWIvdGhlbWUvIiwic291cmNlcyI6WyJzcmMvc2VydmljZXMvaHR0cC9odHRwLmNsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQTBCLFVBQVUsRUFBZ0IsTUFBTSxzQkFBc0IsQ0FBQztBQUNwRyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTNDLE9BQU8sRUFBYyxFQUFFLEVBQUUsVUFBVSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ2xELE9BQU8sRUFBRSxVQUFVLEVBQUUsU0FBUyxFQUFFLEdBQUcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzVELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG9CQUFvQixDQUFDOzs7Ozs7Ozs7O0FBYXRELHNDQUFzQztBQUN0QyxNQUFNLE9BQU8sV0FBVzs7Ozs7SUFFdEIsWUFBb0IsSUFBZ0IsRUFBRSxHQUFxQjtRQUF2QyxTQUFJLEdBQUosSUFBSSxDQUFZO1FBUTVCLGFBQVEsR0FBRyxLQUFLLENBQUM7UUFQdkIsSUFBSSxDQUFDLEdBQUcsbUJBQ04saUJBQWlCLEVBQUUsU0FBUyxFQUM1QixpQkFBaUIsRUFB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gICAgcGFyYW1zOiBhbnksXG4gICAgb3B0aW9uczoge1xuICAgICAgaGVhZGVycz86IF9IdHRwSGVhZGVycztcbiAgICAgIG9ic2VydmU6ICdyZXNwb25zZSc7XG4gICAgICByZXBvcnRQcm9ncmVzcz86IGJvb2xlYW47XG4gICAgICByZXNwb25zZVR5cGU/OiAnanNvbic7XG4gICAgICB3aXRoQ3JlZGVudGlhbHM/OiBib29sZWFuO1xuICAgIH0sXG4gICk6IE9ic2VydmFibGU8SHR0cFJlc3BvbnNlPGFueT4+O1xuXG4gIC8qKlxuICAgKiBQT1NU77ya6L+U5Zue5LiA5LiqIGBhbnlgIOexu+Wei1xuICAgKi9cbiAgcG9zdChcbiAgICB1cmw6IHN0cmluZyxcbiAgICBib2R5PzogYW55LFxuICAgIHBhcmFtcz86IGFueSxcbiAgICBvcHRpb25zPzoge1xuICAgICAgaGVhZGVycz86IF9IdHRwSGVhZGVycztcbiAgICAgIG9ic2VydmU/OiAnYm9keScgfCAnZXZlbnRzJyB8ICdyZXNwb25zZSc7XG4gICAgICByZXBvcnRQcm9ncmVzcz86IGJvb2xlYW47XG4gICAgICByZXNwb25zZVR5cGU/OiAnYXJyYXlidWZmZXInIHwgJ2Jsb2InIHwgJ2pzb24nIHwgJ3RleHQnO1xuICAgICAgd2l0aENyZWRlbnRpYWxzPzogYm9vbGVhbjtcbiAgICB9LFxuICApOiBPYnNlcnZhYmxlPGFueT47XG5cbiAgLyoqXG4gICAqIFBPU1TvvJrov5Tlm57kuIDkuKogYEpTT05gIOexu+Wei1xuICAgKi9cbiAgcG9zdDxUPihcbiAgICB1cmw6IHN0cmluZyxcbiAgICBib2R5PzogYW55LFxuICAgIHBhcmFtcz86IGFueSxcbiAgICBvcHRpb25zPzoge1xuICAgICAgaGVhZGVycz86IF9IdHRwSGVhZGVycztcbiAgICAgIG9ic2VydmU6ICdyZXNwb25zZSc7XG4gICAgICByZXBvcnRQcm9ncmVzcz86IGJvb2xlYW47XG4gICAgICByZXNwb25zZ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29sZWFuO1xuICAgIH0sXG4gICk6IE9ic2VydmFibGU8YW55PjtcblxuICAvKipcbiAgICogUFVU77ya6L+U5Zue5LiA5LiqIGBKU09OYCDnsbvlnotcbiAgICovXG4gIHB1dDxUPihcbiAgICB1cmw6IHN0cmluZyxcbiAgICBib2R5PzogYW55LFxuICAgIHBhcmFtcz86IGFueSxcbiAgICBvcHRpb25zPzoge1xuICAgICAgaGVhZGVycz86IF9IdHRwSGVhZGVycztcbiAgICAgIG9ic2VydmU6ICdyZXNwb25zZSc7XG4gICAgICByZXBvcnRQcm9ncmVzcz86IGJvb2xlYW47XG4gICAgICByZXNwb25zZVR5cGU/OiAnanNvbic7XG4gICAgICB3aXRoQ3JlZGVudGlhbHM/OiBib29sZWFuO1xuICAgIH0sXG4gICk6IE9ic2VydmFibGU8VD47XG5cbiAgLyoqXG4gICAqIFBVVCDor7fmsYJcbiAgICovXG4gIHB1dChcbiAgICB1cmw6IHN0cmluZyxcbiAgICBib2R5OiBhbnksXG4gICAgcGFyYW1zOiBhbnksXG4gICAgb3B0aW9uczoge1xuICAgICAgaGVhZGVycz86IF9IdHRwSGVhZGVycztcbiAgICAgIG9ic2VydmU/OiAnYm9keScgfCAnZXZlbnRzJyB8ICdyZXNwb25zZSc7XG4gICAgICByZXBvcnRQcm9ncmVzcz86IGJvb2xlYW47XG4gICAgICByZXNwb25zZVR5cGU/OiAnYXJyYXlidWZmZXInIHwgJ2Jsb2InIHwgJ2pzb24nIHwgJ3RleHQnO1xuICAgICAgd2l0aENyZWRlbnRpYWxzPzogYm9vbGVhbjtcbiAgICB9ID0ge30sXG4gICk6IE9ic2VydmFibGU8YW55PiB7XG4gICAgcmV0dXJuIHRoaXMucmVxdWVzdCgnUFVUJywgdXJsLCB7XG4gICAgICBib2R5LFxuICAgICAgcGFyYW1zLFxuICAgICAgLi4ub3B0aW9ucyxcbiAgICB9KTtcbiAgfVxuXG4gIC8vICNlbmRyZWdpb25cblxuICAvLyAjcmVnaW9uIGZvcm1c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25zZTxCbG9iPj47XG5cbiAgcmVxdWVzdChcbiAgICBtZXRob2Q6IHN0cmluZyxcbiAgICB1cmw6IHN0cmluZyxcbiAgICBvcHRpb25zOiB7XG4gICAgICBib2R5PzogYW55O1xuICAgICAgaGVhZGVycz86IF9IdHRwSGVhZGVycztcbiAgICAgIHBhcmFtcz86IGFueTtcbiAgICAgIG9ic2VydmU6ICdyZXNwb25zZSc7XG4gICAgICByZXBvcnRQcm9ncmVzcz86IGJvb2xlYW47XG4gICAgICByZXNwb25zZVR5cGU6ICd0ZXh0JztcbiAgICAgIHdpdGhDcmVkZW50aWFscz86IGJvb2xlYW47XG4gICAgfSxcbiAgKTogT2JzZXJ2YWJsZTxIdHRwUmVzcG9uc2U8c3RyaW5nPj47XG5cbiAgcmVxdWVzdChcbiAgICBtZXRob2Q6IHN0cmluZyxcbiAgICB1cmw6IHN0cmluZyxcbiAgICBvcHRpb25zOiB7XG4gICAgICBib2R5PzogYW55O1xuICAgICAgaGVhZGVycz86IF9IdHRwSGVhZGVycztcbiAgICAgIHBhcmFtcz86IGFueTtcbiAgICAgIHJlcG9ydFByb2dyZXNzPzogYm9vbGVhbjtcbiAgICAgIG9ic2VydmU6ICdyZXNwb25zZSc7XG4gICAgICByZXNwb25zZVR5cGU/OiAnanNvbic7XG4gICAgICB3aXRoQ3JlZGVudGlhbHM/OiBib29sZWFuO1xuICAgIH0sXG4gICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOiBiYW4tdHlwZXNcbiAgKTogT2JzZXJ2YWJsZTxIdHRwUmVzcG9uc2U8T2JqZWN0Pj47XG5cbiAgcmVxdWVzdDxSPihcbiAgICBtZXRob2Q6IHN0cmluZyxcbiAgICB1cmw6IHN0cmluZyxcbiAgICBvcHRpb25zOiB7XG4gICAgICBib2R5PzogYW55O1xuICAgICAgaGVhZGVycz86IF9IdHRwSGVhZGVycztcbiAgICAgIHBhcmFtcz86IGFueTtcbiAgICAgIHJlcG9ydFByb2dyZXNzPzogY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