hookehuyr

fix(打卡): 修复选择打卡类型时的逻辑错误

将设置选中打卡类型的逻辑移到else块中,避免在提交后重复设置
......@@ -106,8 +106,9 @@ const handleCheckInSelect = (type) => {
id: type.id
}
})
}
} else {
selectedCheckIn.value = type;
}
}
const handleCheckInSubmit = async () => {
......
<!--
* @Date: 2025-03-20 19:55:21
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-06-11 17:10:09
* @LastEditTime: 2025-06-13 16:26:25
* @FilePath: /mlaj/src/views/HomePage.vue
* @Description: 美乐爱觉教育首页组件
*
......@@ -693,9 +693,10 @@ const handleCheckInSelect = (checkInType) => {
id: checkInType.id,
},
})
}
} else {
selectedCheckIn.value = checkInType // 更新选中的打卡类型
checkInContent.value = '' // 清空打卡内容
}
}
// 打卡功能:处理打卡提交
......
......@@ -394,8 +394,9 @@ const handleCheckInSelect = (type) => {
});
showCheckInDialog.value = false;
return;
}
} else {
selectedCheckIn.value = type;
}
};
// 处理打卡提交
......
......@@ -982,8 +982,9 @@ const handleCheckInSelect = (type) => {
});
showCheckInDialog.value = false;
return;
}
} else {
selectedCheckIn.value = type;
}
};
// 处理打卡提交
......