@lambo-design/shared 1.0.0-beta.225 → 1.0.0-beta.227

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.225",
3
+ "version": "1.0.0-beta.227",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -38,6 +38,33 @@ export async function getServiceUrlDict(serviceKeyList,serviceUrlList) {
38
38
  }
39
39
  }
40
40
 
41
+ export async function getTreeSelectServiceData(serviceKeyList,serviceUrlList) {
42
+ if (serviceUrlList.length > 0) {
43
+ try {
44
+ let result = {}
45
+ let requests = []
46
+ for (const url of serviceUrlList) {
47
+ requests.push(ajax.get(url))
48
+ }
49
+ const response = await Promise.all(requests);
50
+ // 处理每个响应
51
+ response.forEach((item, index) => {
52
+ if (item.data.code === 1) {
53
+ let treeSelectList = item.data.data;
54
+ result[serviceKeyList[index]] = [];
55
+ if (treeSelectList.length > 0) {
56
+ result[serviceKeyList[index]] = treeSelectList;
57
+ setSessionStorage(serviceKeyList[index] + '_LIST', treeSelectList);
58
+ }
59
+ }
60
+ });
61
+ return result;
62
+ } catch (error) {
63
+ console.error(error)
64
+ }
65
+ }
66
+ }
67
+
41
68
  export async function getAllDict(dictIdArray) {
42
69
  if (dictIdArray.length > 0) {
43
70
  try {
package/utils/security.js DELETED
@@ -1,13 +0,0 @@
1
- import NodeRSA from "node-rsa";
2
- import Base64 from "./base64";
3
-
4
- export const encodePwd = (password,publicKey) => {
5
- if (!publicKey) {
6
- publicKey = `MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDD2iolFHi+6bUh+V6JPr2gFJQsC0QNsq2EwI0MAPlI5AaizBHRVMjX1H73ptuDSiT3QZh4kk74w+eDLyYj4JXo1SvvDw5w378SLhUIDzH0zrlt3oleT3kiPQxC17yM3Os/wrtHO7IC+KGo9qrg+LJFyR/fYYHcyH9i+JAejBEnJQIDAQAB`
7
- }
8
- let nodeRSA = new NodeRSA(publicKey, "pkcs8-public");
9
- return nodeRSA.encrypt(password, 'base64');
10
- }
11
- export const getDefaultEncode = (password) => {
12
- return Base64.encode(encodePwd(password))
13
- }