@zscreate/form-component 1.1.228 → 1.1.229
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/form-component.umd.js +60 -1
- package/package.json +1 -1
|
@@ -138865,7 +138865,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__7203__;
|
|
|
138865
138865
|
/***/ ((module) => {
|
|
138866
138866
|
|
|
138867
138867
|
"use strict";
|
|
138868
|
-
module.exports = {"i8":"1.1.
|
|
138868
|
+
module.exports = {"i8":"1.1.229"};
|
|
138869
138869
|
|
|
138870
138870
|
/***/ })
|
|
138871
138871
|
|
|
@@ -148049,8 +148049,65 @@ const watermark = __webpack_require__(2206);
|
|
|
148049
148049
|
};
|
|
148050
148050
|
}
|
|
148051
148051
|
});
|
|
148052
|
+
;// CONCATENATED MODULE: ./src/utils/checkCas/index.js
|
|
148053
|
+
|
|
148054
|
+
|
|
148055
|
+
|
|
148056
|
+
function checkCas_extractDomainInfo(url) {
|
|
148057
|
+
try {
|
|
148058
|
+
// 解析URL
|
|
148059
|
+
const parsedUrl = new URL(url);
|
|
148060
|
+
|
|
148061
|
+
// 获取协议,主机名和端口号
|
|
148062
|
+
const protocol = parsedUrl.protocol;
|
|
148063
|
+
const hostname = parsedUrl.hostname;
|
|
148064
|
+
const port = parsedUrl.port;
|
|
148065
|
+
|
|
148066
|
+
// 格式化输出,包括协议,主机名和端口号(如果有)
|
|
148067
|
+
return `${protocol}//${hostname}${port ? `:${port}` : ''}`;
|
|
148068
|
+
} catch (e) {
|
|
148069
|
+
console.error("Invalid URL:", e);
|
|
148070
|
+
return null;
|
|
148071
|
+
}
|
|
148072
|
+
}
|
|
148073
|
+
function checkCas_compareUrls(url1, url2) {
|
|
148074
|
+
const domainInfo1 = checkCas_extractDomainInfo(url1);
|
|
148075
|
+
const domainInfo2 = checkCas_extractDomainInfo(url2);
|
|
148076
|
+
|
|
148077
|
+
// 比较提取的URL信息
|
|
148078
|
+
return domainInfo1 === domainInfo2;
|
|
148079
|
+
}
|
|
148080
|
+
function extractDomainInfoSubdomain(url) {
|
|
148081
|
+
try {
|
|
148082
|
+
// 解析URL
|
|
148083
|
+
const parsedUrl = new URL(url);
|
|
148084
|
+
|
|
148085
|
+
// 获取主机名和端口号
|
|
148086
|
+
const protocol = parsedUrl.protocol; // 提取协议
|
|
148087
|
+
const hostname = parsedUrl.hostname;
|
|
148088
|
+
const port = parsedUrl.port;
|
|
148089
|
+
|
|
148090
|
+
// 分割主机名以提取顶级域名和次一级域名
|
|
148091
|
+
const domainParts = hostname.split('.');
|
|
148092
|
+
const topLevelDomain = domainParts.slice(-2).join('.');
|
|
148093
|
+
|
|
148094
|
+
// 返回协议,顶级域名和次一级域名,以及端口号(如果存在)
|
|
148095
|
+
return `${protocol}//${topLevelDomain}${port ? `:${port}` : ''}`;
|
|
148096
|
+
} catch (e) {
|
|
148097
|
+
console.error("Invalid URL:", e);
|
|
148098
|
+
return null;
|
|
148099
|
+
}
|
|
148100
|
+
}
|
|
148101
|
+
function compareUrlsSubdomain(url1, url2) {
|
|
148102
|
+
const domainInfo1 = extractDomainInfoSubdomain(url1);
|
|
148103
|
+
const domainInfo2 = extractDomainInfoSubdomain(url2);
|
|
148104
|
+
|
|
148105
|
+
// 比较提取的顶级域名和次一级域名
|
|
148106
|
+
return domainInfo1 === domainInfo2;
|
|
148107
|
+
}
|
|
148052
148108
|
;// CONCATENATED MODULE: ./src/utils/checkSsoStatusV2.js
|
|
148053
148109
|
|
|
148110
|
+
|
|
148054
148111
|
function useSsoStatusV2(options) {
|
|
148055
148112
|
const {
|
|
148056
148113
|
casUrl,
|
|
@@ -148060,6 +148117,7 @@ function useSsoStatusV2(options) {
|
|
|
148060
148117
|
} = options;
|
|
148061
148118
|
return {
|
|
148062
148119
|
check() {
|
|
148120
|
+
if (!compareUrlsSubdomain(casUrl, casCheckUrl)) return;
|
|
148063
148121
|
// 创建iframe元素
|
|
148064
148122
|
const iframe = document.createElement('iframe');
|
|
148065
148123
|
iframe.src = casUrl + '/login?service=' + casCheckUrl;
|
|
@@ -148067,6 +148125,7 @@ function useSsoStatusV2(options) {
|
|
|
148067
148125
|
iframe.height = '0px';
|
|
148068
148126
|
iframe.onload = () => {
|
|
148069
148127
|
try {
|
|
148128
|
+
debugger;
|
|
148070
148129
|
const document = iframe.contentWindow.document;
|
|
148071
148130
|
console.log("iframe onload", iframe.contentWindow, iframe);
|
|
148072
148131
|
const ticket = (0,utils_util/* getQueryParam */.Ph)('ticket', iframe.contentWindow.location.href);
|