@10yun/cv-mobile-ui 0.5.37 → 0.5.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/libs/amap-wx.130.js +485 -0
- package/libs/amap-wx.js +517 -0
- package/libs/highlight/github-dark.min.css +10 -0
- package/libs/highlight/highlight-uni.min.js +5256 -0
- package/libs/html-parser.js +352 -0
- package/libs/jweixin-module.js +1 -0
- package/libs/markdown-it.min.js +2 -0
- package/libs/md5.js +774 -0
- package/libs/permission.js +244 -0
- package/libs/qqmap-wx-jssdk.js +1178 -0
- package/package.json +2 -2
- package/plugins/luch-request/utils/clone.js +28 -32
- package/plugins/{map/uniMap.js → uniMap.js} +0 -20
- package/ui-cv/components/cv-code-sms/cv-code-sms.vue +9 -0
- package/uview-plus/libs/ctocode/index.js +1 -10
- package/uview-plus/libs/luch-request/adapters/index.js +113 -79
- package/uview-plus/libs/luch-request/core/InterceptorManager.js +19 -19
- package/uview-plus/libs/luch-request/core/Request.js +146 -146
- package/uview-plus/libs/luch-request/core/buildFullPath.js +7 -7
- package/uview-plus/libs/luch-request/core/defaults.js +27 -24
- package/uview-plus/libs/luch-request/core/dispatchRequest.js +4 -2
- package/uview-plus/libs/luch-request/core/mergeConfig.js +106 -84
- package/uview-plus/libs/luch-request/core/settle.js +7 -7
- package/uview-plus/libs/luch-request/helpers/buildURL.js +50 -48
- package/uview-plus/libs/luch-request/helpers/combineURLs.js +2 -4
- package/uview-plus/libs/luch-request/helpers/isAbsoluteURL.js +5 -5
- package/uview-plus/libs/luch-request/index.d.ts +184 -103
- package/uview-plus/libs/luch-request/index.js +2 -3
- package/uview-plus/libs/luch-request/readme.md +3 -0
- package/uview-plus/libs/luch-request/utils/clone.js +28 -32
- package/uview-plus/libs/luch-request/utils.js +41 -41
- package/plugins/map/lib/amap-wx.js +0 -1
- package/plugins/request.js +0 -571
- /package/{plugins/map → libs}/amqp-wx.js +0 -0
- /package/{plugins/map → libs}/qqmap.js +0 -0
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@10yun/cv-mobile-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.39",
|
|
4
4
|
"description": "十云cvjs移动端ui,适用uniapp",
|
|
5
5
|
"author": "10yun",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
-
"homepage": "
|
|
7
|
+
"homepage": "http://cvjs.cn/cv-mobile-ui/",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"registry": "https://registry.npmjs.org/"
|
|
10
10
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
var clone = (function() {
|
|
2
|
+
var clone = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _instanceof(obj, type) {
|
|
@@ -9,24 +9,24 @@ var clone = (function() {
|
|
|
9
9
|
var nativeMap;
|
|
10
10
|
try {
|
|
11
11
|
nativeMap = Map;
|
|
12
|
-
} catch(_) {
|
|
12
|
+
} catch (_) {
|
|
13
13
|
// maybe a reference error because no `Map`. Give it a dummy value that no
|
|
14
14
|
// value will ever be an instanceof.
|
|
15
|
-
nativeMap = function() {};
|
|
15
|
+
nativeMap = function () {};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
var nativeSet;
|
|
19
19
|
try {
|
|
20
20
|
nativeSet = Set;
|
|
21
|
-
} catch(_) {
|
|
22
|
-
nativeSet = function() {};
|
|
21
|
+
} catch (_) {
|
|
22
|
+
nativeSet = function () {};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var nativePromise;
|
|
26
26
|
try {
|
|
27
27
|
nativePromise = Promise;
|
|
28
|
-
} catch(_) {
|
|
29
|
-
nativePromise = function() {};
|
|
28
|
+
} catch (_) {
|
|
29
|
+
nativePromise = function () {};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -64,20 +64,16 @@ var clone = (function() {
|
|
|
64
64
|
|
|
65
65
|
var useBuffer = typeof Buffer != 'undefined';
|
|
66
66
|
|
|
67
|
-
if (typeof circular == 'undefined')
|
|
68
|
-
circular = true;
|
|
67
|
+
if (typeof circular == 'undefined') circular = true;
|
|
69
68
|
|
|
70
|
-
if (typeof depth == 'undefined')
|
|
71
|
-
depth = Infinity;
|
|
69
|
+
if (typeof depth == 'undefined') depth = Infinity;
|
|
72
70
|
|
|
73
71
|
// recurse this function so we don't reset allParents and allChildren
|
|
74
72
|
function _clone(parent, depth) {
|
|
75
73
|
// cloning null always returns null
|
|
76
|
-
if (parent === null)
|
|
77
|
-
return null;
|
|
74
|
+
if (parent === null) return null;
|
|
78
75
|
|
|
79
|
-
if (depth === 0)
|
|
80
|
-
return parent;
|
|
76
|
+
if (depth === 0) return parent;
|
|
81
77
|
|
|
82
78
|
var child;
|
|
83
79
|
var proto;
|
|
@@ -91,11 +87,14 @@ var clone = (function() {
|
|
|
91
87
|
child = new nativeSet();
|
|
92
88
|
} else if (_instanceof(parent, nativePromise)) {
|
|
93
89
|
child = new nativePromise(function (resolve, reject) {
|
|
94
|
-
parent.then(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
parent.then(
|
|
91
|
+
function (value) {
|
|
92
|
+
resolve(_clone(value, depth - 1));
|
|
93
|
+
},
|
|
94
|
+
function (err) {
|
|
95
|
+
reject(_clone(err, depth - 1));
|
|
96
|
+
}
|
|
97
|
+
);
|
|
99
98
|
});
|
|
100
99
|
} else if (clone.__isArray(parent)) {
|
|
101
100
|
child = [];
|
|
@@ -120,8 +119,7 @@ var clone = (function() {
|
|
|
120
119
|
if (typeof prototype == 'undefined') {
|
|
121
120
|
proto = Object.getPrototypeOf(parent);
|
|
122
121
|
child = Object.create(proto);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
122
|
+
} else {
|
|
125
123
|
child = Object.create(prototype);
|
|
126
124
|
proto = prototype;
|
|
127
125
|
}
|
|
@@ -138,14 +136,14 @@ var clone = (function() {
|
|
|
138
136
|
}
|
|
139
137
|
|
|
140
138
|
if (_instanceof(parent, nativeMap)) {
|
|
141
|
-
parent.forEach(function(value, key) {
|
|
139
|
+
parent.forEach(function (value, key) {
|
|
142
140
|
var keyChild = _clone(key, depth - 1);
|
|
143
141
|
var valueChild = _clone(value, depth - 1);
|
|
144
142
|
child.set(keyChild, valueChild);
|
|
145
143
|
});
|
|
146
144
|
}
|
|
147
145
|
if (_instanceof(parent, nativeSet)) {
|
|
148
|
-
parent.forEach(function(value) {
|
|
146
|
+
parent.forEach(function (value) {
|
|
149
147
|
var entryChild = _clone(value, depth - 1);
|
|
150
148
|
child.add(entryChild);
|
|
151
149
|
});
|
|
@@ -164,17 +162,16 @@ var clone = (function() {
|
|
|
164
162
|
continue;
|
|
165
163
|
}
|
|
166
164
|
child[i] = _clone(parent[i], depth - 1);
|
|
167
|
-
} catch(e){
|
|
165
|
+
} catch (e) {
|
|
168
166
|
if (e instanceof TypeError) {
|
|
169
167
|
// when in strict mode, TypeError will be thrown if child[i] property only has a getter
|
|
170
168
|
// we can't do anything about this, other than inform the user that this property cannot be set.
|
|
171
|
-
continue
|
|
169
|
+
continue;
|
|
172
170
|
} else if (e instanceof ReferenceError) {
|
|
173
171
|
//this may happen in non strict mode
|
|
174
|
-
continue
|
|
172
|
+
continue;
|
|
175
173
|
}
|
|
176
174
|
}
|
|
177
|
-
|
|
178
175
|
}
|
|
179
176
|
|
|
180
177
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -219,15 +216,14 @@ var clone = (function() {
|
|
|
219
216
|
* works.
|
|
220
217
|
*/
|
|
221
218
|
clone.clonePrototype = function clonePrototype(parent) {
|
|
222
|
-
if (parent === null)
|
|
223
|
-
return null;
|
|
219
|
+
if (parent === null) return null;
|
|
224
220
|
|
|
225
221
|
var c = function () {};
|
|
226
222
|
c.prototype = parent;
|
|
227
223
|
return new c();
|
|
228
224
|
};
|
|
229
225
|
|
|
230
|
-
// private utility functions
|
|
226
|
+
// private utility functions
|
|
231
227
|
|
|
232
228
|
function __objToStr(o) {
|
|
233
229
|
return Object.prototype.toString.call(o);
|
|
@@ -261,4 +257,4 @@ var clone = (function() {
|
|
|
261
257
|
return clone;
|
|
262
258
|
})();
|
|
263
259
|
|
|
264
|
-
export default clone
|
|
260
|
+
export default clone;
|
|
@@ -2,26 +2,6 @@
|
|
|
2
2
|
* uni-app 自带地图
|
|
3
3
|
*/
|
|
4
4
|
export default class uniMap {
|
|
5
|
-
/**
|
|
6
|
-
* 获取定位信息
|
|
7
|
-
*
|
|
8
|
-
* @return {Object}
|
|
9
|
-
* res.longitude //经度
|
|
10
|
-
* res.latitude //纬度
|
|
11
|
-
*/
|
|
12
|
-
static getLocation() {
|
|
13
|
-
return new Promise((resolve, reject) => {
|
|
14
|
-
uni.getLocation({
|
|
15
|
-
type: 'gcj02',
|
|
16
|
-
success: function (res) {
|
|
17
|
-
resolve(res);
|
|
18
|
-
},
|
|
19
|
-
fail(err) {
|
|
20
|
-
reject(err);
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
5
|
/**
|
|
26
6
|
* 选择地图
|
|
27
7
|
* @param {Object} keyword 搜索关键字
|
|
@@ -72,6 +72,10 @@ export default {
|
|
|
72
72
|
btnType: {
|
|
73
73
|
type: [String],
|
|
74
74
|
default: 'default'
|
|
75
|
+
},
|
|
76
|
+
onSendBefore: {
|
|
77
|
+
type: Function,
|
|
78
|
+
default: null
|
|
75
79
|
}
|
|
76
80
|
},
|
|
77
81
|
watch: {
|
|
@@ -120,6 +124,11 @@ export default {
|
|
|
120
124
|
},
|
|
121
125
|
/******获取短信验证码************************************* */
|
|
122
126
|
getSmsCode() {
|
|
127
|
+
if (this.onSendBefore && typeof this.onSendBefore == 'function') {
|
|
128
|
+
if (!this.onSendBefore()) {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
123
132
|
if (!this.localMobile) {
|
|
124
133
|
this.showDiyMsg('手机号不正确');
|
|
125
134
|
return;
|
|
@@ -91,10 +91,6 @@ export function cc_copy(data) {
|
|
|
91
91
|
console.log(content);
|
|
92
92
|
content = typeof content === 'string' ? content : content.toString(); // 复制内容,必须字符串,数字需要转换为字符串
|
|
93
93
|
|
|
94
|
-
/**
|
|
95
|
-
* 小程序端 和 app端的复制逻辑
|
|
96
|
-
*/
|
|
97
|
-
//#ifndef H5
|
|
98
94
|
uni.setClipboardData({
|
|
99
95
|
data: content,
|
|
100
96
|
success: function () {
|
|
@@ -105,13 +101,8 @@ export function cc_copy(data) {
|
|
|
105
101
|
success && success('复制失败');
|
|
106
102
|
}
|
|
107
103
|
});
|
|
108
|
-
//#endif
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* H5端的复制逻辑
|
|
112
|
-
*/
|
|
113
104
|
// #ifdef H5
|
|
114
|
-
copyToClipboard(content, success, error);
|
|
105
|
+
// copyToClipboard(content, success, error);
|
|
115
106
|
// #endif
|
|
116
107
|
}
|
|
117
108
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import buildURL from '../helpers/buildURL'
|
|
2
|
-
import buildFullPath from '../core/buildFullPath'
|
|
3
|
-
import settle from '../core/settle'
|
|
4
|
-
import { isUndefined } from '../utils'
|
|
1
|
+
import buildURL from '../helpers/buildURL';
|
|
2
|
+
import buildFullPath from '../core/buildFullPath';
|
|
3
|
+
import settle from '../core/settle';
|
|
4
|
+
import { isUndefined } from '../utils';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* 返回可选值存在的配置
|
|
@@ -10,88 +10,122 @@ import { isUndefined } from '../utils'
|
|
|
10
10
|
* @return {{}} - 存在的配置项
|
|
11
11
|
*/
|
|
12
12
|
const mergeKeys = (keys, config2) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
return config
|
|
20
|
-
}
|
|
21
|
-
export default (config) => new Promise((resolve, reject) => {
|
|
22
|
-
const fullPath = buildURL(buildFullPath(config.baseURL, config.url), config.params)
|
|
23
|
-
const _config = {
|
|
24
|
-
url: fullPath,
|
|
25
|
-
header: config.header,
|
|
26
|
-
complete: (response) => {
|
|
27
|
-
config.fullPath = fullPath
|
|
28
|
-
response.config = config
|
|
29
|
-
try {
|
|
30
|
-
// 对可能字符串不是json 的情况容错
|
|
31
|
-
if (typeof response.data === 'string') {
|
|
32
|
-
response.data = JSON.parse(response.data)
|
|
33
|
-
}
|
|
34
|
-
// eslint-disable-next-line no-empty
|
|
35
|
-
} catch (e) {
|
|
36
|
-
}
|
|
37
|
-
settle(resolve, reject, response)
|
|
38
|
-
}
|
|
13
|
+
let config = {};
|
|
14
|
+
keys.forEach((prop) => {
|
|
15
|
+
if (!isUndefined(config2[prop])) {
|
|
16
|
+
config[prop] = config2[prop];
|
|
39
17
|
}
|
|
40
|
-
|
|
18
|
+
});
|
|
19
|
+
return config;
|
|
20
|
+
};
|
|
21
|
+
export default (config) => {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
let fullPath = buildURL(buildFullPath(config.baseURL, config.url), config.params, config.paramsSerializer);
|
|
24
|
+
const _config = {
|
|
25
|
+
url: fullPath,
|
|
26
|
+
header: config.header,
|
|
27
|
+
complete: (response) => {
|
|
28
|
+
config.fullPath = fullPath;
|
|
29
|
+
response.config = config;
|
|
30
|
+
response.rawData = response.data;
|
|
31
|
+
try {
|
|
32
|
+
let jsonParseHandle = false;
|
|
33
|
+
const forcedJSONParsingType = typeof config.forcedJSONParsing;
|
|
34
|
+
if (forcedJSONParsingType === 'boolean') {
|
|
35
|
+
jsonParseHandle = config.forcedJSONParsing;
|
|
36
|
+
} else if (forcedJSONParsingType === 'object') {
|
|
37
|
+
const includesMethod = config.forcedJSONParsing.include || [];
|
|
38
|
+
jsonParseHandle = includesMethod.includes(config.method);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// 对可能字符串不是json 的情况容错
|
|
42
|
+
if (jsonParseHandle && typeof response.data === 'string') {
|
|
43
|
+
response.data = JSON.parse(response.data);
|
|
44
|
+
}
|
|
45
|
+
// eslint-disable-next-line no-empty
|
|
46
|
+
} catch (e) {}
|
|
47
|
+
settle(resolve, reject, response);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
let requestTask;
|
|
41
51
|
if (config.method === 'UPLOAD') {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
52
|
+
delete _config.header['content-type'];
|
|
53
|
+
delete _config.header['Content-Type'];
|
|
54
|
+
let otherConfig = {
|
|
45
55
|
// #ifdef MP-ALIPAY
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
fileType: config.fileType,
|
|
57
|
+
// #endif
|
|
58
|
+
filePath: config.filePath,
|
|
59
|
+
name: config.name
|
|
60
|
+
};
|
|
61
|
+
const optionalKeys = [
|
|
52
62
|
// #ifdef APP-PLUS || H5
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
'files',
|
|
64
|
+
// #endif
|
|
65
|
+
// #ifdef H5
|
|
66
|
+
'file',
|
|
67
|
+
// #endif
|
|
68
|
+
// #ifdef H5 || APP-PLUS || MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO || MP-KUAISHOU
|
|
69
|
+
'timeout',
|
|
70
|
+
// #endif
|
|
71
|
+
'formData'
|
|
72
|
+
];
|
|
73
|
+
requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys(optionalKeys, config) });
|
|
64
74
|
} else if (config.method === 'DOWNLOAD') {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
const optionalKeys = [
|
|
76
|
+
// #ifdef H5 || APP-PLUS || MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO || MP-KUAISHOU
|
|
77
|
+
'timeout',
|
|
78
|
+
// #endif
|
|
79
|
+
// #ifdef MP
|
|
80
|
+
'filePath'
|
|
69
81
|
// #endif
|
|
70
|
-
|
|
82
|
+
];
|
|
83
|
+
requestTask = uni.downloadFile({ ..._config, ...mergeKeys(optionalKeys, config) });
|
|
71
84
|
} else {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
// #endif
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
const optionalKeys = [
|
|
86
|
+
'data',
|
|
87
|
+
'method',
|
|
88
|
+
// #ifdef H5 || APP-PLUS || MP-ALIPAY || MP-WEIXIN
|
|
89
|
+
'timeout',
|
|
90
|
+
// #endif
|
|
91
|
+
'dataType',
|
|
92
|
+
// #ifndef MP-ALIPAY
|
|
93
|
+
'responseType',
|
|
94
|
+
// #endif
|
|
95
|
+
// #ifdef APP-PLUS
|
|
96
|
+
'sslVerify',
|
|
97
|
+
// #endif
|
|
98
|
+
// #ifdef H5
|
|
99
|
+
'withCredentials',
|
|
100
|
+
// #endif
|
|
101
|
+
// #ifdef APP-PLUS
|
|
102
|
+
'firstIpv4',
|
|
103
|
+
// #endif
|
|
104
|
+
// #ifdef MP-WEIXIN
|
|
105
|
+
'enableHttp2',
|
|
106
|
+
'enableQuic',
|
|
107
|
+
// #endif
|
|
108
|
+
// #ifdef MP-TOUTIAO || MP-WEIXIN
|
|
109
|
+
'enableCache',
|
|
110
|
+
// #endif
|
|
111
|
+
// #ifdef MP-WEIXIN
|
|
112
|
+
'enableHttpDNS',
|
|
113
|
+
'httpDNSServiceId',
|
|
114
|
+
'enableChunked',
|
|
115
|
+
'forceCellularNetwork',
|
|
116
|
+
// #endif
|
|
117
|
+
// #ifdef MP-ALIPAY
|
|
118
|
+
'enableCookie',
|
|
119
|
+
// #endif
|
|
120
|
+
// #ifdef MP-BAIDU
|
|
121
|
+
'cloudCache',
|
|
122
|
+
'defer'
|
|
123
|
+
// #endif
|
|
124
|
+
];
|
|
125
|
+
requestTask = uni.request({ ..._config, ...mergeKeys(optionalKeys, config) });
|
|
93
126
|
}
|
|
94
127
|
if (config.getTask) {
|
|
95
|
-
|
|
128
|
+
config.getTask(requestTask, config);
|
|
96
129
|
}
|
|
97
|
-
})
|
|
130
|
+
});
|
|
131
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
3
|
function InterceptorManager() {
|
|
4
|
-
|
|
4
|
+
this.handlers = [];
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -13,12 +13,12 @@ function InterceptorManager() {
|
|
|
13
13
|
* @return {Number} An ID used to remove interceptor later
|
|
14
14
|
*/
|
|
15
15
|
InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
16
|
+
this.handlers.push({
|
|
17
|
+
fulfilled: fulfilled,
|
|
18
|
+
rejected: rejected
|
|
19
|
+
});
|
|
20
|
+
return this.handlers.length - 1;
|
|
21
|
+
};
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Remove an interceptor from the stack
|
|
@@ -26,10 +26,10 @@ InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
|
|
26
26
|
* @param {Number} id The ID that was returned by `use`
|
|
27
27
|
*/
|
|
28
28
|
InterceptorManager.prototype.eject = function eject(id) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
29
|
+
if (this.handlers[id]) {
|
|
30
|
+
this.handlers[id] = null;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Iterate over all the registered interceptors
|
|
@@ -40,11 +40,11 @@ InterceptorManager.prototype.eject = function eject(id) {
|
|
|
40
40
|
* @param {Function} fn The function to call for each interceptor
|
|
41
41
|
*/
|
|
42
42
|
InterceptorManager.prototype.forEach = function forEach(fn) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
43
|
+
this.handlers.forEach((h) => {
|
|
44
|
+
if (h !== null) {
|
|
45
|
+
fn(h);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
49
|
|
|
50
|
-
export default InterceptorManager
|
|
50
|
+
export default InterceptorManager;
|