【修复】申请配置证书CA列表,授权api新增新增btdomain

This commit is contained in:
cai
2025-09-17 14:54:50 +08:00
parent 51548f6788
commit b91fd107ee
147 changed files with 19178 additions and 2123 deletions

View File

@@ -4,6 +4,8 @@ import type { ApiResponse } from "../types/api";
import type {
DomainQueryCheckRequest,
DomainQueryCheckResponseData,
AiDomainQueryCheckRequest,
AiDomainQueryCheckResponseData
} from "../types/api-types/domain-query-check";
import type {
ContactGetUserDetailRequest,
@@ -56,6 +58,17 @@ export function domainQueryCheck(
headers
);
}
// AI -域名查询
export function aiDomainQueryCheck(
data: AiDomainQueryCheckRequest,
headers?: Record<string, string>,
): Promise<ApiResponse<AiDomainQueryCheckResponseData>> {
return api.post<AiDomainQueryCheckResponseData>(
"/v1/domain/recommend/recommend_domains",
data,
headers,
);
}
// 获取实名信息模板列表
export function getContactUserDetail(

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,455 @@
/**
* @fileoverview WHOIS 查询页面逻辑
* @description 提供域名 WHOIS 信息查询功能,复用现有 API 和样式
*/
import { queryWhois } from "@api/landing";
// 安全的jQuery访问函数
function safe$() {
return (window as any).$ as any;
}
// 页面状态管理
let currentDomain = '';
let isInitialized = false;
/**
* 初始化页面
*/
function init() {
if (isInitialized) {
return;
}
bindEvents();
handleUrlParams();
isInitialized = true;
}
/**
* 绑定事件
*/
function bindEvents() {
const $ = safe$();
if (!$) return;
// 搜索按钮点击事件
$(document).on('click', '#whois-search-btn', handleSearch);
// 输入框回车事件
$(document).on('keypress', '#whois-domain-input', (e: any) => {
if (e.which === 13) {
handleSearch();
}
});
// 清空输入按钮
$(document).on('click', '#whois-clear-input', () => {
$('#whois-domain-input').val('').trigger('input');
});
// 输入框变化事件
$(document).on('input', '#whois-domain-input', (e: any) => {
const value = $(e.target).val() as string;
const $clearBtn = $('#whois-clear-input');
if (value && value.trim()) {
$clearBtn.addClass('visible');
} else {
$clearBtn.removeClass('visible');
}
});
}
/**
* 处理 URL 参数
*/
function handleUrlParams() {
const urlParams = new URLSearchParams(window.location.search);
const domain = urlParams.get('domain');
const $ = safe$();
if (!$) return;
if (domain) {
$('#whois-domain-input').val(domain).trigger('input');
performSearch(domain);
}
}
/**
* 验证域名格式
*/
function isValidDomain(domain: string): boolean {
const domainRegex = /^[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/;
return domainRegex.test(domain.trim());
}
/**
* 处理搜索操作
*/
function handleSearch() {
const $ = safe$();
if (!$) return;
const domain = ($('#whois-domain-input').val() as string).trim();
if (!domain) {
alert('请输入要查询的域名');
return;
}
if (!isValidDomain(domain)) {
alert('请输入正确的域名格式');
return;
}
performSearch(domain);
}
/**
* 执行 WHOIS 查询
*/
async function performSearch(domain: string) {
currentDomain = domain;
showLoading();
try {
const response = await queryWhois(domain);
// const response = {
// code: 0,
// status: true,
// msg: "查询成功",
// data: {
// address: [
// "3th Floor, BangNing Technology Park, 2 YuHua Avenue",
// "Yuhuatai District",
// "Nanjing Jiangsu",
// "China",
// "3th Floor, BangNing Technology Park, 2 YuHua Avenue",
// "Yuhuatai District",
// "Nanjing Jiangsu",
// "China",
// "3th Floor, BangNing Technology Park, 2 YuHua Avenue",
// "Yuhuatai District",
// "Nanjing Jiangsu",
// "China",
// ],
// city: "",
// country: "CN",
// creation_date: "2014-07-24 10:45:35",
// dnssec: "signed",
// domain_name: "top",
// emails: ["support@nic.top", "tech@nic.top"],
// expiration_date: "",
// name: "Sven Chen",
// name_servers: [
// "A.ZDNSCLOUD.CN 203.99.24.1",
// "B.ZDNSCLOUD.CN 203.99.25.1",
// "C.ZDNSCLOUD.COM 203.99.26.1",
// "D.ZDNSCLOUD.COM 203.99.27.1",
// "F.ZDNSCLOUD.CN 116.169.54.111",
// "G.ZDNSCLOUD.COM 223.72.199.37",
// "I.ZDNSCLOUD.CN 2401:8d00:1:0:0:0:0:1",
// "J.ZDNSCLOUD.COM 2401:8d00:2:0:0:0:0:1",
// ],
// org: "Jiangsu Bangning Science & technology Co.,Ltd.",
// phone: [
// "+86 18936016161",
// "Fax: +86 2586883476",
// "+86 15895978960",
// "Fax: +86 02586883476",
// ],
// referral_url: "whois.nic.top",
// registrant_postal_code: "",
// registrar: "",
// registrar_url: "",
// reseller: null,
// state: "",
// status: "ACTIVE",
// updated_date: "2025-07-29 10:45:35",
// whois_server: "whois.nic.top",
// rawData:
// "% IANA WHOIS server\n% for more information on IANA, visit http://www.iana.org\n% This query returned 1 object\n\nrefer: whois.nic.top\n\ndomain: TOP\n\norganisation: .TOP Registry\naddress: 3th Floor, BangNing Technology Park, 2 YuHua Avenue\naddress: Yuhuatai District\naddress: Nanjing Jiangsu\naddress: China\n\ncontact: administrative\nname: Sven Chen\norganisation: Jiangsu Bangning Science & technology Co.,Ltd.\naddress: 3th Floor, BangNing Technology Park, 2 YuHua Avenue\naddress: Yuhuatai District\naddress: Nanjing Jiangsu\naddress: China\nphone: +86 18936016161\nfax-no: +86 2586883476\ne-mail: support@nic.top\n\ncontact: technical\nname: YiFeng Shen\norganisation: Jiangsu Bangning Science & technology Co.,Ltd.\naddress: 3th Floor, BangNing Technology Park, 2 YuHua Avenue\naddress: Yuhuatai District\naddress: Nanjing Jiangsu\naddress: China\nphone: +86 15895978960\nfax-no: +86 02586883476\ne-mail: tech@nic.top\n\nnserver: A.ZDNSCLOUD.CN 203.99.24.1\nnserver: B.ZDNSCLOUD.CN 203.99.25.1\nnserver: C.ZDNSCLOUD.COM 203.99.26.1\nnserver: D.ZDNSCLOUD.COM 203.99.27.1\nnserver: F.ZDNSCLOUD.CN 116.169.54.111\nnserver: G.ZDNSCLOUD.COM 223.72.199.37\nnserver: I.ZDNSCLOUD.CN 2401:8d00:1:0:0:0:0:1\nnserver: J.ZDNSCLOUD.COM 2401:8d00:2:0:0:0:0:1\nds-rdata: 26780 8 2 5d6e7869ee8e3b536a617de89482ddd1dcb9db9dbb1ac33d6ed351e2ca095b1b\n\nwhois: whois.nic.top\n\nstatus: ACTIVE\nremarks: Registration information: http://www.nic.top\n\ncreated: 2014-07-24\nchanged: 2025-07-29\nsource: IANA",
// },
// };
if (response.status && response.data) {
renderResults(domain, response.data);
showResults();
updatePageState(domain);
} else {
throw new Error('查询失败');
}
} catch (error: any) {
console.error('WHOIS查询失败:', error);
showError(error.message || '查询失败,请稍后重试');
}
}
/**
* 渲染查询结果
*/
function renderResults(domain: string, data: any) {
console.log(domain,'-21212');
const $ = safe$();
if (!$) return;
const currentTime = new Date().toLocaleString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
});
const resultsHtml = generateSimpleLayout(domain, data, currentTime);
$('#whois-content-area').html(resultsHtml);
}
/**
* 生成简洁表格式布局
*/
function generateSimpleLayout(domain: string, data: any, currentTime: string): string {
const domainName = domain;
return `
<div class="whois-simple-layout">
<!-- 标题区域 -->
<div class="whois-header">
<h2 class="whois-title">
<span class="title-decoration"></span>
<span class="domain-name">${domainName}</span> 域名注册信息
</h2>
<div class="whois-meta">
<span>以下信息获取时间:${currentTime}</span>
<a href="#" class="refresh-link" onclick="performSearch('${domain}')">获取最新信息</a>
</div>
</div>
<!-- 信息表格 -->
<div class="whois-table">
${generateWhoisRows(data)}
</div>
<!-- 原始数据区域 -->
<div class="whois-raw-data-section">
<div class="raw-data-content">
<div class="raw-data-title">
<span class="title-decoration"></span>
<span>${domainName} 完整WHOIS信息</span>
</div>
<div class="raw-data-box">${formatRawData(data.rawData || '暂无原始数据')}</div>
</div>
</div>
</div>
`;
}
/**
* 生成WHOIS信息行
*/
function generateWhoisRows(data: any): string {
// 处理邮箱数据
const emails = Array.isArray(data.emails)
? data.emails.join(", ")
: data.emails || "请联系当前域名注册商获取";
// 处理域名服务器数据
const nameServers = Array.isArray(data.name_servers)
? data.name_servers
: data.name_servers ? [data.name_servers] : [];
// 处理状态
const status = data.status || "未知状态";
let statusBadgeClass = "status-unknown";
if (status.includes("ACTIVE") || status.includes("ok")) {
statusBadgeClass = "status-active";
} else if (status.includes("Transfer")) {
statusBadgeClass = "status-transfer";
}
const rows = [
{
labelCn: "域名所有者",
labelEn: "Registrant",
value: data.name || "请联系当前域名注册商获取",
},
{
labelCn: "所有者邮箱",
labelEn: "Registrant Email",
value: emails,
},
{
labelCn: "注册商",
labelEn: "Registrar",
value:
data.registrar ||
data.org ||
"Guizhou Zhongyu Zhike Network Technology Co., Ltd.",
},
{
labelCn: "注册时间",
labelEn: "Registration Date",
value:
formatDateTime(data.creation_date) || "2020-10-24 16:00:12 (北京时间)",
},
{
labelCn: "到期时间",
labelEn: "Expiration Date",
value:
formatDateTime(data.expiration_date) ||
"2026-10-24 16:00:12 (北京时间)",
extraInfo: data.expiration_date
? `
<div style="margin-top: 8px; font-size: 12px; color: #666; line-height: 1.4;">
· 该域名到期时间仅供参考,实际到期时间请咨询对应注册商,费时云资源域名以控制台到期时间和消息提醒为准。<br>
· 请在实际到期时间前续费,否则将导致该域名使用异常。
</div>
`
: "",
},
{
labelCn: "域名状态",
labelEn: "Domain Status",
value: `
<div class="whois-status-value">
<span>${status}</span>
<span class="whois-status-badge-simple ${statusBadgeClass}">(${status === 'ACTIVE'?'正常':status})</span>
</div>
`,
},
];
// 如果有DNS服务器添加DNS信息行
if (nameServers.length > 0) {
rows.push({
labelCn: 'DNS 服务器',
labelEn: 'Name Server',
value: `
<div class="whois-value-multiple">
${nameServers.map((server: string) => `<div class="whois-dns-item">${server}</div>`).join('')}
</div>
`
});
}
return rows.map(row => `
<div class="whois-row">
<div class="whois-label">
<div class="label-cn">${row.labelCn}</div>
<div class="label-en">${row.labelEn}</div>
</div>
<div class="whois-value">
${row.value}
${(row as any).extraInfo || ''}
</div>
</div>
`).join('');
}
/**
* 格式化日期时间
*/
function formatDateTime(dateString: string | null | undefined): string | null {
if (!dateString) return null;
try {
const date = new Date(dateString);
return date.toLocaleString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
timeZoneName: 'short'
}).replace('GMT+8', '北京时间');
} catch {
return dateString;
}
}
/**
* 格式化原始数据
*/
function formatRawData(rawData: string): string {
if (!rawData || rawData === '暂无原始数据') {
return rawData;
}
// 确保原始数据保持原有格式,只是清理多余的空行
return rawData.trim();
}
/**
* 显示加载状态
*/
function showLoading() {
const $ = safe$();
if (!$) return;
$('#whois-results-section').addClass('hidden');
$('#whois-error-section').addClass('hidden');
$('#whois-loading-section').removeClass('hidden');
}
/**
* 显示结果
*/
function showResults() {
const $ = safe$();
if (!$) return;
$('#whois-loading-section').addClass('hidden');
$('#whois-error-section').addClass('hidden');
$('#whois-results-section').removeClass('hidden');
}
/**
* 显示错误信息
*/
function showError(message: string) {
const $ = safe$();
if (!$) return;
$('#whois-error-message').text(message);
$('#whois-loading-section').addClass('hidden');
$('#whois-results-section').addClass('hidden');
$('#whois-error-section').removeClass('hidden');
}
/**
* 更新页面状态标题和URL
*/
function updatePageState(domain: string) {
document.title = `${domain} - WHOIS 查询结果 - 堡塔域名注册`;
const newUrl = `${window.location.pathname}?domain=${encodeURIComponent(domain)}`;
window.history.replaceState({ domain }, '', newUrl);
}
/**
* 暴露必要的函数到全局作用域
*/
(window as any).performSearch = performSearch;
// 页面初始化逻辑
function safeInit() {
// 确保DOM和jQuery都已准备就绪
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
// DOM已经准备就绪
if (safe$()) {
// jQuery也已加载
init();
} else {
// 等待jQuery加载
window.addEventListener('load', init);
}
}
}
// 开始初始化
safeInit();

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,860 @@
/**
* WHOIS查询页面专用样式文件
* 包含页面所需的所有原子样式和组件样式
*/
/* =========================== */
/* CSS变量定义 (复用主项目变量) */
/* =========================== */
:root {
/* 主色调 */
--primary: #20a53a;
--secondary: #363636;
--light: #fff;
--dark: #1a1a1a;
--success: #00b42a;
--danger: #f53f3f;
/* 透明度变体 */
--primary-5: rgba(32, 165, 58, 0.05);
--primary-10: rgba(32, 165, 58, 0.1);
--primary-90: rgba(32, 165, 58, 0.9);
--secondary-40: rgba(54, 54, 54, 0.4);
--secondary-70: rgba(54, 54, 54, 0.7);
--secondary-80: rgba(54, 54, 54, 0.8);
}
/* =========================== */
/* 基础样式重置 */
/* =========================== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', system-ui, sans-serif;
background-color: var(--light);
color: var(--secondary);
line-height: 1.6;
}
button {
outline: none;
background-color: transparent;
border: none;
}
/* =========================== */
/* 布局工具类 */
/* =========================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.relative { position: relative; }
.absolute { position: absolute; }
.inline-block { display: inline-block; }
.block { display: block; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.gap-4 { gap: 1rem; }
/* =========================== */
/* 间距工具类 */
/* =========================== */
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.p-4 { padding: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-auto { margin-left: auto; }
/* =========================== */
/* 字体大小 */
/* =========================== */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-clamp { font-size: clamp(1.5rem, 3vw, 2.5rem); }
/* =========================== */
/* 字体权重 */
/* =========================== */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: Monaco, Menlo, 'Ubuntu Mono', monospace; }
/* =========================== */
/* 颜色工具类 */
/* =========================== */
.text-primary { color: var(--primary); }
.text-dark { color: var(--dark); }
.text-secondary { color: var(--secondary); }
.text-secondary-70 { color: var(--secondary-70); }
.text-secondary-80 { color: var(--secondary-80); }
.text-white { color: white; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-red-500 { color: #ef4444; }
.text-green-400 { color: #4ade80; }
.bg-white { background-color: white; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }
.bg-green-100 { background-color: #dcfce7; }
.bg-green-800 { background-color: #166534; }
.bg-yellow-100 { background-color: #fef3c7; }
.bg-yellow-800 { color: #ffffff; background-color: #92400e; }
/* =========================== */
/* 边框和圆角 */
/* =========================== */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-gray-200 { border-color: #e5e7eb; }
.border-dashed { border-style: dashed; }
.border-primary { border-color: var(--primary); }
.border-b-2 { border-bottom-width: 2px; }
.border-2 { border-width: 2px; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
/* =========================== */
/* 阴影 */
/* =========================== */
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
/* =========================== */
/* 过渡和动画 */
/* =========================== */
.transition-all { transition: all 0.15s ease-in-out; }
.transition-transform { transition: transform 0.15s ease-in-out; }
.duration-300 { transition-duration: 300ms; }
.transform { transform: translateZ(0); }
.-translate-y-1 { transform: translateY(-0.25rem); }
/* 旋转动画 */
.animate-spin {
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* 淡入动画 */
.animate-fade-in {
animation: fade-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fade-in {
0% {
opacity: 0;
transform: translateY(10px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
/* =========================== */
/* 尺寸工具类 */
/* =========================== */
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.max-h-96 { max-height: 24rem; }
/* =========================== */
/* 其他工具类 */
/* =========================== */
.cursor-pointer { cursor: pointer; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.overflow-auto { overflow: auto; }
.font-sans { font-family: 'Inter', system-ui, sans-serif; }
.leading-tight { line-height: 1.25; }
/* =========================== */
/* 特殊背景样式 */
/* =========================== */
.bg-gradient-to-b {
background: linear-gradient(to bottom, #f8fafc, #ffffff);
}
/* =========================== */
/* 边框颜色 */
/* =========================== */
.border-primary { border-color: var(--primary); }
/* =========================== */
/* hover效果 */
/* =========================== */
.hover\:text-primary:hover { color: var(--primary); }
.hover\:shadow-primary-30:hover { box-shadow: 0 0 0 1px rgba(32, 165, 58, 0.3); }
/* =========================== */
/* 响应式工具类 */
/* =========================== */
@media (min-width: 640px) {
.sm\:flex-row { flex-direction: row; }
}
@media (min-width: 768px) {
.md\:pt-24 { padding-top: 6rem; }
.md\:pb-28 { padding-bottom: 7rem; }
}
/* =========================== */
/* 复用主项目的组件样式 */
/* =========================== */
/* 容器 */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
}
/* 搜索输入框 */
.search-input {
width: 100%;
padding: 0.75rem 1rem;
border-radius: 0.125rem;
border: 1px solid var(--primary);
font-size: 1rem;
line-height: 1.75rem;
outline: none;
transition: all 0.15s ease-in-out;
}
.search-input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px var(--primary-10);
}
.input-container {
position: relative;
flex: 1;
}
.clear-input-button {
font-size: 1.6rem;
position: absolute;
right: 1rem;
top: 14.5px;
color: #9ca3af;
cursor: pointer;
opacity: 0;
visibility: hidden;
transition: all 0.15s ease-in-out;
}
.clear-input-button:hover {
color: #6b7280;
}
.clear-input-button.visible {
opacity: 1;
visibility: visible;
}
/* 主要操作按钮 */
.primary-action-button {
display: inline-block;
cursor: pointer;
background-color: var(--primary);
color: white;
font-weight: 700;
padding: 0.75rem 1.5rem;
border-radius: 0.125rem;
transition: all 0.15s ease-in-out;
box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
height: 54px;
}
.primary-action-button:hover {
background-color: var(--primary-90);
transform: translateY(-1px);
}
/* 操作按钮 */
.action-button {
border: 1px solid var(--primary);
background-color: white;
color: var(--primary);
padding: 0.375rem 0.75rem;
border-radius: 0.125rem;
font-size: 0.875rem;
cursor: pointer;
transition: all 0.15s ease-in-out;
text-decoration: none;
display: inline-flex;
align-items: center;
}
.action-button:hover {
background-color: var(--primary-5);
border-color: var(--primary);
color: var(--primary);
}
/* 悬停提升效果 */
.hover-lift {
transition:
transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover {
transform: translateY(-0.125rem);
}
/* =========================== */
/* WHOIS页面专用组件样式 */
/* =========================== */
/* 简洁表格式布局 */
.whois-simple-layout {
margin: 0 auto;
background: white;
padding: 30px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.whois-header {
margin-bottom: 10px;
}
.whois-title {
display: flex;
align-items: center;
font-size: 16px;
color: #333;
margin: 0 0 10px 0;
line-height: 1.4;
}
.title-decoration {
width: 4px;
height: 24px;
background: var(--primary);
margin-right: 12px;
flex-shrink: 0;
}
.domain-name {
color: var(--primary);
}
.whois-meta {
display: flex;
align-items: center;
gap: 16px;
font-size: 14px;
color: #666;
margin-bottom: 20px;
}
.refresh-link {
color: var(--primary);
text-decoration: none;
font-weight: 500;
}
.refresh-link:hover {
text-decoration: underline;
}
.whois-table {
width: 100%;
}
.whois-row {
display: flex;
min-height: 45px;
padding: 0 0 20px;
align-items: flex-start;
}
.whois-row:last-child {
border-bottom: none;
}
.whois-label {
width: 160px;
flex-shrink: 0;
text-align: right;
}
.label-cn {
display: block;
font-size: 14px;
font-weight: 500;
color: #333;
margin-bottom: 2px;
}
.label-en {
display: block;
font-size: 12px;
color: #999;
font-style: italic;
}
.whois-value {
flex: 1;
color: #333;
font-size: 14px;
line-height: 1.5;
word-break: break-all;
padding-left: 60px;
}
.whois-value-multiple {
display: flex;
flex-direction: column;
gap: 6px;
}
.whois-dns-item {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
background: #f8f9fa;
padding: 4px 8px;
border-radius: 2px;
font-size: 13px;
color: #495057;
border: 1px solid #e9ecef;
}
.whois-status-value {
display: inline-flex;
align-items: center;
gap: 8px;
}
.whois-status-badge-simple {
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
background: #e8f5e8;
color: #2d5a2d;
border: 1px solid #c3e6c3;
}
.whois-status-badge-simple.status-active {
background: #e8f5e8;
color: #2d5a2d;
border-color: #c3e6c3;
}
.whois-status-badge-simple.status-transfer {
background: #fff3cd;
color: #856404;
border-color: #ffeaa7;
}
.whois-status-badge-simple.status-unknown {
background: #e2e3e5;
color: #495057;
border-color: #ced4da;
}
/* 原始数据区域 */
.whois-raw-data-section {
margin-top: 30px;
border-top: 1px solid #e9ecef;
padding-top: 20px;
}
.raw-data-toggle {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 0;
cursor: pointer;
font-weight: 500;
color: #495057;
border: none;
background: none;
width: 100%;
text-align: left;
margin-bottom: 10px;
}
.raw-data-toggle:hover {
color: var(--primary);
}
.raw-data-toggle i {
transition: transform 0.3s ease;
}
.raw-data-toggle.expanded i {
transform: rotate(180deg);
}
.raw-data-content {
display: block; /* 默认展开 */
margin-top: 0;
}
.raw-data-content.hide {
display: none;
}
.raw-data-box {
background: #f8f9fa;
color: #495057;
padding: 20px;
border: 1px solid #e9ecef;
font-family: 'Inter', system-ui, sans-serif;
font-size: 13px;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-word;
}
.raw-data-title {
font-size: 16px;
font-weight: 600;
color: #333;
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 8px;
}
.raw-data-title .title-decoration {
width: 4px;
height: 20px;
background: var(--primary);
}
/* 原始数据滚动条样式 */
.raw-data-box::-webkit-scrollbar {
width: 8px;
}
.raw-data-box::-webkit-scrollbar-track {
background: #f1f3f4;
border-radius: 4px;
}
.raw-data-box::-webkit-scrollbar-thumb {
background: #c1c8cd;
border-radius: 4px;
}
.raw-data-box::-webkit-scrollbar-thumb:hover {
background: #a8b2ba;
}
/* 原始数据文字样式优化 */
.raw-data-box {
tab-size: 4;
}
/* 原始数据字段高亮 */
.raw-data-box {
color: #374151;
}
/* 优化行高和间距 */
.raw-data-content {
transition: all 0.3s ease-in-out;
}
.raw-data-content.hide {
opacity: 0;
max-height: 0;
overflow: hidden;
margin-top: -10px;
}
/* 切换按钮样式优化 */
.raw-data-toggle {
transition: all 0.2s ease;
}
.raw-data-toggle:hover {
background-color: rgba(32, 165, 58, 0.05);
border-radius: 4px;
}
/* WHOIS概览卡片 - 保持兼容性,但隐藏 */
.whois-overview-card {
display: none;
}
.whois-overview-card:hover {
display: none;
}
.whois-domain-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
flex-wrap: wrap;
gap: 12px;
}
.whois-domain-name {
font-size: 24px;
font-weight: 700;
color: #1e293b;
margin: 0;
line-height: 1.2;
word-break: break-all;
}
.whois-status-badge {
display: inline-flex;
align-items: center;
padding: 6px 12px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
border: 1px solid;
}
.whois-registrar-info {
display: flex;
align-items: center;
gap: 8px;
color: #64748b;
font-size: 14px;
font-weight: 500;
}
.whois-registrar-info i {
color: var(--primary);
font-size: 16px;
}
/* WHOIS信息网格 */
.whois-info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 20px;
margin-bottom: 20px;
}
.whois-info-card {
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
overflow: hidden;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.whois-card-header {
background: linear-gradient(135deg, var(--primary-5) 0%, #f8fafc 100%);
padding: 16px 20px;
border-bottom: 1px solid #e2e8f0;
display: flex;
align-items: center;
gap: 12px;
}
.whois-card-icon {
color: var(--primary);
font-size: 18px;
width: 20px;
text-align: center;
}
.whois-card-title {
font-size: 16px;
font-weight: 600;
color: #1e293b;
margin: 0;
line-height: 1.3;
}
.whois-card-content {
padding: 20px;
}
.whois-info-item {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 12px 0;
border-bottom: 1px solid #f1f5f9;
gap: 16px;
}
.whois-info-item:last-child {
border-bottom: none;
padding-bottom: 0;
}
.whois-info-item:first-child {
padding-top: 0;
}
.whois-info-label {
font-size: 14px;
font-weight: 500;
color: #64748b;
min-width: 80px;
flex-shrink: 0;
}
.whois-info-value {
font-size: 14px;
font-weight: 400;
color: #1e293b;
text-align: right;
word-break: break-all;
line-height: 1.4;
}
/* DNS服务器特殊样式 */
.whois-dns-card {
grid-column: 1 / -1;
}
.whois-dns-servers {
display: flex;
flex-direction: column;
gap: 8px;
align-items: flex-end;
}
.whois-dns-server {
display: inline-block;
background: #f1f5f9;
color: #475569;
padding: 6px 12px;
border-radius: 6px;
font-size: 13px;
font-weight: 500;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
border: 1px solid #e2e8f0;
transition: all 0.2s ease;
}
.whois-dns-server:hover {
background: var(--primary-5);
border-color: var(--primary);
color: var(--primary);
}
/* =========================== */
/* 响应式设计 */
/* =========================== */
@media (max-width: 768px) {
.whois-simple-layout {
padding: 20px 16px;
margin: 0 16px;
}
.whois-title {
font-size: 18px;
}
.title-decoration {
height: 20px;
margin-right: 8px;
}
.whois-meta {
flex-direction: column;
align-items: flex-start;
gap: 8px;
}
.whois-value-multiple {
gap: 4px;
}
.whois-dns-item {
font-size: 12px;
padding: 3px 6px;
}
.whois-label{
width: 85px;
}
.whois-value{
padding-left: 10px;
}
}
@media (max-width: 480px) {
.whois-simple-layout {
padding: 16px 12px;
margin: 0 8px;
}
.whois-title {
font-size: 16px;
}
.title-decoration {
width: 3px;
height: 18px;
}
}
/* 旧版响应式样式 - 保持兼容性 */
@media (max-width: 768px) {
.whois-info-grid {
grid-template-columns: 1fr;
}
.whois-domain-header {
flex-direction: column;
align-items: flex-start;
}
.whois-domain-name {
font-size: 20px;
}
.whois-info-item {
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.whois-info-value {
text-align: left;
}
.whois-dns-servers {
align-items: flex-start;
}
}

View File

@@ -61,8 +61,6 @@ export const TPL_CONFIRM_DELETE_MODAL = 'confirm-delete-modal-template' as const
// 域名注册协议
export const TPL_DOMAIN_AGREEMENT_MODAL = 'domain-agreement-modal-template' as const
// WHOIS查询
export const TPL_WHOIS_MODAL = 'whois-modal-template' as const
/** 模板常量字典,便于遍历或注入 */
export const TEMPLATES = {
@@ -92,5 +90,4 @@ export const TEMPLATES = {
TPL_ORDER_SUCCESS,
TPL_CONFIRM_DELETE_MODAL,
TPL_DOMAIN_AGREEMENT_MODAL,
TPL_WHOIS_MODAL,
} as const

View File

@@ -84,3 +84,21 @@ export interface DomainQueryCheckRequest {
/** 推荐类型(可选),用于筛选特定类型的推荐域名后缀 */
recommend_type?: number
}
export interface AiDomainQueryCheckRequest {
/** 品牌名称 */
brand?: string;
/** 所属行业 */
industry?: string
}
export interface AiDomainQueryCheckResponseData {
/** 数据 */
data: AiDatum[];
}
// 继承Datum基础上增加meaning字段
export interface AiDatum extends Datum {
/** 含义 */
meaning: string;
}