isdata-customer-sdk 0.1.87 → 0.1.89
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 +16 -9
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +16 -9
- 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
|
@@ -29734,7 +29734,7 @@ var querystringify = __webpack_require__(3992);
|
|
|
29734
29734
|
;// ./src/api/request.js
|
|
29735
29735
|
|
|
29736
29736
|
|
|
29737
|
-
let apiContextPath =
|
|
29737
|
+
let apiContextPath = /* unsupported import.meta.env.VITE_SERVICE_BASE_URL */ undefined.VITE_SERVICE_BASE_URL;
|
|
29738
29738
|
// const onlineDevelopmentMode = process.env.VUE_APP_ONLINE_DEVELOPMENT_MODE === "true" || process.env.REACT_APP_ONLINE_DEVELOPMENT_MODE === "true"
|
|
29739
29739
|
// if (process.env.NODE_ENV === "development" && !onlineDevelopmentMode) {
|
|
29740
29740
|
// document.cookie =
|
|
@@ -32247,7 +32247,7 @@ const decrypt = async decryptStr => {
|
|
|
32247
32247
|
*/
|
|
32248
32248
|
const encrypt = async decryptStr => {
|
|
32249
32249
|
let secretKey = await getKey();
|
|
32250
|
-
const encrypted = crypto_js_default().AES.encrypt(decryptStr, secretKey).toString(
|
|
32250
|
+
const encrypted = crypto_js_default().AES.encrypt(decryptStr, secretKey).toString();
|
|
32251
32251
|
return encrypted;
|
|
32252
32252
|
};
|
|
32253
32253
|
|
|
@@ -32307,21 +32307,28 @@ const loginAccount = async (data, appid) => {
|
|
|
32307
32307
|
}
|
|
32308
32308
|
};
|
|
32309
32309
|
let result = await request.post(`/dataservice/rest/orchestration/getLoginPortalAccountKey`, queryData);
|
|
32310
|
+
//密码反向解析Key
|
|
32310
32311
|
let secretKey = await getKey();
|
|
32311
|
-
let
|
|
32312
|
-
let code = response.result.code;
|
|
32312
|
+
let code = result.data.code;
|
|
32313
32313
|
//获取key成功
|
|
32314
32314
|
if (code == 10001) {
|
|
32315
|
-
|
|
32315
|
+
//保存的真正一级密码
|
|
32316
|
+
let pwd_code = result.data.codeData.key;
|
|
32317
|
+
//缓存一级密码
|
|
32316
32318
|
let old_key = pwd_code;
|
|
32317
|
-
|
|
32319
|
+
//保存的正则2级密码
|
|
32320
|
+
let key_code = result.data.codeData.code;
|
|
32321
|
+
//反向解析一级密码
|
|
32318
32322
|
pwd_code = crypto_js_default().AES.decrypt(pwd_code, secretKey).toString((crypto_js_default()).enc.Utf8);
|
|
32323
|
+
//反向解析2级密码
|
|
32319
32324
|
key_code = crypto_js_default().AES.decrypt(key_code, secretKey).toString((crypto_js_default()).enc.Utf8);
|
|
32320
|
-
|
|
32321
|
-
|
|
32325
|
+
//密码匹配
|
|
32326
|
+
if (pwd_code == data.password) {
|
|
32327
|
+
//平台正向加密2级密码
|
|
32328
|
+
pwd_code = window.appSdk.Encrypt(key_code);
|
|
32322
32329
|
data.password = pwd_code;
|
|
32323
32330
|
result = await request.post(`/system/authority/loginAccount4Application?authPicCode=${data.imageCode}&dataappId=${appid}&mobileOrWeb=web`, data);
|
|
32324
|
-
response = JSON.parse(result.request.response);
|
|
32331
|
+
let response = JSON.parse(result.request.response);
|
|
32325
32332
|
code = response.code;
|
|
32326
32333
|
//登录平台成功
|
|
32327
32334
|
if (code == 10110004) {
|