fix: 任务列表改用 queryTaskIds 接口(旧版实际使用的接口)
pageList 返回空body,改为 queryTaskIds GET 请求 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,9 +23,9 @@ interface TaskApi {
|
||||
@GET("watchTask/myCurrentAttendance")
|
||||
suspend fun getAttendance(): ApiResponse<AttendanceInfo>
|
||||
|
||||
/** 任务列表(按状态筛选,服务端要求 POST) */
|
||||
@POST("watchTask/pageList")
|
||||
suspend fun getTaskList(@Body params: HashMap<String, Any>): ApiResponse<List<TaskItem>>
|
||||
/** 获取任务ID列表(按状态筛选,旧版 queryTaskIds) */
|
||||
@GET("watchTask/queryTaskIds")
|
||||
suspend fun getTaskIds(@Query("status") status: Int): ApiResponse<List<TaskItem>>
|
||||
|
||||
/** 任务详情 */
|
||||
@GET("watchTask/lookTaskDetail")
|
||||
|
||||
@@ -118,8 +118,7 @@ class TaskListFragment : BaseFragment<FragmentTaskListBinding>() {
|
||||
private fun fetchTasks() {
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
binding.swipeRefresh.isRefreshing = true
|
||||
val params = hashMapOf<String, Any>("status" to currentStatus)
|
||||
val result = safeApiCall { taskApi.getTaskList(params) }
|
||||
val result = safeApiCall { taskApi.getTaskIds(currentStatus) }
|
||||
binding.swipeRefresh.isRefreshing = false
|
||||
|
||||
when (result) {
|
||||
|
||||
Reference in New Issue
Block a user