fix: pageList 接口改为 POST(服务端返回405 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>
|
||||
|
||||
/** 任务列表(按状态筛选) */
|
||||
@GET("watchTask/pageList")
|
||||
suspend fun getTaskList(@Query("status") status: Int): ApiResponse<List<TaskItem>>
|
||||
/** 任务列表(按状态筛选,服务端要求 POST) */
|
||||
@POST("watchTask/pageList")
|
||||
suspend fun getTaskList(@Body params: HashMap<String, Any>): ApiResponse<List<TaskItem>>
|
||||
|
||||
/** 任务详情 */
|
||||
@GET("watchTask/lookTaskDetail")
|
||||
|
||||
@@ -118,7 +118,8 @@ class TaskListFragment : BaseFragment<FragmentTaskListBinding>() {
|
||||
private fun fetchTasks() {
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
binding.swipeRefresh.isRefreshing = true
|
||||
val result = safeApiCall { taskApi.getTaskList(currentStatus) }
|
||||
val params = hashMapOf<String, Any>("status" to currentStatus)
|
||||
val result = safeApiCall { taskApi.getTaskList(params) }
|
||||
binding.swipeRefresh.isRefreshing = false
|
||||
|
||||
when (result) {
|
||||
|
||||
Reference in New Issue
Block a user