From 62dfae8fc89c3abc34728c3c3e5f7e82b23be1fd Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Sat, 10 Aug 2024 23:48:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BD=91=E7=AB=99=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BF=AB=E9=80=9F=E8=B7=B3=E8=BD=AC=20(#6086?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/website/website/index.vue | 41 +++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) 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();