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
2025-12-11 13:48:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b464aaaeed0a0525daa66f827b10b5ae080eb356
b464aaae
1 parent
7ffe682f
fix(打卡): 统一使用task_type参数替代type参数
修复打卡功能中参数命名不一致问题,将原type参数统一改为task_type,确保前后端参数命名一致
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
src/views/checkin/CheckinDetailPage.vue
src/views/checkin/IndexCheckInPage.vue
src/views/checkin/CheckinDetailPage.vue
View file @
b464aaa
...
...
@@ -28,7 +28,7 @@
</van-popup>
</div>
<!-- 计数对象 -->
<div v-if="
checkin
Type === 'count'" class="mb-4">
<div v-if="
task
Type === 'count'" class="mb-4">
<div class="flex justify-between items-center mb-2 mx-2">
<div class="text-sm font-bold text-gray-700">{{ dynamicFieldText }}对象</div>
<van-button size="small" type="primary" plain icon="plus"
...
...
@@ -60,7 +60,7 @@
</div>
<!-- 计数次数 -->
<div v-if="
checkin
Type === 'count'"
<div v-if="
task
Type === 'count'"
class="mb-4 flex items-center justify-between bg-gray-50 p-3 rounded-lg">
<div class="text-sm font-bold text-gray-700">{{ dynamicFieldText }}次数</div>
<van-stepper v-model="countValue" min="1" integer input-width="80px" button-size="28px" />
...
...
@@ -82,8 +82,8 @@
<!-- 文本输入区域 -->
<div class="text-input-area">
<van-field v-model="message" rows="6" autosize type="textarea"
:placeholder="
checkin
Type === 'count' ? '请输入留言(可选)' : (activeType === 'text' ? '请输入留言,至少需要10个字符' : '请输入留言(可选)')"
:maxlength="activeType === 'text' &&
checkin
Type !== 'count' ? 500 : 200" show-word-limit />
:placeholder="
task
Type === 'count' ? '请输入留言(可选)' : (activeType === 'text' ? '请输入留言,至少需要10个字符' : '请输入留言(可选)')"
:maxlength="activeType === 'text' &&
task
Type !== 'count' ? 500 : 200" show-word-limit />
</div>
<!-- 类型选项卡 -->
...
...
@@ -227,7 +227,7 @@ const dynamicFieldText = ref('感恩')
const taskDetail = ref({})
// 打卡类型
const
checkinType = computed(() => route.query.
type)
const
taskType = computed(() => route.query.task_
type)
// 作业选择相关
const showTaskPicker = ref(false)
...
...
@@ -323,7 +323,7 @@ const handleSubmit = async () => {
}
// 2. 计数打卡特定校验
if (
checkin
Type.value === 'count') {
if (
task
Type.value === 'count') {
if (selectedTargets.value.length === 0) {
showToast(`请选择${dynamicFieldText.value}对象`)
return
...
...
@@ -469,7 +469,7 @@ const getTaskDetail = async (month) => {
}
// 设置默认选中类型(非计数打卡模式下)
if (
checkin
Type.value !== 'count' && attachmentTypeOptions.value.length > 0 && !activeType.value) {
if (
task
Type.value !== 'count' && attachmentTypeOptions.value.length > 0 && !activeType.value) {
activeType.value = attachmentTypeOptions.value[0].key
}
}
...
...
src/views/checkin/IndexCheckInPage.vue
View file @
b464aaa
<!--
* @Date: 2025-05-29 15:34:17
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-12-11 13:
32:4
1
* @LastEditTime: 2025-12-11 13:
46:2
1
* @FilePath: /mlaj/src/views/checkin/IndexCheckInPage.vue
* @Description: 文件描述
-->
...
...
@@ -600,7 +600,7 @@ const goToCheckinDetailPage = () => {
id: route.query.id,
date: current_date,
is_patch: isPatchCheckin.value ? '1' : '0',
type: taskDetail.value.task_type,
t
ask_t
ype: taskDetail.value.task_type,
// type: 'count',
}
})
...
...
@@ -670,6 +670,7 @@ const editCheckin = (post) => {
query: {
post_id: post.id,
type: post.file_type,
task_type: taskDetail.value.task_type,
status: 'edit',
}
})
...
...
Please
register
or
login
to post a comment