增加数据缓存,去除部分请求的重复/

This commit is contained in:
2024-12-30 16:31:01 +08:00
parent cbcd1c857c
commit 6fb98974d6
15 changed files with 697 additions and 320 deletions

View File

@@ -21,11 +21,11 @@ class Request {
}
options.dataType = options.dataType || this.config.dataType;
options.responseType = options.responseType || this.config.responseType;
options.url = options.url || '';
options.url = (options.url || '');
options.params = options.params || {};
options.header = Object.assign({}, this.config.header, options.header);
options.method = options.method || this.config.method;
console.log(options);
return new Promise((resolve, reject) => {
options.complete = (response) => {
// 请求返回后隐藏loading(如果请求返回快的话可能会没有loading)