isdata-customer-sdk 0.1.83 → 0.1.84
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 +10 -24
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +10 -24
- 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.umd.js
CHANGED
|
@@ -29810,25 +29810,10 @@ let prefixPath = window.prefixPath || "";
|
|
|
29810
29810
|
* @param {*} isPortalAction
|
|
29811
29811
|
* @returns
|
|
29812
29812
|
*/
|
|
29813
|
-
const getPoratlAppID = (
|
|
29814
|
-
let portal_app_id = "";
|
|
29815
|
-
if (
|
|
29813
|
+
const getPoratlAppID = () => {
|
|
29814
|
+
let portal_app_id = window.sessionStorage.getItem("iportal_app_id");
|
|
29815
|
+
if (!portal_app_id) {
|
|
29816
29816
|
portal_app_id = window.appSdk.getAppId();
|
|
29817
|
-
} else {
|
|
29818
|
-
portal_app_id = window.sessionStorage.getItem("iportal_app_id");
|
|
29819
|
-
// 如果缓存中没有iportal_app_id,则从appVariables中获取
|
|
29820
|
-
if (!portal_app_id) {
|
|
29821
|
-
appVariables.forEach(item => {
|
|
29822
|
-
if (item.name == "iPortal_app_id") {
|
|
29823
|
-
portal_app_id = item.default_value;
|
|
29824
|
-
}
|
|
29825
|
-
});
|
|
29826
|
-
}
|
|
29827
|
-
// 如果appVariables中也没有,则从window.appSdk.getAppId()获取
|
|
29828
|
-
// 这通常是因为在非门户应用中使用了门户相关的功能
|
|
29829
|
-
if (!portal_app_id) {
|
|
29830
|
-
portal_app_id = window.appSdk.getAppId();
|
|
29831
|
-
}
|
|
29832
29817
|
}
|
|
29833
29818
|
return portal_app_id;
|
|
29834
29819
|
};
|
|
@@ -29841,7 +29826,7 @@ const getPoratlAppID = (isPortalAction, appVariables) => {
|
|
|
29841
29826
|
* @returns
|
|
29842
29827
|
*/
|
|
29843
29828
|
const getAppPortalMenuDatas = async (user_id, group_id, isPortalAction, appVariables) => {
|
|
29844
|
-
let portal_app_id = getPoratlAppID(
|
|
29829
|
+
let portal_app_id = getPoratlAppID();
|
|
29845
29830
|
let roleList = await getRoleIDsByUserAndGroupID(user_id, portal_app_id, group_id);
|
|
29846
29831
|
let portalMenuDatas = await getMenuDatasByGroupID(group_id, roleList);
|
|
29847
29832
|
let app_id = window.appSdk.getAppId();
|
|
@@ -32333,6 +32318,7 @@ const loginAccount = async (data, appid) => {
|
|
|
32333
32318
|
window.sessionStorage.setItem("iportal_group_id", data.groupid);
|
|
32334
32319
|
window.sessionStorage.setItem("iportal_login_user_key", old_key);
|
|
32335
32320
|
window.sessionStorage.setItem("iportal_client_id", clientID);
|
|
32321
|
+
window.sessionStorage.setItem("iportal_app_id", appid);
|
|
32336
32322
|
return {
|
|
32337
32323
|
code: code
|
|
32338
32324
|
};
|
|
@@ -32964,7 +32950,7 @@ const getIMHanlder = customerHanlder => {
|
|
|
32964
32950
|
|
|
32965
32951
|
|
|
32966
32952
|
const sendPostToAIAgent = async (queryData, successCallback, errorCallback) => {
|
|
32967
|
-
let appid = getPoratlAppID(
|
|
32953
|
+
let appid = getPoratlAppID();
|
|
32968
32954
|
let appCustomData = await getAppCustomData(appid);
|
|
32969
32955
|
let aiAgentServerIP = appCustomData?.aiAgentServerIP || "";
|
|
32970
32956
|
if (!aiAgentServerIP) {
|
|
@@ -33019,10 +33005,10 @@ const getDifyFileType = fileType => {
|
|
|
33019
33005
|
return typeOptions[key] || "custom";
|
|
33020
33006
|
};
|
|
33021
33007
|
|
|
33022
|
-
/**
|
|
33023
|
-
* 从 URL 中提取文件名(如 https://example.com/path/image.png → image.png)
|
|
33024
|
-
* @param {string} url - 文件 URL
|
|
33025
|
-
* @returns {string} - 提取的文件名
|
|
33008
|
+
/**
|
|
33009
|
+
* 从 URL 中提取文件名(如 https://example.com/path/image.png → image.png)
|
|
33010
|
+
* @param {string} url - 文件 URL
|
|
33011
|
+
* @returns {string} - 提取的文件名
|
|
33026
33012
|
*/
|
|
33027
33013
|
const dify_extractFilenameFromUrl = url => {
|
|
33028
33014
|
try {
|