ls-pro-common 3.0.85 → 3.0.86
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/dist/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/utils/index.js +5 -2
- package/lib/utils/index.js +5 -2
- package/package.json +1 -1
package/es/utils/index.js
CHANGED
|
@@ -902,8 +902,11 @@ export var downloadFile = function downloadFile(url, fileName) {
|
|
|
902
902
|
a.href = url;
|
|
903
903
|
// 如果导出域名有配置,则优先使用导出域名
|
|
904
904
|
var baseExportUrl = getCache('exportUrl') || '';
|
|
905
|
-
|
|
906
|
-
|
|
905
|
+
var token = getCookie('token') || '';
|
|
906
|
+
if (baseExportUrl && !url.startsWith('http') && token) {
|
|
907
|
+
a.href = setUrlQuery(baseExportUrl + url, {
|
|
908
|
+
token: token
|
|
909
|
+
});
|
|
907
910
|
}
|
|
908
911
|
// a.target = '_blank'; // 新开屏有闪烁
|
|
909
912
|
if (fileName) {
|
package/lib/utils/index.js
CHANGED
|
@@ -902,8 +902,11 @@ export var downloadFile = function downloadFile(url, fileName) {
|
|
|
902
902
|
a.href = url;
|
|
903
903
|
// 如果导出域名有配置,则优先使用导出域名
|
|
904
904
|
var baseExportUrl = getCache('exportUrl') || '';
|
|
905
|
-
|
|
906
|
-
|
|
905
|
+
var token = getCookie('token') || '';
|
|
906
|
+
if (baseExportUrl && !url.startsWith('http') && token) {
|
|
907
|
+
a.href = setUrlQuery(baseExportUrl + url, {
|
|
908
|
+
token: token
|
|
909
|
+
});
|
|
907
910
|
}
|
|
908
911
|
// a.target = '_blank'; // 新开屏有闪烁
|
|
909
912
|
if (fileName) {
|