hookehuyr

fix(检查): 移除不必要的subtask_id参数并更新子任务ID获取方式

移除getUploadTaskInfoAPI调用中多余的subtask_id参数,改为从API响应中获取子任务ID
...@@ -371,12 +371,12 @@ export function useCheckin() { ...@@ -371,12 +371,12 @@ export function useCheckin() {
371 const initEditData = async (taskOptions = []) => { 371 const initEditData = async (taskOptions = []) => {
372 if (route.query.status === 'edit') { 372 if (route.query.status === 'edit') {
373 try { 373 try {
374 - const { code, data } = await getUploadTaskInfoAPI({ i: route.query.post_id, subtask_id: route.query.subtask_id }) 374 + const { code, data } = await getUploadTaskInfoAPI({ i: route.query.post_id })
375 if (code) { 375 if (code) {
376 message.value = data.note || '' 376 message.value = data.note || ''
377 activeType.value = data.file_type || 'text' 377 activeType.value = data.file_type || 'text'
378 // 小作业ID 378 // 小作业ID
379 - subTaskId.value = route.query.subtask_id 379 + subTaskId.value = data.subtask_id
380 380
381 // 更新选中的任务显示 381 // 更新选中的任务显示
382 if (subTaskId.value) { 382 if (subTaskId.value) {
......
...@@ -475,7 +475,7 @@ const getTaskDetail = async (month) => { ...@@ -475,7 +475,7 @@ const getTaskDetail = async (month) => {
475 475
476 // 处理编辑模式下的类型合并 476 // 处理编辑模式下的类型合并
477 if (isEditMode.value && Array.isArray(data.attachment_type)) { 477 if (isEditMode.value && Array.isArray(data.attachment_type)) {
478 - const info = await getUploadTaskInfoAPI({ i: route.query.post_id, subtask_id: route.query.subtask_id }); 478 + const info = await getUploadTaskInfoAPI({ i: route.query.post_id });
479 if (info.code) { 479 if (info.code) {
480 data.attachment_type = [...new Set([...data.attachment_type, info.data.file_type])]; 480 data.attachment_type = [...new Set([...data.attachment_type, info.data.file_type])];
481 } 481 }
......