Browse Source

feat: 网站域名跳转增加端口 (#900)

pull/902/head
zhengkunwang223 2 years ago committed by GitHub
parent
commit
49c9929a53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      frontend/src/views/website/website/config/basic/domain/index.vue

9
frontend/src/views/website/website/config/basic/domain/index.vue

@ -5,7 +5,7 @@
</template>
<el-table-column width="30px">
<template #default="{ row }">
<el-button link :icon="Promotion" @click="openUrl(row.domain)"></el-button>
<el-button link :icon="Promotion" @click="openUrl(row.domain, row.port)"></el-button>
</template>
</el-table-column>
<el-table-column :label="$t('website.domain')" prop="domain"></el-table-column>
@ -55,8 +55,11 @@ const openCreate = () => {
domainRef.value.acceptParams(id.value);
};
const openUrl = (domain: string) => {
const url = website.value.protocol.toLowerCase() + '://' + domain;
const openUrl = (domain: string, port: string) => {
let url = website.value.protocol.toLowerCase() + '://' + domain;
if (port != '80') {
url = url + ':' + port;
}
window.open(url);
};

Loading…
Cancel
Save