diff --git a/frontend/src/views/admin/ChannelsView.vue b/frontend/src/views/admin/ChannelsView.vue index fe69f050..19420f53 100644 --- a/frontend/src/views/admin/ChannelsView.vue +++ b/frontend/src/views/admin/ChannelsView.vue @@ -234,70 +234,25 @@
-
- -
- -
- -
-
-
- -
- {{ t('admin.channels.form.noPlatforms', '点击"添加平台"开始配置渠道') }} -
- - -
-
{{ t('admin.channels.form.platformConfig', '平台配置') }} +
+
+ + + {{ t('admin.groups.platforms.' + p, p) }} +
@@ -544,7 +499,6 @@ const editingChannel = ref(null) const submitting = ref(false) const showDeleteDialog = ref(false) const deletingChannel = ref(null) -const showPlatformMenu = ref(false) const activeTab = ref('basic') // Groups @@ -597,10 +551,6 @@ function formatDate(value: string): string { // ── Platform section helpers ── const activePlatforms = computed(() => form.platforms.map(s => s.platform)) -const availablePlatformsToAdd = computed(() => - platformOrder.filter(p => !activePlatforms.value.includes(p)) -) - function addPlatformSection(platform: GroupPlatform) { form.platforms.push({ platform, @@ -609,8 +559,15 @@ function addPlatformSection(platform: GroupPlatform) { model_mapping: {}, model_pricing: [] }) - showPlatformMenu.value = false - activeTab.value = platform +} + +function togglePlatform(platform: GroupPlatform) { + const idx = form.platforms.findIndex(s => s.platform === platform) + if (idx >= 0) { + removePlatformSection(idx) + } else { + addPlatformSection(platform) + } } function removePlatformSection(idx: number) { @@ -873,7 +830,6 @@ function resetForm() { form.restrict_models = false form.billing_model_source = 'requested' form.platforms = [] - showPlatformMenu.value = false activeTab.value = 'basic' }