efront 3.28.0 → 3.28.1

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.
@@ -286,16 +286,18 @@ function cross_(jsonp, digest = noop, method, url, headers) {
286
286
  }
287
287
  location = getRequestProtocol(url) + "//" + location;
288
288
  }
289
- var crs = cross_.call(cross, jsonp, digest, method, location, _headers);
290
- crs.isRedirected = (xhr.isRedirected || 0) + 1;
291
- crs.done(onload, false);
292
- crs.error(onerror, false);
293
- if (!isEmpty(datas)) crs.send(datas);
289
+ if (!redirected) redirected = [];
290
+ headers = _headers;
291
+ url = location;
292
+ var r = method + " " + url;
293
+ if (redirected.indexOf(r) >= 0 || redirected.length > 10) onerror(xhr);
294
+ else redirected.push(r), fire();
294
295
  break;
295
296
  default:
296
297
  onerror(xhr);
297
298
  }
298
299
  };
300
+ var redirected = null;
299
301
  var cross = this;
300
302
  var xhr = cross(callback, onerror);
301
303
  var send = xhr.send;
@@ -327,6 +329,8 @@ function cross_(jsonp, digest = noop, method, url, headers) {
327
329
  };
328
330
  var fire = async function (code) {
329
331
  if (!~requests.indexOf(xhr)) return;
332
+ xhr.method = method;
333
+ xhr.url = url;
330
334
  xhr.encrypt = code;
331
335
  var isform = /^f/i.test(method);
332
336
  if (isform) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.28.0",
3
+ "version": "3.28.1",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {