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.umd.js
CHANGED
|
@@ -29601,7 +29601,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29601
29601
|
getIntegrateAppInfoByID: function() { return /* reexport */ getIntegrateAppInfoByID; },
|
|
29602
29602
|
getLanguages: function() { return /* reexport */ getLanguages; },
|
|
29603
29603
|
getLoginPageNotices: function() { return /* reexport */ getLoginPageNotices; },
|
|
29604
|
-
getLoginPortalAccountKey: function() { return /* reexport */ getLoginPortalAccountKey; },
|
|
29605
29604
|
getMappingAppInfoByID: function() { return /* reexport */ getMappingAppInfoByID; },
|
|
29606
29605
|
getMenuDatasByGroupID: function() { return /* reexport */ getMenuDatasByGroupID; },
|
|
29607
29606
|
getMenuMappingDatasByRoleIDs: function() { return /* reexport */ getMenuMappingDatasByRoleIDs; },
|
|
@@ -30048,18 +30047,22 @@ const getPortalDocmentInfo = async kb_doc_id => {
|
|
|
30048
30047
|
let docInfo = result.data.docInfo;
|
|
30049
30048
|
return docInfo;
|
|
30050
30049
|
};
|
|
30051
|
-
|
|
30052
|
-
|
|
30053
|
-
|
|
30054
|
-
|
|
30055
|
-
|
|
30056
|
-
|
|
30057
|
-
|
|
30058
|
-
|
|
30059
|
-
|
|
30060
|
-
|
|
30061
|
-
|
|
30062
|
-
|
|
30050
|
+
|
|
30051
|
+
// export const getLoginPortalAccountKey = async (loginName,groupID) => {
|
|
30052
|
+
// let queryData = {
|
|
30053
|
+
// param: {
|
|
30054
|
+
// loginData: {
|
|
30055
|
+
// account: loginName,
|
|
30056
|
+
// group_id: groupID,
|
|
30057
|
+
// },
|
|
30058
|
+
// },
|
|
30059
|
+
// };
|
|
30060
|
+
// let result = await request.post(
|
|
30061
|
+
// `/dataservice/rest/orchestration/getLoginPortalAccountKey`,
|
|
30062
|
+
// queryData
|
|
30063
|
+
// );
|
|
30064
|
+
// return result;
|
|
30065
|
+
// };
|
|
30063
30066
|
|
|
30064
30067
|
/**
|
|
30065
30068
|
* 获取该平台菜单同祖先(直至根节点)得其他兄弟菜单
|
|
@@ -33689,7 +33692,6 @@ const getAllI18nTypes = async () => {
|
|
|
33689
33692
|
|
|
33690
33693
|
|
|
33691
33694
|
|
|
33692
|
-
|
|
33693
33695
|
/**
|
|
33694
33696
|
*
|
|
33695
33697
|
* @returns 获取登录验证码图片
|
|
@@ -33809,62 +33811,56 @@ const isSecurityAccount = async (acccountName, group_id) => {
|
|
|
33809
33811
|
* @returns
|
|
33810
33812
|
*/
|
|
33811
33813
|
const loginAccount = async (data, appid) => {
|
|
33812
|
-
let
|
|
33813
|
-
let
|
|
33814
|
-
|
|
33815
|
-
|
|
33816
|
-
|
|
33817
|
-
|
|
33818
|
-
|
|
33819
|
-
|
|
33820
|
-
|
|
33821
|
-
|
|
33822
|
-
|
|
33823
|
-
|
|
33824
|
-
|
|
33814
|
+
let home_page = `http://${window.location.hostname}:8280`;
|
|
33815
|
+
// let home_page = `http://127.0.0.1:8280`;
|
|
33816
|
+
let questUrl = `${home_page}/portal/loginAccount`;
|
|
33817
|
+
let password = await viewEncrypt(data.password);
|
|
33818
|
+
let queryData = {
|
|
33819
|
+
param: {
|
|
33820
|
+
account_view: data.account_view,
|
|
33821
|
+
groupid: data.groupid,
|
|
33822
|
+
password: password,
|
|
33823
|
+
account: data.account,
|
|
33824
|
+
appid: appid
|
|
33825
|
+
}
|
|
33826
|
+
};
|
|
33827
|
+
//保存的正则2级密码
|
|
33828
|
+
let resultData = await request.post(questUrl, JSON.stringify(queryData));
|
|
33829
|
+
let code = resultData.data.code;
|
|
33830
|
+
let key_code = resultData.data.key_code;
|
|
33831
|
+
let old_code = resultData.data.old_code;
|
|
33832
|
+
let login_account_id = resultData.data.id;
|
|
33833
|
+
//登录平台成功
|
|
33834
|
+
if (code == 10110004) {
|
|
33825
33835
|
key_code = await viewDecrypt(key_code);
|
|
33826
|
-
|
|
33827
|
-
|
|
33828
|
-
|
|
33829
|
-
|
|
33830
|
-
|
|
33831
|
-
|
|
33832
|
-
let
|
|
33833
|
-
|
|
33834
|
-
|
|
33835
|
-
|
|
33836
|
-
|
|
33837
|
-
|
|
33838
|
-
|
|
33839
|
-
|
|
33840
|
-
|
|
33841
|
-
|
|
33842
|
-
|
|
33843
|
-
|
|
33844
|
-
window.sessionStorage.setItem("iportal_group_id", data.groupid);
|
|
33845
|
-
window.sessionStorage.setItem("iportal_login_user_key", old_key);
|
|
33846
|
-
window.sessionStorage.setItem("iportal_client_id", clientID);
|
|
33847
|
-
window.sessionStorage.setItem("iportal_app_id", appid);
|
|
33848
|
-
return {
|
|
33849
|
-
code: code
|
|
33850
|
-
};
|
|
33851
|
-
} else {
|
|
33852
|
-
return {
|
|
33853
|
-
code: code,
|
|
33854
|
-
message: i18nText(response.message)
|
|
33855
|
-
};
|
|
33856
|
-
}
|
|
33857
|
-
} else {
|
|
33836
|
+
key_code = window.appSdk.Encrypt(key_code);
|
|
33837
|
+
queryData.param.password = key_code;
|
|
33838
|
+
resultData = await request.post(`/system/authority/loginAccount4Application?authPicCode=${data.imageCode}&dataappId=${appid}&mobileOrWeb=web`, queryData.param);
|
|
33839
|
+
let response = JSON.parse(resultData.request.response);
|
|
33840
|
+
code = response.code;
|
|
33841
|
+
if (code == 10110004) {
|
|
33842
|
+
let id = login_account_id;
|
|
33843
|
+
// 初始化解析器
|
|
33844
|
+
const parser = new UAParser();
|
|
33845
|
+
// 获取浏览器信息
|
|
33846
|
+
const browser = parser.getBrowser();
|
|
33847
|
+
let timestamp = new Date().getTime();
|
|
33848
|
+
let clientID = browser.name + "_" + browser.version + "_" + timestamp;
|
|
33849
|
+
window.sessionStorage.setItem("iportal_login_user_id", id);
|
|
33850
|
+
window.sessionStorage.setItem("iportal_group_id", data.groupid);
|
|
33851
|
+
window.sessionStorage.setItem("iportal_login_user_key", old_code);
|
|
33852
|
+
window.sessionStorage.setItem("iportal_client_id", clientID);
|
|
33853
|
+
window.sessionStorage.setItem("iportal_app_id", appid);
|
|
33858
33854
|
return {
|
|
33859
|
-
code: code
|
|
33860
|
-
message: i18nText("账户密码错误")
|
|
33855
|
+
code: code
|
|
33861
33856
|
};
|
|
33862
33857
|
}
|
|
33858
|
+
} else {
|
|
33859
|
+
return {
|
|
33860
|
+
code: code,
|
|
33861
|
+
message: i18nText(response.message)
|
|
33862
|
+
};
|
|
33863
33863
|
}
|
|
33864
|
-
return {
|
|
33865
|
-
code: code,
|
|
33866
|
-
message: i18nText(result.data.message)
|
|
33867
|
-
};
|
|
33868
33864
|
};
|
|
33869
33865
|
|
|
33870
33866
|
/**
|