isdata-customer-sdk 0.1.85 → 0.1.87
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 +30 -1
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +30 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -29559,6 +29559,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29559
29559
|
createFileFromUrl: function() { return /* reexport */ createFileFromUrl; },
|
|
29560
29560
|
decrypt: function() { return /* reexport */ decrypt; },
|
|
29561
29561
|
destroyEventCenter: function() { return /* reexport */ destroyEventCenter; },
|
|
29562
|
+
encrypt: function() { return /* reexport */ encrypt; },
|
|
29562
29563
|
extractFilenameFromUrl: function() { return /* reexport */ extractFilenameFromUrl; },
|
|
29563
29564
|
fireEvent: function() { return /* reexport */ fireEvent; },
|
|
29564
29565
|
getAIRobotInfos: function() { return /* reexport */ getAIRobotInfos; },
|
|
@@ -29598,6 +29599,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29598
29599
|
getThirdAppPathByKey: function() { return /* reexport */ getThirdAppPathByKey; },
|
|
29599
29600
|
getUrlParamValue: function() { return /* reexport */ getUrlParamValue; },
|
|
29600
29601
|
getUserAllMappngPortal: function() { return /* reexport */ getUserAllMappngPortal; },
|
|
29602
|
+
getUserID: function() { return /* reexport */ getUserID; },
|
|
29601
29603
|
hasListener: function() { return /* reexport */ hasListener; },
|
|
29602
29604
|
initEventCenter: function() { return /* reexport */ initEventCenter; },
|
|
29603
29605
|
initFrameWindowListener: function() { return /* reexport */ initFrameWindowListener; },
|
|
@@ -32240,6 +32242,15 @@ const decrypt = async decryptStr => {
|
|
|
32240
32242
|
return decrypted;
|
|
32241
32243
|
};
|
|
32242
32244
|
|
|
32245
|
+
/**
|
|
32246
|
+
* 解密
|
|
32247
|
+
*/
|
|
32248
|
+
const encrypt = async decryptStr => {
|
|
32249
|
+
let secretKey = await getKey();
|
|
32250
|
+
const encrypted = crypto_js_default().AES.encrypt(decryptStr, secretKey).toString((crypto_js_default()).enc.Utf8);
|
|
32251
|
+
return encrypted;
|
|
32252
|
+
};
|
|
32253
|
+
|
|
32243
32254
|
/**
|
|
32244
32255
|
* 切换门户登录
|
|
32245
32256
|
*/
|
|
@@ -32261,6 +32272,18 @@ const switchPortalLogin = async (data, appid, endside_type) => {
|
|
|
32261
32272
|
};
|
|
32262
32273
|
}
|
|
32263
32274
|
};
|
|
32275
|
+
const getUserID = async (acccountName, old_key, group_id) => {
|
|
32276
|
+
let queryData = {
|
|
32277
|
+
param: {
|
|
32278
|
+
accountName: acccountName,
|
|
32279
|
+
group_id: group_id,
|
|
32280
|
+
account_key: old_key
|
|
32281
|
+
}
|
|
32282
|
+
};
|
|
32283
|
+
let result = await request.post(`/dataservice/rest/orchestration/getUserID`, queryData);
|
|
32284
|
+
let persion_id = result.data.persion_id;
|
|
32285
|
+
return persion_id;
|
|
32286
|
+
};
|
|
32264
32287
|
|
|
32265
32288
|
/**
|
|
32266
32289
|
* 登录账号
|
|
@@ -32302,7 +32325,7 @@ const loginAccount = async (data, appid) => {
|
|
|
32302
32325
|
code = response.code;
|
|
32303
32326
|
//登录平台成功
|
|
32304
32327
|
if (code == 10110004) {
|
|
32305
|
-
let id =
|
|
32328
|
+
let id = await getUserID(data.account_view, old_key, data.groupid);
|
|
32306
32329
|
// 初始化解析器
|
|
32307
32330
|
const parser = new UAParser();
|
|
32308
32331
|
// 获取浏览器信息
|
|
@@ -32482,6 +32505,7 @@ const removeEventAction = eventKey => {
|
|
|
32482
32505
|
delete window.sdataEventActions[eventKey];
|
|
32483
32506
|
};
|
|
32484
32507
|
const initFrameWindowListener = () => {
|
|
32508
|
+
if (window.isFrameWindowInited) return;
|
|
32485
32509
|
let SDATA_WINDOW_TRUSTED_ORIGINS = window.SDATA_WINDOW_TRUSTED_ORIGINS;
|
|
32486
32510
|
if (!SDATA_WINDOW_TRUSTED_ORIGINS) window.SDATA_WINDOW_TRUSTED_ORIGINS = [];
|
|
32487
32511
|
let sdataEventActions = window.sdataEventActions;
|
|
@@ -32518,6 +32542,7 @@ const initFrameWindowListener = () => {
|
|
|
32518
32542
|
event.source.postMessage(responseData, eventSourceKey);
|
|
32519
32543
|
}
|
|
32520
32544
|
});
|
|
32545
|
+
window.isFrameWindowInited = true;
|
|
32521
32546
|
};
|
|
32522
32547
|
const sendWindowMessage = async (targetWindow, originKey, eventKey, data, callback) => {
|
|
32523
32548
|
let timestamp = new Date().getTime();
|
|
@@ -32641,6 +32666,10 @@ class ChatClientMgr {
|
|
|
32641
32666
|
return "IM_SINGLE_MODE";
|
|
32642
32667
|
case 2:
|
|
32643
32668
|
return "IM_EMBED_MODE";
|
|
32669
|
+
case 3:
|
|
32670
|
+
return "IM_MOBILE_MULTIPLE_EMBED_MODE";
|
|
32671
|
+
case 4:
|
|
32672
|
+
return "IM_MOBILE_SINGLE_EMBED_MODE";
|
|
32644
32673
|
default:
|
|
32645
32674
|
return "IM_MULTIPLE_MODE";
|
|
32646
32675
|
}
|