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.umd.js
CHANGED
|
@@ -29576,9 +29576,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29576
29576
|
addWindowTrustedOrigin: function() { return /* reexport */ addWindowTrustedOrigin; },
|
|
29577
29577
|
checkTextFormat: function() { return /* reexport */ checkTextFormat; },
|
|
29578
29578
|
createFileFromUrl: function() { return /* reexport */ createFileFromUrl; },
|
|
29579
|
-
decrypt: function() { return /* reexport */ decrypt; },
|
|
29580
29579
|
destroyEventCenter: function() { return /* reexport */ destroyEventCenter; },
|
|
29581
|
-
encrypt: function() { return /* reexport */ encrypt; },
|
|
29582
29580
|
extractFilenameFromUrl: function() { return /* reexport */ extractFilenameFromUrl; },
|
|
29583
29581
|
extractNewItems: function() { return /* reexport */ extractNewItems; },
|
|
29584
29582
|
findClosestAncestorByClass: function() { return /* reexport */ findClosestAncestorByClass; },
|
|
@@ -29601,7 +29599,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29601
29599
|
getI18nKey: function() { return /* reexport */ getI18nKey; },
|
|
29602
29600
|
getIMHanlder: function() { return /* reexport */ getIMHanlder; },
|
|
29603
29601
|
getIntegrateAppInfoByID: function() { return /* reexport */ getIntegrateAppInfoByID; },
|
|
29604
|
-
getKey: function() { return /* reexport */ getKey; },
|
|
29605
29602
|
getLanguages: function() { return /* reexport */ getLanguages; },
|
|
29606
29603
|
getLoginPageNotices: function() { return /* reexport */ getLoginPageNotices; },
|
|
29607
29604
|
getLoginPortalAccountKey: function() { return /* reexport */ getLoginPortalAccountKey; },
|
|
@@ -29611,6 +29608,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29611
29608
|
getObjectUseTimes: function() { return /* reexport */ getObjectUseTimes; },
|
|
29612
29609
|
getOfficeInfosByIDs: function() { return /* reexport */ getOfficeInfosByIDs; },
|
|
29613
29610
|
getPageIDByComponentID: function() { return /* reexport */ getPageIDByComponentID; },
|
|
29611
|
+
getPhoneNumberByAccountName: function() { return /* reexport */ getPhoneNumberByAccountName; },
|
|
29614
29612
|
getPlatformBortherMenusByMenuID: function() { return /* reexport */ getPlatformBortherMenusByMenuID; },
|
|
29615
29613
|
getPlatformMenuMappingsByRoleIDs: function() { return /* reexport */ getPlatformMenuMappingsByRoleIDs; },
|
|
29616
29614
|
getPojectDptsByUserAndGroupID: function() { return /* reexport */ getPojectDptsByUserAndGroupID; },
|
|
@@ -29629,7 +29627,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29629
29627
|
getThirdAppPathByKey: function() { return /* reexport */ getThirdAppPathByKey; },
|
|
29630
29628
|
getUrlParamValue: function() { return /* reexport */ getUrlParamValue; },
|
|
29631
29629
|
getUserAllMappngPortal: function() { return /* reexport */ getUserAllMappngPortal; },
|
|
29632
|
-
|
|
29630
|
+
getViewKey: function() { return /* reexport */ getViewKey; },
|
|
29633
29631
|
hasListener: function() { return /* reexport */ hasListener; },
|
|
29634
29632
|
hasUrlParams: function() { return /* reexport */ hasUrlParams; },
|
|
29635
29633
|
i18n: function() { return /* reexport */ i18n; },
|
|
@@ -29665,7 +29663,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29665
29663
|
updateI18nValue: function() { return /* reexport */ updateI18nValue; },
|
|
29666
29664
|
updateIMMapping: function() { return /* reexport */ updateIMMapping; },
|
|
29667
29665
|
updateUserSelectPortal: function() { return /* reexport */ updateUserSelectPortal; },
|
|
29668
|
-
validateSSOPageLoaded: function() { return /* reexport */ validateSSOPageLoaded; }
|
|
29666
|
+
validateSSOPageLoaded: function() { return /* reexport */ validateSSOPageLoaded; },
|
|
29667
|
+
viewDecrypt: function() { return /* reexport */ viewDecrypt; },
|
|
29668
|
+
viewEncrypt: function() { return /* reexport */ viewEncrypt; }
|
|
29669
29669
|
});
|
|
29670
29670
|
|
|
29671
29671
|
;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
@@ -30996,14 +30996,17 @@ const savePortalI18nText = async (key, value, lang, beyondID, i18nType) => {
|
|
|
30996
30996
|
return resultData;
|
|
30997
30997
|
};
|
|
30998
30998
|
|
|
30999
|
-
//
|
|
31000
|
-
const
|
|
30999
|
+
// 通过账户名和租户获取手机号
|
|
31000
|
+
const getPhoneNumberByAccountName = async (accountName, groupID) => {
|
|
31001
31001
|
let requestData = {
|
|
31002
|
-
param: {
|
|
31002
|
+
param: {
|
|
31003
|
+
accountName: accountName,
|
|
31004
|
+
groupID: groupID
|
|
31005
|
+
}
|
|
31003
31006
|
};
|
|
31004
|
-
let result = await request.post(`/dataservice/rest/orchestration/
|
|
31005
|
-
let
|
|
31006
|
-
return
|
|
31007
|
+
let result = await request.post(`/dataservice/rest/orchestration/getPhoneNumberByAccountName`, requestData);
|
|
31008
|
+
let phone = result.data.phone;
|
|
31009
|
+
return phone;
|
|
31007
31010
|
};
|
|
31008
31011
|
;// ./node_modules/ua-parser-js/src/main/ua-parser.mjs
|
|
31009
31012
|
// Generated ESM version of ua-parser-js
|
|
@@ -33670,6 +33673,16 @@ function processViewElement(element) {
|
|
|
33670
33673
|
viewCheckResult.scriptFunction();
|
|
33671
33674
|
return true;
|
|
33672
33675
|
}
|
|
33676
|
+
|
|
33677
|
+
// 获取所有i18n的类型
|
|
33678
|
+
const getAllI18nTypes = async () => {
|
|
33679
|
+
let requestData = {
|
|
33680
|
+
param: {}
|
|
33681
|
+
};
|
|
33682
|
+
let result = await request.post(`/dataservice/rest/orchestration/getAllI18nTypes`, requestData);
|
|
33683
|
+
let resultData = result.data.resultDatas;
|
|
33684
|
+
return resultData;
|
|
33685
|
+
};
|
|
33673
33686
|
;// ./src/api/security.js
|
|
33674
33687
|
|
|
33675
33688
|
|
|
@@ -33713,17 +33726,17 @@ const logoutAccount = async endside_type => {
|
|
|
33713
33726
|
/**
|
|
33714
33727
|
* 解密
|
|
33715
33728
|
*/
|
|
33716
|
-
const
|
|
33717
|
-
let secretKey = await
|
|
33729
|
+
const viewDecrypt = async decryptStr => {
|
|
33730
|
+
let secretKey = await getViewKey();
|
|
33718
33731
|
const decrypted = crypto_js_default().AES.decrypt(decryptStr, secretKey).toString((crypto_js_default()).enc.Utf8);
|
|
33719
33732
|
return decrypted;
|
|
33720
33733
|
};
|
|
33721
33734
|
|
|
33722
33735
|
/**
|
|
33723
|
-
*
|
|
33736
|
+
* 加密
|
|
33724
33737
|
*/
|
|
33725
|
-
const
|
|
33726
|
-
let secretKey = await
|
|
33738
|
+
const viewEncrypt = async decryptStr => {
|
|
33739
|
+
let secretKey = await getViewKey();
|
|
33727
33740
|
const encrypted = crypto_js_default().AES.encrypt(decryptStr, secretKey).toString();
|
|
33728
33741
|
return encrypted;
|
|
33729
33742
|
};
|
|
@@ -33733,7 +33746,7 @@ const encrypt = async decryptStr => {
|
|
|
33733
33746
|
*/
|
|
33734
33747
|
const switchPortalLogin = async (data, appid, endside_type) => {
|
|
33735
33748
|
let old_key = window.sessionStorage.getItem("iportal_login_user_key");
|
|
33736
|
-
old_key = await
|
|
33749
|
+
old_key = await viewDecrypt(old_key);
|
|
33737
33750
|
data.password = old_key;
|
|
33738
33751
|
let resultData = await logoutAccount(endside_type);
|
|
33739
33752
|
let resultCode = resultData.code;
|
|
@@ -33749,18 +33762,22 @@ const switchPortalLogin = async (data, appid, endside_type) => {
|
|
|
33749
33762
|
};
|
|
33750
33763
|
}
|
|
33751
33764
|
};
|
|
33752
|
-
|
|
33753
|
-
|
|
33754
|
-
|
|
33755
|
-
|
|
33756
|
-
|
|
33757
|
-
|
|
33758
|
-
|
|
33759
|
-
|
|
33760
|
-
|
|
33761
|
-
|
|
33762
|
-
|
|
33763
|
-
|
|
33765
|
+
|
|
33766
|
+
// export const getUserID = async (acccountName, old_key, group_id) => {
|
|
33767
|
+
// let queryData = {
|
|
33768
|
+
// param: {
|
|
33769
|
+
// accountName: acccountName,
|
|
33770
|
+
// group_id: group_id,
|
|
33771
|
+
// account_key: old_key,
|
|
33772
|
+
// },
|
|
33773
|
+
// };
|
|
33774
|
+
// let result = await request.post(
|
|
33775
|
+
// `/dataservice/rest/orchestration/getUserID`,
|
|
33776
|
+
// queryData
|
|
33777
|
+
// );
|
|
33778
|
+
// let persion_id = result.data.persion_id;
|
|
33779
|
+
// return persion_id;
|
|
33780
|
+
// };
|
|
33764
33781
|
|
|
33765
33782
|
/**
|
|
33766
33783
|
* 是否是安全账号
|
|
@@ -33803,9 +33820,9 @@ const loginAccount = async (data, appid) => {
|
|
|
33803
33820
|
//保存的正则2级密码
|
|
33804
33821
|
let key_code = result.data.codeData.code;
|
|
33805
33822
|
//反向解析一级密码
|
|
33806
|
-
pwd_code = await
|
|
33823
|
+
pwd_code = await viewDecrypt(pwd_code);
|
|
33807
33824
|
//反向解析2级密码
|
|
33808
|
-
key_code = await
|
|
33825
|
+
key_code = await viewDecrypt(key_code);
|
|
33809
33826
|
//密码匹配
|
|
33810
33827
|
if (pwd_code == data.password) {
|
|
33811
33828
|
//平台正向加密2级密码
|
|
@@ -33854,11 +33871,11 @@ const loginAccount = async (data, appid) => {
|
|
|
33854
33871
|
* 获取密钥
|
|
33855
33872
|
* @returns
|
|
33856
33873
|
*/
|
|
33857
|
-
const
|
|
33874
|
+
const getViewKey = async () => {
|
|
33858
33875
|
let queryData = {
|
|
33859
33876
|
param: {}
|
|
33860
33877
|
};
|
|
33861
|
-
let resultData = await request.post(`/dataservice/rest/orchestration/
|
|
33878
|
+
let resultData = await request.post(`/dataservice/rest/orchestration/getViewKey`, queryData);
|
|
33862
33879
|
let key = resultData.data.key;
|
|
33863
33880
|
return key;
|
|
33864
33881
|
};
|
|
@@ -34583,18 +34600,16 @@ const dify_extractFilenameFromUrl = url => {
|
|
|
34583
34600
|
};
|
|
34584
34601
|
;// ./src/api/sms.js
|
|
34585
34602
|
|
|
34586
|
-
|
|
34587
|
-
const sendSms = async (queryData, successCallback, errorCallback) => {
|
|
34588
|
-
let appid = getPoratlAppID();
|
|
34589
|
-
let appCustomData = await getAppCustomData(appid);
|
|
34590
|
-
let smsServerIP = appCustomData?.smsServerIP || "";
|
|
34603
|
+
const sendSms = async (smsServerIP, queryData, successCallback, errorCallback) => {
|
|
34591
34604
|
if (!smsServerIP) {
|
|
34592
34605
|
console.error("没有配置短信服务地址,请联系管理员");
|
|
34593
34606
|
if (errorCallback) errorCallback("没有配置短信服务地址,请联系管理员");
|
|
34594
34607
|
return;
|
|
34595
34608
|
}
|
|
34596
|
-
let
|
|
34597
|
-
|
|
34609
|
+
let options = {
|
|
34610
|
+
param: queryData
|
|
34611
|
+
};
|
|
34612
|
+
request.post(smsServerIP, JSON.stringify(options)).then(res => {
|
|
34598
34613
|
console.log("发送消息成功:", res);
|
|
34599
34614
|
if (successCallback) successCallback(res);
|
|
34600
34615
|
}).catch(error => {
|