|
|
@ -30,20 +30,12 @@ |
|
|
|
<template v-if="column.key === 'domain'"> |
|
|
|
<a-space direction="vertical"> |
|
|
|
<a |
|
|
|
v-if="domain" |
|
|
|
:href="`https://${domain}`" |
|
|
|
v-if="record.domain" |
|
|
|
:href="`${record.prefix}${record.domain}`" |
|
|
|
class="text-gray-500 hover:text-blue-500" |
|
|
|
target="_blank" |
|
|
|
> |
|
|
|
{{ domain }} |
|
|
|
</a> |
|
|
|
<a |
|
|
|
v-if="record.websiteCode" |
|
|
|
:href="`https://${record.websiteCode}.wsdns.cn`" |
|
|
|
class="text-gray-500 hover:text-blue-500" |
|
|
|
target="_blank" |
|
|
|
> |
|
|
|
{{ `${record.websiteCode}.wsdns.cn` }} |
|
|
|
{{ record.domain }} |
|
|
|
</a> |
|
|
|
</a-space> |
|
|
|
</template> |
|
|
@ -80,13 +72,14 @@ |
|
|
|
<a-tag v-if="record.status > 0 && record.soon < 0" color="orange">即将过期</a-tag> |
|
|
|
</template> |
|
|
|
<template v-if="column.key === 'action'"> |
|
|
|
<a @click="onShare(record)"> |
|
|
|
<MobileOutlined/> 手机版 |
|
|
|
</a> |
|
|
|
<a-divider type="vertical"/> |
|
|
|
<a @click="openEdit(record)"> |
|
|
|
编辑 |
|
|
|
</a> |
|
|
|
<a @click="onShare(record)" class="text-green-600"> |
|
|
|
<QrcodeOutlined /> |
|
|
|
二维码 |
|
|
|
</a> |
|
|
|
<a-divider type="vertical"/> |
|
|
|
<a @click="openEdit(record)"> |
|
|
|
编辑 |
|
|
|
</a> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #emptyText> |
|
|
@ -112,7 +105,7 @@ |
|
|
|
<WebsiteEdit v-model:visible="showEdit" :data="current" @done="reload"/> |
|
|
|
|
|
|
|
<!-- 二维码 --> |
|
|
|
<Qrcode v-model:visible="showQrcode" :data="`${qrcode}`" @done="hideShare"/> |
|
|
|
<Qrcode v-model:visible="showQrcode" :data="`${qrcode}`" @done="hideShare" title="二维码"/> |
|
|
|
|
|
|
|
</a-spin> |
|
|
|
</a-page-header> |
|
|
@ -121,7 +114,7 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
import {createVNode, ref} from 'vue'; |
|
|
|
import {message, Modal} from 'ant-design-vue'; |
|
|
|
import {ExclamationCircleOutlined, QrcodeOutlined,MobileOutlined, EditOutlined} from '@ant-design/icons-vue'; |
|
|
|
import {ExclamationCircleOutlined, QrcodeOutlined} from '@ant-design/icons-vue'; |
|
|
|
import type {EleProTable} from 'ele-admin-pro'; |
|
|
|
import {toDateString} from 'ele-admin-pro'; |
|
|
|
import type { |
|
|
@ -185,21 +178,22 @@ const datasource: DatasourceFunction = ({ |
|
|
|
|
|
|
|
// 表格列配置 |
|
|
|
const columns = ref<ColumnItem[]>([ |
|
|
|
// { |
|
|
|
// title: 'ID', |
|
|
|
// dataIndex: 'websiteId', |
|
|
|
// key: 'websiteId', |
|
|
|
// width: 90 |
|
|
|
// }, |
|
|
|
{ |
|
|
|
title: 'ID', |
|
|
|
dataIndex: 'websiteId', |
|
|
|
key: 'websiteId', |
|
|
|
width: 90 |
|
|
|
title: 'LOGO', |
|
|
|
dataIndex: 'websiteLogo', |
|
|
|
key: 'websiteLogo', |
|
|
|
align: 'center' |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '网站名称', |
|
|
|
dataIndex: 'websiteName', |
|
|
|
key: 'websiteName' |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '头像', |
|
|
|
dataIndex: 'websiteLogo', |
|
|
|
key: 'websiteLogo', |
|
|
|
key: 'websiteName', |
|
|
|
align: 'center' |
|
|
|
}, |
|
|
|
{ |
|
|
@ -279,10 +273,7 @@ const updateType = (row: CmsWebsite) => { |
|
|
|
}; |
|
|
|
|
|
|
|
const onShare = (row?: CmsWebsite) => { |
|
|
|
qrcode.value = `https://${row?.websiteCode}.wsdns.cn` |
|
|
|
if(localStorage.getItem('Domain')){ |
|
|
|
qrcode.value = `https://${localStorage.getItem('Domain')}` |
|
|
|
} |
|
|
|
qrcode.value = `${row?.prefix}${row?.domain}` |
|
|
|
showQrcode.value = true; |
|
|
|
} |
|
|
|
|
|
|
@ -342,9 +333,9 @@ const query = () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
// 查询授权域名 |
|
|
|
if(localStorage.getItem('Domain')){ |
|
|
|
if (localStorage.getItem('Domain')) { |
|
|
|
getAuthorizedDomain().then((data) => { |
|
|
|
if(data){ |
|
|
|
if (data) { |
|
|
|
domain.value = data.domain; |
|
|
|
} |
|
|
|
}) |
|
|
|