isdata-customer-sdk 0.2.50 → 0.2.52

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.
@@ -29617,6 +29617,7 @@ __webpack_require__.d(__webpack_exports__, {
29617
29617
  initDomNodeViewObserver: function() { return /* reexport */ initDomNodeViewObserver; },
29618
29618
  initEventCenter: function() { return /* reexport */ initEventCenter; },
29619
29619
  initFrameWindowListener: function() { return /* reexport */ initFrameWindowListener; },
29620
+ isSMSCodeValidate: function() { return /* reexport */ isSMSCodeValidate; },
29620
29621
  isSecurityAccount: function() { return /* reexport */ isSecurityAccount; },
29621
29622
  loadi18nTexts: function() { return /* reexport */ loadi18nTexts; },
29622
29623
  loginAccount: function() { return /* reexport */ loginAccount; },
@@ -33713,8 +33714,8 @@ const logoutAccount = async endside_type => {
33713
33714
  * 服务端解密
33714
33715
  */
33715
33716
  const serverDecrypt = async decryptStr => {
33716
- // let home_page = `http://${window.location.hostname}:8280`;
33717
- let home_page = `http://127.0.0.1:8280`;
33717
+ let home_page = `http://${window.location.hostname}:8280`;
33718
+ // let home_page = `http://127.0.0.1:8280`;
33718
33719
  let questUrl = `${home_page}/portal/serverDecrypt`;
33719
33720
  let queryData = {
33720
33721
  param: {
@@ -33748,13 +33749,13 @@ const viewEncrypt = async decryptStr => {
33748
33749
  /**
33749
33750
  * 服务端加密
33750
33751
  */
33751
- const serverEncrypt = async encryptStr => {
33752
- // let home_page = `http://${window.location.hostname}:8280`;
33753
- let home_page = `http://127.0.0.1:8280`;
33754
- let questUrl = `${home_page}/portal/serverEncrypt`;
33752
+ const serverEncrypt = async smsCode => {
33753
+ let home_page = `http://${window.location.hostname}:8280`;
33754
+ // let home_page = `http://127.0.0.1:8280`;
33755
+ let questUrl = `${home_page}/sms/validateSMSCode`;
33755
33756
  let queryData = {
33756
33757
  param: {
33757
- encryptStr: encryptStr
33758
+ smsCode: smsCode
33758
33759
  }
33759
33760
  };
33760
33761
  //保存的正则2级密码
@@ -33834,6 +33835,7 @@ const loginAccount = async (data, appid) => {
33834
33835
  let key_code = resultData.data.key_code;
33835
33836
  let old_code = resultData.data.old_code;
33836
33837
  let login_account_id = resultData.data.id;
33838
+ let message = resultData.data.message;
33837
33839
  //登录平台成功
33838
33840
  if (code == 10110004) {
33839
33841
  key_code = await viewDecrypt(key_code);
@@ -33842,6 +33844,7 @@ const loginAccount = async (data, appid) => {
33842
33844
  resultData = await request.post(`/system/authority/loginAccount4Application?authPicCode=${data.imageCode}&dataappId=${appid}&mobileOrWeb=web`, queryData.param);
33843
33845
  let response = JSON.parse(resultData.request.response);
33844
33846
  code = response.code;
33847
+ message = response.message;
33845
33848
  if (code == 10110004) {
33846
33849
  let id = login_account_id;
33847
33850
  // 初始化解析器
@@ -33856,13 +33859,19 @@ const loginAccount = async (data, appid) => {
33856
33859
  window.sessionStorage.setItem("iportal_client_id", clientID);
33857
33860
  window.sessionStorage.setItem("iportal_app_id", appid);
33858
33861
  return {
33859
- code: code
33862
+ code: code,
33863
+ message: i18nText(message)
33864
+ };
33865
+ } else {
33866
+ return {
33867
+ code: code,
33868
+ message: i18nText(message)
33860
33869
  };
33861
33870
  }
33862
33871
  } else {
33863
33872
  return {
33864
33873
  code: code,
33865
- message: i18nText(response.message)
33874
+ message: i18nText(message)
33866
33875
  };
33867
33876
  }
33868
33877
  };
@@ -34600,12 +34609,9 @@ const dify_extractFilenameFromUrl = url => {
34600
34609
  };
34601
34610
  ;// ./src/api/sms.js
34602
34611
 
34603
- const sendSms = async (smsServerIP, queryData, successCallback, errorCallback) => {
34604
- if (!smsServerIP) {
34605
- console.error("没有配置短信服务地址,请联系管理员");
34606
- if (errorCallback) errorCallback("没有配置短信服务地址,请联系管理员");
34607
- return;
34608
- }
34612
+ const sendSms = async (queryData, successCallback, errorCallback) => {
34613
+ let smsServerIP = `http://${window.location.hostname}:8280/sms/sendSms`;
34614
+ // let smsServerIP = `http://127.0.0.1:8280/sms/sendSms`;
34609
34615
  let options = {
34610
34616
  param: queryData
34611
34617
  };
@@ -34617,6 +34623,34 @@ const sendSms = async (smsServerIP, queryData, successCallback, errorCallback) =
34617
34623
  if (errorCallback) errorCallback(error);
34618
34624
  });
34619
34625
  };
34626
+
34627
+ /**
34628
+ * 登录账号
34629
+ * @param data 登录数据
34630
+ * @param appid 应用ID
34631
+ *
34632
+ * @description
34633
+ * 登录时需要传入验证码(authPicCode)和应用ID(dataappId),
34634
+ * mobileOrWeb参数用于区分是移动端还是网页端登录。
34635
+ *
34636
+ * @returns
34637
+ */
34638
+ const isSMSCodeValidate = async (smsCode, sms_service_name_type, beyond_type_id, account_id) => {
34639
+ let questUrl = `http://${window.location.hostname}:8280/sms/validateSMSCode`;
34640
+ // let questUrl = `http://127.0.0.1:8280/sms/validateSMSCode`;
34641
+ let queryData = {
34642
+ param: {
34643
+ smsCode: smsCode,
34644
+ sms_service_name_type: sms_service_name_type,
34645
+ beyond_type_id: beyond_type_id,
34646
+ account_id: account_id
34647
+ }
34648
+ };
34649
+ //保存的正则2级密码
34650
+ let resultData = await request.post(questUrl, JSON.stringify(queryData));
34651
+ let data = resultData.data;
34652
+ return data;
34653
+ };
34620
34654
  ;// ./src/main.js
34621
34655
 
34622
34656