isdata-customer-sdk 0.2.48 → 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 +61 -65
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +61 -65
- 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
|
@@ -29583,7 +29583,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29583
29583
|
getIntegrateAppInfoByID: function() { return /* reexport */ getIntegrateAppInfoByID; },
|
|
29584
29584
|
getLanguages: function() { return /* reexport */ getLanguages; },
|
|
29585
29585
|
getLoginPageNotices: function() { return /* reexport */ getLoginPageNotices; },
|
|
29586
|
-
getLoginPortalAccountKey: function() { return /* reexport */ getLoginPortalAccountKey; },
|
|
29587
29586
|
getMappingAppInfoByID: function() { return /* reexport */ getMappingAppInfoByID; },
|
|
29588
29587
|
getMenuDatasByGroupID: function() { return /* reexport */ getMenuDatasByGroupID; },
|
|
29589
29588
|
getMenuMappingDatasByRoleIDs: function() { return /* reexport */ getMenuMappingDatasByRoleIDs; },
|
|
@@ -30030,18 +30029,22 @@ const getPortalDocmentInfo = async kb_doc_id => {
|
|
|
30030
30029
|
let docInfo = result.data.docInfo;
|
|
30031
30030
|
return docInfo;
|
|
30032
30031
|
};
|
|
30033
|
-
|
|
30034
|
-
|
|
30035
|
-
|
|
30036
|
-
|
|
30037
|
-
|
|
30038
|
-
|
|
30039
|
-
|
|
30040
|
-
|
|
30041
|
-
|
|
30042
|
-
|
|
30043
|
-
|
|
30044
|
-
|
|
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
|
+
// };
|
|
30045
30048
|
|
|
30046
30049
|
/**
|
|
30047
30050
|
* 获取该平台菜单同祖先(直至根节点)得其他兄弟菜单
|
|
@@ -33671,7 +33674,6 @@ const getAllI18nTypes = async () => {
|
|
|
33671
33674
|
|
|
33672
33675
|
|
|
33673
33676
|
|
|
33674
|
-
|
|
33675
33677
|
/**
|
|
33676
33678
|
*
|
|
33677
33679
|
* @returns 获取登录验证码图片
|
|
@@ -33791,62 +33793,56 @@ const isSecurityAccount = async (acccountName, group_id) => {
|
|
|
33791
33793
|
* @returns
|
|
33792
33794
|
*/
|
|
33793
33795
|
const loginAccount = async (data, appid) => {
|
|
33794
|
-
let
|
|
33795
|
-
let
|
|
33796
|
-
|
|
33797
|
-
|
|
33798
|
-
|
|
33799
|
-
|
|
33800
|
-
|
|
33801
|
-
|
|
33802
|
-
|
|
33803
|
-
|
|
33804
|
-
|
|
33805
|
-
|
|
33806
|
-
|
|
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) {
|
|
33807
33817
|
key_code = await viewDecrypt(key_code);
|
|
33808
|
-
|
|
33809
|
-
|
|
33810
|
-
|
|
33811
|
-
|
|
33812
|
-
|
|
33813
|
-
|
|
33814
|
-
let
|
|
33815
|
-
|
|
33816
|
-
|
|
33817
|
-
|
|
33818
|
-
|
|
33819
|
-
|
|
33820
|
-
|
|
33821
|
-
|
|
33822
|
-
|
|
33823
|
-
|
|
33824
|
-
|
|
33825
|
-
|
|
33826
|
-
window.sessionStorage.setItem("iportal_group_id", data.groupid);
|
|
33827
|
-
window.sessionStorage.setItem("iportal_login_user_key", old_key);
|
|
33828
|
-
window.sessionStorage.setItem("iportal_client_id", clientID);
|
|
33829
|
-
window.sessionStorage.setItem("iportal_app_id", appid);
|
|
33830
|
-
return {
|
|
33831
|
-
code: code
|
|
33832
|
-
};
|
|
33833
|
-
} else {
|
|
33834
|
-
return {
|
|
33835
|
-
code: code,
|
|
33836
|
-
message: i18nText(response.message)
|
|
33837
|
-
};
|
|
33838
|
-
}
|
|
33839
|
-
} else {
|
|
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);
|
|
33840
33836
|
return {
|
|
33841
|
-
code: code
|
|
33842
|
-
message: i18nText("账户密码错误")
|
|
33837
|
+
code: code
|
|
33843
33838
|
};
|
|
33844
33839
|
}
|
|
33840
|
+
} else {
|
|
33841
|
+
return {
|
|
33842
|
+
code: code,
|
|
33843
|
+
message: i18nText(response.message)
|
|
33844
|
+
};
|
|
33845
33845
|
}
|
|
33846
|
-
return {
|
|
33847
|
-
code: code,
|
|
33848
|
-
message: i18nText(result.data.message)
|
|
33849
|
-
};
|
|
33850
33846
|
};
|
|
33851
33847
|
|
|
33852
33848
|
/**
|