isdata-customer-sdk 0.2.46 → 0.2.48
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.common.js +55 -40
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +55 -40
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -29558,9 +29558,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29558
29558
|
addWindowTrustedOrigin: function() { return /* reexport */ addWindowTrustedOrigin; },
|
|
29559
29559
|
checkTextFormat: function() { return /* reexport */ checkTextFormat; },
|
|
29560
29560
|
createFileFromUrl: function() { return /* reexport */ createFileFromUrl; },
|
|
29561
|
-
decrypt: function() { return /* reexport */ decrypt; },
|
|
29562
29561
|
destroyEventCenter: function() { return /* reexport */ destroyEventCenter; },
|
|
29563
|
-
encrypt: function() { return /* reexport */ encrypt; },
|
|
29564
29562
|
extractFilenameFromUrl: function() { return /* reexport */ extractFilenameFromUrl; },
|
|
29565
29563
|
extractNewItems: function() { return /* reexport */ extractNewItems; },
|
|
29566
29564
|
findClosestAncestorByClass: function() { return /* reexport */ findClosestAncestorByClass; },
|
|
@@ -29583,7 +29581,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29583
29581
|
getI18nKey: function() { return /* reexport */ getI18nKey; },
|
|
29584
29582
|
getIMHanlder: function() { return /* reexport */ getIMHanlder; },
|
|
29585
29583
|
getIntegrateAppInfoByID: function() { return /* reexport */ getIntegrateAppInfoByID; },
|
|
29586
|
-
getKey: function() { return /* reexport */ getKey; },
|
|
29587
29584
|
getLanguages: function() { return /* reexport */ getLanguages; },
|
|
29588
29585
|
getLoginPageNotices: function() { return /* reexport */ getLoginPageNotices; },
|
|
29589
29586
|
getLoginPortalAccountKey: function() { return /* reexport */ getLoginPortalAccountKey; },
|
|
@@ -29593,6 +29590,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29593
29590
|
getObjectUseTimes: function() { return /* reexport */ getObjectUseTimes; },
|
|
29594
29591
|
getOfficeInfosByIDs: function() { return /* reexport */ getOfficeInfosByIDs; },
|
|
29595
29592
|
getPageIDByComponentID: function() { return /* reexport */ getPageIDByComponentID; },
|
|
29593
|
+
getPhoneNumberByAccountName: function() { return /* reexport */ getPhoneNumberByAccountName; },
|
|
29596
29594
|
getPlatformBortherMenusByMenuID: function() { return /* reexport */ getPlatformBortherMenusByMenuID; },
|
|
29597
29595
|
getPlatformMenuMappingsByRoleIDs: function() { return /* reexport */ getPlatformMenuMappingsByRoleIDs; },
|
|
29598
29596
|
getPojectDptsByUserAndGroupID: function() { return /* reexport */ getPojectDptsByUserAndGroupID; },
|
|
@@ -29611,7 +29609,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29611
29609
|
getThirdAppPathByKey: function() { return /* reexport */ getThirdAppPathByKey; },
|
|
29612
29610
|
getUrlParamValue: function() { return /* reexport */ getUrlParamValue; },
|
|
29613
29611
|
getUserAllMappngPortal: function() { return /* reexport */ getUserAllMappngPortal; },
|
|
29614
|
-
|
|
29612
|
+
getViewKey: function() { return /* reexport */ getViewKey; },
|
|
29615
29613
|
hasListener: function() { return /* reexport */ hasListener; },
|
|
29616
29614
|
hasUrlParams: function() { return /* reexport */ hasUrlParams; },
|
|
29617
29615
|
i18n: function() { return /* reexport */ i18n; },
|
|
@@ -29647,7 +29645,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29647
29645
|
updateI18nValue: function() { return /* reexport */ updateI18nValue; },
|
|
29648
29646
|
updateIMMapping: function() { return /* reexport */ updateIMMapping; },
|
|
29649
29647
|
updateUserSelectPortal: function() { return /* reexport */ updateUserSelectPortal; },
|
|
29650
|
-
validateSSOPageLoaded: function() { return /* reexport */ validateSSOPageLoaded; }
|
|
29648
|
+
validateSSOPageLoaded: function() { return /* reexport */ validateSSOPageLoaded; },
|
|
29649
|
+
viewDecrypt: function() { return /* reexport */ viewDecrypt; },
|
|
29650
|
+
viewEncrypt: function() { return /* reexport */ viewEncrypt; }
|
|
29651
29651
|
});
|
|
29652
29652
|
|
|
29653
29653
|
;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
@@ -30978,14 +30978,17 @@ const savePortalI18nText = async (key, value, lang, beyondID, i18nType) => {
|
|
|
30978
30978
|
return resultData;
|
|
30979
30979
|
};
|
|
30980
30980
|
|
|
30981
|
-
//
|
|
30982
|
-
const
|
|
30981
|
+
// 通过账户名和租户获取手机号
|
|
30982
|
+
const getPhoneNumberByAccountName = async (accountName, groupID) => {
|
|
30983
30983
|
let requestData = {
|
|
30984
|
-
param: {
|
|
30984
|
+
param: {
|
|
30985
|
+
accountName: accountName,
|
|
30986
|
+
groupID: groupID
|
|
30987
|
+
}
|
|
30985
30988
|
};
|
|
30986
|
-
let result = await request.post(`/dataservice/rest/orchestration/
|
|
30987
|
-
let
|
|
30988
|
-
return
|
|
30989
|
+
let result = await request.post(`/dataservice/rest/orchestration/getPhoneNumberByAccountName`, requestData);
|
|
30990
|
+
let phone = result.data.phone;
|
|
30991
|
+
return phone;
|
|
30989
30992
|
};
|
|
30990
30993
|
;// ./node_modules/ua-parser-js/src/main/ua-parser.mjs
|
|
30991
30994
|
// Generated ESM version of ua-parser-js
|
|
@@ -33652,6 +33655,16 @@ function processViewElement(element) {
|
|
|
33652
33655
|
viewCheckResult.scriptFunction();
|
|
33653
33656
|
return true;
|
|
33654
33657
|
}
|
|
33658
|
+
|
|
33659
|
+
// 获取所有i18n的类型
|
|
33660
|
+
const getAllI18nTypes = async () => {
|
|
33661
|
+
let requestData = {
|
|
33662
|
+
param: {}
|
|
33663
|
+
};
|
|
33664
|
+
let result = await request.post(`/dataservice/rest/orchestration/getAllI18nTypes`, requestData);
|
|
33665
|
+
let resultData = result.data.resultDatas;
|
|
33666
|
+
return resultData;
|
|
33667
|
+
};
|
|
33655
33668
|
;// ./src/api/security.js
|
|
33656
33669
|
|
|
33657
33670
|
|
|
@@ -33695,17 +33708,17 @@ const logoutAccount = async endside_type => {
|
|
|
33695
33708
|
/**
|
|
33696
33709
|
* 解密
|
|
33697
33710
|
*/
|
|
33698
|
-
const
|
|
33699
|
-
let secretKey = await
|
|
33711
|
+
const viewDecrypt = async decryptStr => {
|
|
33712
|
+
let secretKey = await getViewKey();
|
|
33700
33713
|
const decrypted = crypto_js_default().AES.decrypt(decryptStr, secretKey).toString((crypto_js_default()).enc.Utf8);
|
|
33701
33714
|
return decrypted;
|
|
33702
33715
|
};
|
|
33703
33716
|
|
|
33704
33717
|
/**
|
|
33705
|
-
*
|
|
33718
|
+
* 加密
|
|
33706
33719
|
*/
|
|
33707
|
-
const
|
|
33708
|
-
let secretKey = await
|
|
33720
|
+
const viewEncrypt = async decryptStr => {
|
|
33721
|
+
let secretKey = await getViewKey();
|
|
33709
33722
|
const encrypted = crypto_js_default().AES.encrypt(decryptStr, secretKey).toString();
|
|
33710
33723
|
return encrypted;
|
|
33711
33724
|
};
|
|
@@ -33715,7 +33728,7 @@ const encrypt = async decryptStr => {
|
|
|
33715
33728
|
*/
|
|
33716
33729
|
const switchPortalLogin = async (data, appid, endside_type) => {
|
|
33717
33730
|
let old_key = window.sessionStorage.getItem("iportal_login_user_key");
|
|
33718
|
-
old_key = await
|
|
33731
|
+
old_key = await viewDecrypt(old_key);
|
|
33719
33732
|
data.password = old_key;
|
|
33720
33733
|
let resultData = await logoutAccount(endside_type);
|
|
33721
33734
|
let resultCode = resultData.code;
|
|
@@ -33731,18 +33744,22 @@ const switchPortalLogin = async (data, appid, endside_type) => {
|
|
|
33731
33744
|
};
|
|
33732
33745
|
}
|
|
33733
33746
|
};
|
|
33734
|
-
|
|
33735
|
-
|
|
33736
|
-
|
|
33737
|
-
|
|
33738
|
-
|
|
33739
|
-
|
|
33740
|
-
|
|
33741
|
-
|
|
33742
|
-
|
|
33743
|
-
|
|
33744
|
-
|
|
33745
|
-
|
|
33747
|
+
|
|
33748
|
+
// export const getUserID = async (acccountName, old_key, group_id) => {
|
|
33749
|
+
// let queryData = {
|
|
33750
|
+
// param: {
|
|
33751
|
+
// accountName: acccountName,
|
|
33752
|
+
// group_id: group_id,
|
|
33753
|
+
// account_key: old_key,
|
|
33754
|
+
// },
|
|
33755
|
+
// };
|
|
33756
|
+
// let result = await request.post(
|
|
33757
|
+
// `/dataservice/rest/orchestration/getUserID`,
|
|
33758
|
+
// queryData
|
|
33759
|
+
// );
|
|
33760
|
+
// let persion_id = result.data.persion_id;
|
|
33761
|
+
// return persion_id;
|
|
33762
|
+
// };
|
|
33746
33763
|
|
|
33747
33764
|
/**
|
|
33748
33765
|
* 是否是安全账号
|
|
@@ -33785,9 +33802,9 @@ const loginAccount = async (data, appid) => {
|
|
|
33785
33802
|
//保存的正则2级密码
|
|
33786
33803
|
let key_code = result.data.codeData.code;
|
|
33787
33804
|
//反向解析一级密码
|
|
33788
|
-
pwd_code = await
|
|
33805
|
+
pwd_code = await viewDecrypt(pwd_code);
|
|
33789
33806
|
//反向解析2级密码
|
|
33790
|
-
key_code = await
|
|
33807
|
+
key_code = await viewDecrypt(key_code);
|
|
33791
33808
|
//密码匹配
|
|
33792
33809
|
if (pwd_code == data.password) {
|
|
33793
33810
|
//平台正向加密2级密码
|
|
@@ -33836,11 +33853,11 @@ const loginAccount = async (data, appid) => {
|
|
|
33836
33853
|
* 获取密钥
|
|
33837
33854
|
* @returns
|
|
33838
33855
|
*/
|
|
33839
|
-
const
|
|
33856
|
+
const getViewKey = async () => {
|
|
33840
33857
|
let queryData = {
|
|
33841
33858
|
param: {}
|
|
33842
33859
|
};
|
|
33843
|
-
let resultData = await request.post(`/dataservice/rest/orchestration/
|
|
33860
|
+
let resultData = await request.post(`/dataservice/rest/orchestration/getViewKey`, queryData);
|
|
33844
33861
|
let key = resultData.data.key;
|
|
33845
33862
|
return key;
|
|
33846
33863
|
};
|
|
@@ -34565,18 +34582,16 @@ const dify_extractFilenameFromUrl = url => {
|
|
|
34565
34582
|
};
|
|
34566
34583
|
;// ./src/api/sms.js
|
|
34567
34584
|
|
|
34568
|
-
|
|
34569
|
-
const sendSms = async (queryData, successCallback, errorCallback) => {
|
|
34570
|
-
let appid = getPoratlAppID();
|
|
34571
|
-
let appCustomData = await getAppCustomData(appid);
|
|
34572
|
-
let smsServerIP = appCustomData?.smsServerIP || "";
|
|
34585
|
+
const sendSms = async (smsServerIP, queryData, successCallback, errorCallback) => {
|
|
34573
34586
|
if (!smsServerIP) {
|
|
34574
34587
|
console.error("没有配置短信服务地址,请联系管理员");
|
|
34575
34588
|
if (errorCallback) errorCallback("没有配置短信服务地址,请联系管理员");
|
|
34576
34589
|
return;
|
|
34577
34590
|
}
|
|
34578
|
-
let
|
|
34579
|
-
|
|
34591
|
+
let options = {
|
|
34592
|
+
param: queryData
|
|
34593
|
+
};
|
|
34594
|
+
request.post(smsServerIP, JSON.stringify(options)).then(res => {
|
|
34580
34595
|
console.log("发送消息成功:", res);
|
|
34581
34596
|
if (successCallback) successCallback(res);
|
|
34582
34597
|
}).catch(error => {
|