diff --git a/dashboard/src2/pages/NewJsiteDomain.vue b/dashboard/src2/pages/NewJsiteDomain.vue
index f6d05c0..26c69d6 100644
--- a/dashboard/src2/pages/NewJsiteDomain.vue
+++ b/dashboard/src2/pages/NewJsiteDomain.vue
@@ -34,10 +34,22 @@
class="flex-1 border rounded px-3 py-2"
@keyup.enter="checkDomain"
/>
+
+
选择域名后缀
-
-
-
-
-
+
+
+
+
+
@@ -85,26 +97,26 @@
-
-
-
+
@@ -359,9 +371,9 @@ export default {
// 域名后缀相关
suffixSearch: '',
suffixSort: 'default',
- selectedCategory: 'all',
+ selectedCategory: 'popular',
+ showSuffixSelector: false,
suffixCategories: [
- { key: 'all', label: '全部域名' },
{ key: 'popular', label: '热门域名' },
{ key: 'gtd', label: '通用顶级域名' },
{ key: 'ntd', label: '新顶级域名' },
@@ -371,7 +383,8 @@ export default {
{ key: 'business', label: '商业域名' },
{ key: 'tech', label: '科技域名' },
{ key: 'creative', label: '创意域名' },
- { key: 'lifestyle', label: '生活域名' }
+ { key: 'lifestyle', label: '生活域名' },
+ { key: 'all', label: '全部域名' }
],
allSuffixes: [
// 通用顶级域名 (gtd)
@@ -886,8 +899,13 @@ export default {
};
},
},
+ mounted() {
+ // 添加点击外部关闭域名后缀选择区块的功能
+ document.addEventListener('click', this.handleClickOutside);
+ },
beforeUnmount() {
this.stopPaymentCheck();
+ document.removeEventListener('click', this.handleClickOutside);
},
methods: {
async checkDomain() {
@@ -981,7 +999,22 @@ export default {
getTotalAmount() {
const yearlyPrice = this.domainPrice || 0;
return (yearlyPrice * this.period).toFixed(2);
- }
+ },
+ selectSuffix(suffix) {
+ this.selectedSuffix = suffix;
+ this.showSuffixSelector = false;
+ },
+ handleClickOutside(event) {
+ const suffixButton = event.target.closest('button');
+ const suffixSelector = event.target.closest('.border.rounded-lg.p-4.bg-gray-50');
+
+ if (!suffixButton || !suffixButton.classList.contains('suffix-selector-btn')) {
+ if (!suffixSelector) {
+ this.showSuffixSelector = false;
+ }
+ }
+ },
+
},
};
@@ -1125,6 +1158,8 @@ export default {
}
}
+
+
/* 响应式设计 */
@media (max-width: 640px) {
.domain-suffix-grid {