diff --git a/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java b/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java index e27addca3e..03bdf5eaf8 100644 --- a/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java +++ b/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java @@ -579,6 +579,15 @@ public class ShareInfoService { projectId = reportResult.getProjectId(); } } + + if (StringUtils.equals(shareInfo.getShareType(), "UI_REPORT")) { + type = ProjectApplicationType.UI_SHARE_REPORT_TIME.toString(); + APIScenarioReportResult reportResult = extApiScenarioReportMapper.get(shareInfo.getCustomData()); + if (reportResult != null) { + projectId = reportResult.getProjectId(); + } + } + if (StringUtils.isBlank(type) || Strings.isBlank(projectId)) { millisCheck(System.currentTimeMillis() - shareInfo.getUpdateTime(), 1000 * 60 * 60 * 24, shareInfo.getId()); } else { diff --git a/backend/src/main/java/io/metersphere/commons/constants/ProjectApplicationType.java b/backend/src/main/java/io/metersphere/commons/constants/ProjectApplicationType.java index 0caeabbc3a..345995c0b1 100644 --- a/backend/src/main/java/io/metersphere/commons/constants/ProjectApplicationType.java +++ b/backend/src/main/java/io/metersphere/commons/constants/ProjectApplicationType.java @@ -67,5 +67,9 @@ public enum ProjectApplicationType { /** * 接口分享链接有效期 */ - API_SHARE_REPORT_TIME + API_SHARE_REPORT_TIME, + /** + * UI报告分享链接有效期 + */ + UI_SHARE_REPORT_TIME } diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index a9db2120f5..6fd455241b 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit a9db2120f547fd4cd88d6fb9ba115b182a9b80eb +Subproject commit 6fd455241b44c9d952979b68922801bb6a0bbe3d diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index c698d5eac1..74ec0740a0 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit c698d5eac1182ad0c51f4ababdcc16c4b713416b +Subproject commit 74ec0740a0bf12327a064c36b3d9e2ce07d5b1e4 diff --git a/frontend/src/template/report/ui/share/ShareUiReportTemplate.vue b/frontend/src/template/report/ui/share/ShareUiReportTemplate.vue index 8b68d48dcf..fed0053242 100644 --- a/frontend/src/template/report/ui/share/ShareUiReportTemplate.vue +++ b/frontend/src/template/report/ui/share/ShareUiReportTemplate.vue @@ -21,7 +21,7 @@ export default { this.shareId = getShareId(); getShareInfo(this.shareId, (data) => { if (!data) { - this.$error('报告已删除!'); + this.$error('链接已失效,请重新获取!'); return; } if (data.shareType === 'UI_REPORT') {