dlt-for-react 2.0.12 → 2.0.13

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 CHANGED
@@ -8,7 +8,7 @@ npm publish
8
8
 
9
9
  ## 前端 dlt-for-react 依赖包版本更新记录
10
10
 
11
- ##### 当前最新版本:2.0.12
11
+ ##### 当前最新版本:2.0.13
12
12
 
13
13
  ##### 安装依赖
14
14
 
@@ -16,7 +16,7 @@ npm publish
16
16
 
17
17
  ##### 版本修改记录
18
18
 
19
- #### V2.0.12—2024 年 4 月 22 日
19
+ #### V2.0.13—2024 年 4 月 22 日
20
20
 
21
21
  1. 新增 getRedirect、setRedirect 添加|获取重定向地址
22
22
 
@@ -646,7 +646,7 @@ var setRedirect = exports.setRedirect = function setRedirect() {
646
646
  var userId = (0, _index.getLoginUser)().userId;
647
647
  var projectName = window.location.host + window.location.pathname; // 区分同源项目
648
648
  projectName = userId ? encodeURIComponent(userId + "-" + projectName) : encodeURIComponent(projectName); // 区分同项目不同用户
649
- var oldData = session.get("routerAfterLogin", {});
649
+ var oldData = _index.session.get("routerAfterLogin", {});
650
650
  var currentUrl = value || location.hash.split("#")[1];
651
651
  var routerAfterLogin = (0, _extends4.default)({}, oldData);
652
652
  if (action === "add") {
@@ -654,14 +654,14 @@ var setRedirect = exports.setRedirect = function setRedirect() {
654
654
  } else if (action === "remove") {
655
655
  delete routerAfterLogin[projectName];
656
656
  }
657
- session.set("routerAfterLogin", routerAfterLogin);
657
+ _index.session.set("routerAfterLogin", routerAfterLogin);
658
658
  };
659
659
  // 获取重定向缓存地址
660
660
  var getRedirect = exports.getRedirect = function getRedirect(key) {
661
661
  var userId = (0, _index.getLoginUser)().userId;
662
662
  var projectName = window.location.host + window.location.pathname;
663
663
  var name = userId ? encodeURIComponent(userId + "-" + projectName) : encodeURIComponent(projectName);
664
- var routerAfterLogin = session.get("routerAfterLogin", {});
664
+ var routerAfterLogin = _index.session.get("routerAfterLogin", {});
665
665
  var url = key ? routerAfterLogin[key] : routerAfterLogin[name] || routerAfterLogin[encodeURIComponent(projectName)];
666
666
  return url ? decodeURIComponent(url) : url;
667
667
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlt-for-react",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "dlt for react",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {