isdata-customer-sdk 0.2.47 → 0.2.49
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 +91 -92
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +91 -92
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +3 -3
- 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,10 +29581,8 @@ __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
|
-
getLoginPortalAccountKey: function() { return /* reexport */ getLoginPortalAccountKey; },
|
|
29590
29586
|
getMappingAppInfoByID: function() { return /* reexport */ getMappingAppInfoByID; },
|
|
29591
29587
|
getMenuDatasByGroupID: function() { return /* reexport */ getMenuDatasByGroupID; },
|
|
29592
29588
|
getMenuMappingDatasByRoleIDs: function() { return /* reexport */ getMenuMappingDatasByRoleIDs; },
|
|
@@ -29612,7 +29608,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29612
29608
|
getThirdAppPathByKey: function() { return /* reexport */ getThirdAppPathByKey; },
|
|
29613
29609
|
getUrlParamValue: function() { return /* reexport */ getUrlParamValue; },
|
|
29614
29610
|
getUserAllMappngPortal: function() { return /* reexport */ getUserAllMappngPortal; },
|
|
29615
|
-
|
|
29611
|
+
getViewKey: function() { return /* reexport */ getViewKey; },
|
|
29616
29612
|
hasListener: function() { return /* reexport */ hasListener; },
|
|
29617
29613
|
hasUrlParams: function() { return /* reexport */ hasUrlParams; },
|
|
29618
29614
|
i18n: function() { return /* reexport */ i18n; },
|
|
@@ -29648,7 +29644,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29648
29644
|
updateI18nValue: function() { return /* reexport */ updateI18nValue; },
|
|
29649
29645
|
updateIMMapping: function() { return /* reexport */ updateIMMapping; },
|
|
29650
29646
|
updateUserSelectPortal: function() { return /* reexport */ updateUserSelectPortal; },
|
|
29651
|
-
validateSSOPageLoaded: function() { return /* reexport */ validateSSOPageLoaded; }
|
|
29647
|
+
validateSSOPageLoaded: function() { return /* reexport */ validateSSOPageLoaded; },
|
|
29648
|
+
viewDecrypt: function() { return /* reexport */ viewDecrypt; },
|
|
29649
|
+
viewEncrypt: function() { return /* reexport */ viewEncrypt; }
|
|
29652
29650
|
});
|
|
29653
29651
|
|
|
29654
29652
|
;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
@@ -30031,18 +30029,22 @@ const getPortalDocmentInfo = async kb_doc_id => {
|
|
|
30031
30029
|
let docInfo = result.data.docInfo;
|
|
30032
30030
|
return docInfo;
|
|
30033
30031
|
};
|
|
30034
|
-
|
|
30035
|
-
|
|
30036
|
-
|
|
30037
|
-
|
|
30038
|
-
|
|
30039
|
-
|
|
30040
|
-
|
|
30041
|
-
|
|
30042
|
-
|
|
30043
|
-
|
|
30044
|
-
|
|
30045
|
-
|
|
30032
|
+
|
|
30033
|
+
// export const getLoginPortalAccountKey = async (loginName,groupID) => {
|
|
30034
|
+
// let queryData = {
|
|
30035
|
+
// param: {
|
|
30036
|
+
// loginData: {
|
|
30037
|
+
// account: loginName,
|
|
30038
|
+
// group_id: groupID,
|
|
30039
|
+
// },
|
|
30040
|
+
// },
|
|
30041
|
+
// };
|
|
30042
|
+
// let result = await request.post(
|
|
30043
|
+
// `/dataservice/rest/orchestration/getLoginPortalAccountKey`,
|
|
30044
|
+
// queryData
|
|
30045
|
+
// );
|
|
30046
|
+
// return result;
|
|
30047
|
+
// };
|
|
30046
30048
|
|
|
30047
30049
|
/**
|
|
30048
30050
|
* 获取该平台菜单同祖先(直至根节点)得其他兄弟菜单
|
|
@@ -33672,7 +33674,6 @@ const getAllI18nTypes = async () => {
|
|
|
33672
33674
|
|
|
33673
33675
|
|
|
33674
33676
|
|
|
33675
|
-
|
|
33676
33677
|
/**
|
|
33677
33678
|
*
|
|
33678
33679
|
* @returns 获取登录验证码图片
|
|
@@ -33709,17 +33710,17 @@ const logoutAccount = async endside_type => {
|
|
|
33709
33710
|
/**
|
|
33710
33711
|
* 解密
|
|
33711
33712
|
*/
|
|
33712
|
-
const
|
|
33713
|
-
let secretKey = await
|
|
33713
|
+
const viewDecrypt = async decryptStr => {
|
|
33714
|
+
let secretKey = await getViewKey();
|
|
33714
33715
|
const decrypted = crypto_js_default().AES.decrypt(decryptStr, secretKey).toString((crypto_js_default()).enc.Utf8);
|
|
33715
33716
|
return decrypted;
|
|
33716
33717
|
};
|
|
33717
33718
|
|
|
33718
33719
|
/**
|
|
33719
|
-
*
|
|
33720
|
+
* 加密
|
|
33720
33721
|
*/
|
|
33721
|
-
const
|
|
33722
|
-
let secretKey = await
|
|
33722
|
+
const viewEncrypt = async decryptStr => {
|
|
33723
|
+
let secretKey = await getViewKey();
|
|
33723
33724
|
const encrypted = crypto_js_default().AES.encrypt(decryptStr, secretKey).toString();
|
|
33724
33725
|
return encrypted;
|
|
33725
33726
|
};
|
|
@@ -33729,7 +33730,7 @@ const encrypt = async decryptStr => {
|
|
|
33729
33730
|
*/
|
|
33730
33731
|
const switchPortalLogin = async (data, appid, endside_type) => {
|
|
33731
33732
|
let old_key = window.sessionStorage.getItem("iportal_login_user_key");
|
|
33732
|
-
old_key = await
|
|
33733
|
+
old_key = await viewDecrypt(old_key);
|
|
33733
33734
|
data.password = old_key;
|
|
33734
33735
|
let resultData = await logoutAccount(endside_type);
|
|
33735
33736
|
let resultCode = resultData.code;
|
|
@@ -33745,18 +33746,22 @@ const switchPortalLogin = async (data, appid, endside_type) => {
|
|
|
33745
33746
|
};
|
|
33746
33747
|
}
|
|
33747
33748
|
};
|
|
33748
|
-
|
|
33749
|
-
|
|
33750
|
-
|
|
33751
|
-
|
|
33752
|
-
|
|
33753
|
-
|
|
33754
|
-
|
|
33755
|
-
|
|
33756
|
-
|
|
33757
|
-
|
|
33758
|
-
|
|
33759
|
-
|
|
33749
|
+
|
|
33750
|
+
// export const getUserID = async (acccountName, old_key, group_id) => {
|
|
33751
|
+
// let queryData = {
|
|
33752
|
+
// param: {
|
|
33753
|
+
// accountName: acccountName,
|
|
33754
|
+
// group_id: group_id,
|
|
33755
|
+
// account_key: old_key,
|
|
33756
|
+
// },
|
|
33757
|
+
// };
|
|
33758
|
+
// let result = await request.post(
|
|
33759
|
+
// `/dataservice/rest/orchestration/getUserID`,
|
|
33760
|
+
// queryData
|
|
33761
|
+
// );
|
|
33762
|
+
// let persion_id = result.data.persion_id;
|
|
33763
|
+
// return persion_id;
|
|
33764
|
+
// };
|
|
33760
33765
|
|
|
33761
33766
|
/**
|
|
33762
33767
|
* 是否是安全账号
|
|
@@ -33788,73 +33793,67 @@ const isSecurityAccount = async (acccountName, group_id) => {
|
|
|
33788
33793
|
* @returns
|
|
33789
33794
|
*/
|
|
33790
33795
|
const loginAccount = async (data, appid) => {
|
|
33791
|
-
let
|
|
33792
|
-
let
|
|
33793
|
-
|
|
33794
|
-
|
|
33795
|
-
|
|
33796
|
-
|
|
33797
|
-
|
|
33798
|
-
|
|
33799
|
-
|
|
33800
|
-
|
|
33801
|
-
|
|
33802
|
-
|
|
33803
|
-
|
|
33804
|
-
|
|
33805
|
-
|
|
33806
|
-
|
|
33807
|
-
|
|
33808
|
-
|
|
33809
|
-
|
|
33810
|
-
|
|
33811
|
-
|
|
33812
|
-
|
|
33813
|
-
|
|
33814
|
-
|
|
33815
|
-
|
|
33816
|
-
|
|
33817
|
-
|
|
33818
|
-
|
|
33819
|
-
|
|
33820
|
-
|
|
33821
|
-
|
|
33822
|
-
|
|
33823
|
-
|
|
33824
|
-
|
|
33825
|
-
|
|
33826
|
-
|
|
33827
|
-
|
|
33828
|
-
|
|
33829
|
-
|
|
33830
|
-
|
|
33831
|
-
return {
|
|
33832
|
-
code: code,
|
|
33833
|
-
message: i18nText(response.message)
|
|
33834
|
-
};
|
|
33835
|
-
}
|
|
33836
|
-
} else {
|
|
33796
|
+
let home_page = `http://${window.location.hostname}:8280`;
|
|
33797
|
+
// let home_page = `http://127.0.0.1:8280`;
|
|
33798
|
+
let questUrl = `${home_page}/portal/loginAccount`;
|
|
33799
|
+
let password = await viewEncrypt(data.password);
|
|
33800
|
+
let queryData = {
|
|
33801
|
+
param: {
|
|
33802
|
+
account_view: data.account_view,
|
|
33803
|
+
groupid: data.groupid,
|
|
33804
|
+
password: password,
|
|
33805
|
+
account: data.account,
|
|
33806
|
+
appid: appid
|
|
33807
|
+
}
|
|
33808
|
+
};
|
|
33809
|
+
//保存的正则2级密码
|
|
33810
|
+
let resultData = await request.post(questUrl, JSON.stringify(queryData));
|
|
33811
|
+
let code = resultData.data.code;
|
|
33812
|
+
let key_code = resultData.data.key_code;
|
|
33813
|
+
let old_code = resultData.data.old_code;
|
|
33814
|
+
let login_account_id = resultData.data.id;
|
|
33815
|
+
//登录平台成功
|
|
33816
|
+
if (code == 10110004) {
|
|
33817
|
+
key_code = await viewDecrypt(key_code);
|
|
33818
|
+
key_code = window.appSdk.Encrypt(key_code);
|
|
33819
|
+
queryData.param.password = key_code;
|
|
33820
|
+
resultData = await request.post(`/system/authority/loginAccount4Application?authPicCode=${data.imageCode}&dataappId=${appid}&mobileOrWeb=web`, queryData.param);
|
|
33821
|
+
let response = JSON.parse(resultData.request.response);
|
|
33822
|
+
code = response.code;
|
|
33823
|
+
if (code == 10110004) {
|
|
33824
|
+
let id = login_account_id;
|
|
33825
|
+
// 初始化解析器
|
|
33826
|
+
const parser = new UAParser();
|
|
33827
|
+
// 获取浏览器信息
|
|
33828
|
+
const browser = parser.getBrowser();
|
|
33829
|
+
let timestamp = new Date().getTime();
|
|
33830
|
+
let clientID = browser.name + "_" + browser.version + "_" + timestamp;
|
|
33831
|
+
window.sessionStorage.setItem("iportal_login_user_id", id);
|
|
33832
|
+
window.sessionStorage.setItem("iportal_group_id", data.groupid);
|
|
33833
|
+
window.sessionStorage.setItem("iportal_login_user_key", old_code);
|
|
33834
|
+
window.sessionStorage.setItem("iportal_client_id", clientID);
|
|
33835
|
+
window.sessionStorage.setItem("iportal_app_id", appid);
|
|
33837
33836
|
return {
|
|
33838
|
-
code: code
|
|
33839
|
-
message: i18nText("账户密码错误")
|
|
33837
|
+
code: code
|
|
33840
33838
|
};
|
|
33841
33839
|
}
|
|
33840
|
+
} else {
|
|
33841
|
+
return {
|
|
33842
|
+
code: code,
|
|
33843
|
+
message: i18nText(response.message)
|
|
33844
|
+
};
|
|
33842
33845
|
}
|
|
33843
|
-
return {
|
|
33844
|
-
code: code,
|
|
33845
|
-
message: i18nText(result.data.message)
|
|
33846
|
-
};
|
|
33847
33846
|
};
|
|
33848
33847
|
|
|
33849
33848
|
/**
|
|
33850
33849
|
* 获取密钥
|
|
33851
33850
|
* @returns
|
|
33852
33851
|
*/
|
|
33853
|
-
const
|
|
33852
|
+
const getViewKey = async () => {
|
|
33854
33853
|
let queryData = {
|
|
33855
33854
|
param: {}
|
|
33856
33855
|
};
|
|
33857
|
-
let resultData = await request.post(`/dataservice/rest/orchestration/
|
|
33856
|
+
let resultData = await request.post(`/dataservice/rest/orchestration/getViewKey`, queryData);
|
|
33858
33857
|
let key = resultData.data.key;
|
|
33859
33858
|
return key;
|
|
33860
33859
|
};
|
|
@@ -34586,7 +34585,7 @@ const sendSms = async (smsServerIP, queryData, successCallback, errorCallback) =
|
|
|
34586
34585
|
return;
|
|
34587
34586
|
}
|
|
34588
34587
|
let options = {
|
|
34589
|
-
|
|
34588
|
+
param: queryData
|
|
34590
34589
|
};
|
|
34591
34590
|
request.post(smsServerIP, JSON.stringify(options)).then(res => {
|
|
34592
34591
|
console.log("发送消息成功:", res);
|