@bit-sun/business-component 3.0.0-alpha.29 → 3.0.0-alpha.30

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/index.esm.js CHANGED
@@ -701,17 +701,17 @@ function getCurrentTargetBgId() {
701
701
  }
702
702
  // 菜单按钮权限 存储/获取key 函数
703
703
  var getMenuAuthDataKey = function getMenuAuthDataKey(channel) {
704
- var prefix = channel;
705
- // 传入channel 则使用传入的channel 作为前缀,一般存储key使用
706
- // 否则使用下面页面路径处理后的变量为前缀,一般获取key使用
707
- if (!channel) {
708
- var _window$top, _window$top$location;
709
- var channelPlat = (_window$top = window.top) === null || _window$top === void 0 ? void 0 : (_window$top$location = _window$top.location) === null || _window$top$location === void 0 ? void 0 : _window$top$location.pathname;
710
- var defaultPrefix = 'CONFIG_PC';
711
- var mapping = ENUM.MAIN_AUTH_MAPPING;
712
- prefix = channelPlat && (mapping === null || mapping === void 0 ? void 0 : mapping[channelPlat]) || defaultPrefix;
713
- }
714
- return "".concat(prefix, ":").concat(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES);
704
+ return "".concat(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES);
705
+ // let prefix = channel
706
+ // // 传入channel 则使用传入的channel 作为前缀,一般存储key使用
707
+ // // 否则使用下面页面路径处理后的变量为前缀,一般获取key使用
708
+ // if(!channel) {
709
+ // const channelPlat: string | undefined = window.top?.location?.pathname
710
+ // const defaultPrefix = 'CONFIG_PC';
711
+ // const mapping: any = ENUM.MAIN_AUTH_MAPPING;
712
+ // prefix = channelPlat && mapping?.[channelPlat] || defaultPrefix
713
+ // }
714
+ // return `${prefix}:${ENUM.BROWSER_CACHE.MAIN_AUTH_CODES}`
715
715
  };
716
716
 
717
717
  var resposne$1 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
package/dist/index.js CHANGED
@@ -723,17 +723,17 @@ function getCurrentTargetBgId() {
723
723
  }
724
724
  // 菜单按钮权限 存储/获取key 函数
725
725
  var getMenuAuthDataKey = function getMenuAuthDataKey(channel) {
726
- var prefix = channel;
727
- // 传入channel 则使用传入的channel 作为前缀,一般存储key使用
728
- // 否则使用下面页面路径处理后的变量为前缀,一般获取key使用
729
- if (!channel) {
730
- var _window$top, _window$top$location;
731
- var channelPlat = (_window$top = window.top) === null || _window$top === void 0 ? void 0 : (_window$top$location = _window$top.location) === null || _window$top$location === void 0 ? void 0 : _window$top$location.pathname;
732
- var defaultPrefix = 'CONFIG_PC';
733
- var mapping = ENUM.MAIN_AUTH_MAPPING;
734
- prefix = channelPlat && (mapping === null || mapping === void 0 ? void 0 : mapping[channelPlat]) || defaultPrefix;
735
- }
736
- return "".concat(prefix, ":").concat(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES);
726
+ return "".concat(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES);
727
+ // let prefix = channel
728
+ // // 传入channel 则使用传入的channel 作为前缀,一般存储key使用
729
+ // // 否则使用下面页面路径处理后的变量为前缀,一般获取key使用
730
+ // if(!channel) {
731
+ // const channelPlat: string | undefined = window.top?.location?.pathname
732
+ // const defaultPrefix = 'CONFIG_PC';
733
+ // const mapping: any = ENUM.MAIN_AUTH_MAPPING;
734
+ // prefix = channelPlat && mapping?.[channelPlat] || defaultPrefix
735
+ // }
736
+ // return `${prefix}:${ENUM.BROWSER_CACHE.MAIN_AUTH_CODES}`
737
737
  };
738
738
 
739
739
  var resposne$1 = JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "3.0.0-alpha.29",
3
+ "version": "3.0.0-alpha.30",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -96,16 +96,17 @@ export function getCurrentTargetBgId() {
96
96
 
97
97
  // 菜单按钮权限 存储/获取key 函数
98
98
  export const getMenuAuthDataKey = (channel?: string) => {
99
- let prefix = channel
100
-
101
- // 传入channel 则使用传入的channel 作为前缀,一般存储key使用
102
- // 否则使用下面页面路径处理后的变量为前缀,一般获取key使用
103
- if(!channel) {
104
- const channelPlat: string | undefined = window.top?.location?.pathname
105
- const defaultPrefix = 'CONFIG_PC';
106
- const mapping: any = ENUM.MAIN_AUTH_MAPPING;
107
- prefix = channelPlat && mapping?.[channelPlat] || defaultPrefix
108
- }
109
-
110
- return `${prefix}:${ENUM.BROWSER_CACHE.MAIN_AUTH_CODES}`
99
+ return `${ENUM.BROWSER_CACHE.MAIN_AUTH_CODES}`;
100
+ // let prefix = channel
101
+
102
+ // // 传入channel 则使用传入的channel 作为前缀,一般存储key使用
103
+ // // 否则使用下面页面路径处理后的变量为前缀,一般获取key使用
104
+ // if(!channel) {
105
+ // const channelPlat: string | undefined = window.top?.location?.pathname
106
+ // const defaultPrefix = 'CONFIG_PC';
107
+ // const mapping: any = ENUM.MAIN_AUTH_MAPPING;
108
+ // prefix = channelPlat && mapping?.[channelPlat] || defaultPrefix
109
+ // }
110
+
111
+ // return `${prefix}:${ENUM.BROWSER_CACHE.MAIN_AUTH_CODES}`
111
112
  }