Explorar o código

fix #6152: 发布要求按平台分别展示,避免混淆

- 将发布平台的提示文案从混合显示改为按平台分别展示
- 修复了无法看出是哪个平台的要求的问题
- 示例:抖音:标题必填、视频必填;小红书:标题必填、正文必填、图片或视频必填
ethanfly hai 4 días
pai
achega
6f2f526e5d
Modificáronse 1 ficheiros con 11 adicións e 8 borrados
  1. 11 8
      client/src/views/Publish/index.vue

+ 11 - 8
client/src/views/Publish/index.vue

@@ -541,17 +541,20 @@ const createDescMaxLength = computed(() => {
   return max;
 });
 
-// 平台提示文案
+// 平台提示文案 - Bug #6152: 每个平台单独展示其要求,避免看不出是哪个平台的要求
 const createPlatformHint = computed(() => {
   const platforms = createSelectedPlatforms.value;
   if (!platforms.length) return '';
-  const names = platforms.map(p => PLATFORMS[p]?.name || p).join('、');
-  const tips: string[] = [];
-  if (createRequireTitle.value) tips.push('标题必填');
-  if (createRequireDescription.value) tips.push('正文必填');
-  if (createRequireVideo.value) tips.push('视频必填');
-  if (createRequireImage.value) tips.push('图片或视频必填');
-  return `已选平台:${names}。要求:${tips.join('、')}`;
+  
+  return platforms.map(p => {
+    const name = PLATFORMS[p]?.name || p;
+    const tips: string[] = [];
+    if (PLATFORM_PUBLISH_REQUIREMENTS[p]?.requireTitle) tips.push('标题必填');
+    if (PLATFORM_PUBLISH_REQUIREMENTS[p]?.requireDescription) tips.push('正文必填');
+    if (PLATFORM_PUBLISH_REQUIREMENTS[p]?.requireVideo) tips.push('视频必填');
+    if (PLATFORM_PUBLISH_REQUIREMENTS[p]?.requireImage) tips.push('图片或视频必填');
+    return tips.length > 0 ? `${name}:${tips.join('、')}` : `${name}`;
+  }).join(';');
 });
 
 const pagination = reactive({