diff --git a/frontend/src/views/website/website/index.vue b/frontend/src/views/website/website/index.vue index efea0730c..d230af2b3 100644 --- a/frontend/src/views/website/website/index.vue +++ b/frontend/src/views/website/website/index.vue @@ -67,6 +67,22 @@ {{ row.primaryDomain }} + + + + + + + + +
+ + {{ getUrl(domain, row) }} + +
+
([]); const dataRef = ref(); +const domains = ref([]); const paginationConfig = reactive({ cacheSizeKey: 'website-page-size', @@ -474,6 +491,28 @@ const toFolder = (folder: string) => { router.push({ path: '/hosts/files', query: { path: folder } }); }; +const searchDomains = (id: number) => { + ListDomains(id).then((res) => { + domains.value = res.data; + }); +}; + +const openUrl = (url: string) => { + window.open(url); +}; + +const getUrl = (domain: Website.Domain, website: Website.Website): string => { + const protocol = website.protocol.toLowerCase(); + let url = protocol + '://' + domain.domain; + if (protocol == 'http' && domain.port != 80) { + url = url + ':' + domain.port; + } + if (protocol == 'https' && domain.ssl) { + url = url + ':' + domain.port; + } + return url; +}; + onMounted(() => { search(); listGroup();