Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2026-01-24 16:39:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
846516194a23f4e8fbc03045321d6e2483024525
84651619
1 parent
4e2b130c
fix: 修复多类型附件提交时的错误提示信息
更新错误提示信息,使其更清晰地指导用户操作,并移除调试用的console.warn语句
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
src/composables/useCheckin.js
src/views/checkin/CheckinDetailPage.vue
src/composables/useCheckin.js
View file @
8465161
...
...
@@ -482,9 +482,8 @@ export function useCheckin() {
}
else
if
(
files
.
length
>
0
)
{
const
types
=
new
Set
(
files
.
map
(
f
=>
f
.
file_type
).
filter
(
Boolean
))
const
hasMixedTypes
=
types
.
size
>
1
console
.
warn
(
multiAttachmentEnabled
.
value
);
if
(
hasMixedTypes
&&
!
multiAttachmentEnabled
.
value
)
{
showToast
(
'当前接口暂不支持多类型附件,请
分别
提交'
)
showToast
(
'当前接口暂不支持多类型附件,请
删除其他类型附件之后再
提交'
)
return
}
...
...
@@ -532,7 +531,7 @@ export function useCheckin() {
if
(
hasMixedTypes
)
{
if
(
!
multiAttachmentEnabled
.
value
)
{
showToast
(
'当前接口暂不支持多类型附件,请
分别
提交'
)
showToast
(
'当前接口暂不支持多类型附件,请
删除其他类型附件之后再
提交'
)
return
}
showToast
(
result
?.
msg
||
'提交失败,请重试'
)
...
...
@@ -717,6 +716,7 @@ export function useCheckin() {
}
return
{
multiAttachmentEnabled
,
uploading
,
loading
,
message
,
...
...
src/views/checkin/CheckinDetailPage.vue
View file @
8465161
<!--
* @Date: 2025-09-30 17:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-24 1
5:32:45
* @LastEditTime: 2026-01-24 1
6:39:39
* @FilePath: /mlaj/src/views/checkin/CheckinDetailPage.vue
* @Description: 用户打卡详情页
-->
...
...
@@ -89,6 +89,7 @@
}]">
<van-icon :name="getIconName(option.key)" size="1.2rem" />
<span class="tab-text">{{ option.value }}</span>
<!-- <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"> -->
<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">
{{ getTypeCount(option.key) }}
</div>
...
...
@@ -205,6 +206,7 @@ const {
message,
fileList,
activeType,
multiAttachmentEnabled,
subTaskId,
selectedTaskText,
selectedTaskValue,
...
...
Please
register
or
login
to post a comment