atr-components 0.2.236 → 0.2.237

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.
@@ -387,14 +387,18 @@ class ToolsUtil {
387
387
  }
388
388
  return date.getFullYear() + "-" + month + "-" + strDate + " " + hours + ":" + seconds;
389
389
  }
390
- static getOssUrl(url) {
390
+ static getOssUrl(url, needTime = false) {
391
391
  if (!url) {
392
392
  return "";
393
393
  }
394
+ if (needTime) {
395
+ url = url + "?v=" + new Date().getTime();
396
+ }
394
397
  if (url.startsWith("http")) {
395
398
  return url;
396
399
  }
397
- return atr_static_datas.OSS_URL + url + "?v=" + new Date().getTime();
400
+ let result = atr_static_datas.OSS_URL + url;
401
+ return result;
398
402
  }
399
403
  static getStaticOssUrl(url) {
400
404
  if (!url) {
@@ -403,8 +407,7 @@ class ToolsUtil {
403
407
  if (url.startsWith("http")) {
404
408
  return url;
405
409
  }
406
- let v = new Date().getTime();
407
- return atr_static_datas.STATIC_OSS_URL + url + "?v=" + v;
410
+ return atr_static_datas.STATIC_OSS_URL + url;
408
411
  }
409
412
  static removeHtml(value) {
410
413
  if (!value) {
@@ -1909,8 +1912,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1909
1912
  }] });
1910
1913
 
1911
1914
  class OssPipe {
1912
- transform(value, defaultVal) {
1913
- return ToolsUtil.getOssUrl(value);
1915
+ transform(value, defaultVal, needTime = false) {
1916
+ return ToolsUtil.getOssUrl(value, needTime);
1914
1917
  }
1915
1918
  }
1916
1919
  OssPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: OssPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });