hookehuyr

fix: 修复多类型附件提交时的错误提示信息

更新错误提示信息,使其更清晰地指导用户操作,并移除调试用的console.warn语句
...@@ -482,9 +482,8 @@ export function useCheckin() { ...@@ -482,9 +482,8 @@ export function useCheckin() {
482 } else if (files.length > 0) { 482 } else if (files.length > 0) {
483 const types = new Set(files.map(f => f.file_type).filter(Boolean)) 483 const types = new Set(files.map(f => f.file_type).filter(Boolean))
484 const hasMixedTypes = types.size > 1 484 const hasMixedTypes = types.size > 1
485 - console.warn(multiAttachmentEnabled.value);
486 if (hasMixedTypes && !multiAttachmentEnabled.value) { 485 if (hasMixedTypes && !multiAttachmentEnabled.value) {
487 - showToast('当前接口暂不支持多类型附件,请分别提交') 486 + showToast('当前接口暂不支持多类型附件,请删除其他类型附件之后再提交')
488 return 487 return
489 } 488 }
490 489
...@@ -532,7 +531,7 @@ export function useCheckin() { ...@@ -532,7 +531,7 @@ export function useCheckin() {
532 531
533 if (hasMixedTypes) { 532 if (hasMixedTypes) {
534 if (!multiAttachmentEnabled.value) { 533 if (!multiAttachmentEnabled.value) {
535 - showToast('当前接口暂不支持多类型附件,请分别提交') 534 + showToast('当前接口暂不支持多类型附件,请删除其他类型附件之后再提交')
536 return 535 return
537 } 536 }
538 showToast(result?.msg || '提交失败,请重试') 537 showToast(result?.msg || '提交失败,请重试')
...@@ -717,6 +716,7 @@ export function useCheckin() { ...@@ -717,6 +716,7 @@ export function useCheckin() {
717 } 716 }
718 717
719 return { 718 return {
719 + multiAttachmentEnabled,
720 uploading, 720 uploading,
721 loading, 721 loading,
722 message, 722 message,
......
1 <!-- 1 <!--
2 * @Date: 2025-09-30 17:05 2 * @Date: 2025-09-30 17:05
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2026-01-24 15:32:45 4 + * @LastEditTime: 2026-01-24 16:39:39
5 * @FilePath: /mlaj/src/views/checkin/CheckinDetailPage.vue 5 * @FilePath: /mlaj/src/views/checkin/CheckinDetailPage.vue
6 * @Description: 用户打卡详情页 6 * @Description: 用户打卡详情页
7 --> 7 -->
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
89 }]"> 89 }]">
90 <van-icon :name="getIconName(option.key)" size="1.2rem" /> 90 <van-icon :name="getIconName(option.key)" size="1.2rem" />
91 <span class="tab-text">{{ option.value }}</span> 91 <span class="tab-text">{{ option.value }}</span>
92 + <!-- <div v-if="multiAttachmentEnabled && getTypeCount(option.key) > 0" class="absolute -top-2 -right-2 bg-red-500 text-white text-[10px] rounded-full min-w-[16px] h-[16px] flex items-center justify-center px-1"> -->
92 <div v-if="getTypeCount(option.key) > 0" class="absolute -top-2 -right-2 bg-red-500 text-white text-[10px] rounded-full min-w-[16px] h-[16px] flex items-center justify-center px-1"> 93 <div v-if="getTypeCount(option.key) > 0" class="absolute -top-2 -right-2 bg-red-500 text-white text-[10px] rounded-full min-w-[16px] h-[16px] flex items-center justify-center px-1">
93 {{ getTypeCount(option.key) }} 94 {{ getTypeCount(option.key) }}
94 </div> 95 </div>
...@@ -205,6 +206,7 @@ const { ...@@ -205,6 +206,7 @@ const {
205 message, 206 message,
206 fileList, 207 fileList,
207 activeType, 208 activeType,
209 + multiAttachmentEnabled,
208 subTaskId, 210 subTaskId,
209 selectedTaskText, 211 selectedTaskText,
210 selectedTaskValue, 212 selectedTaskValue,
......