fix: 举报贴子失败
This commit is contained in:
parent
c847651a70
commit
d5f0b1c61a
|
|
@ -790,7 +790,7 @@ object MixedTiebaApiImpl : ITiebaApi {
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun checkReportPost(postId: String): Call<CheckReportBean> =
|
override fun checkReportPost(postId: String): Call<CheckReportBean> =
|
||||||
RetrofitTiebaApi.MINI_TIEBA_API.checkReport(
|
RetrofitTiebaApi.OFFICIAL_TIEBA_API.checkReport(
|
||||||
category = "1",
|
category = "1",
|
||||||
reportParam = mapOf(
|
reportParam = mapOf(
|
||||||
"pid" to postId
|
"pid" to postId
|
||||||
|
|
|
||||||
|
|
@ -470,4 +470,14 @@ interface OfficialTiebaApi {
|
||||||
@retrofit2.http.Header(Header.COOKIE) cookie: String = "ka=open;BAIDUID=${ClientUtils.baiduId}".takeIf { ClientUtils.baiduId != null }
|
@retrofit2.http.Header(Header.COOKIE) cookie: String = "ka=open;BAIDUID=${ClientUtils.baiduId}".takeIf { ClientUtils.baiduId != null }
|
||||||
?: "ka=open",
|
?: "ka=open",
|
||||||
): Flow<UploadPictureResultBean>
|
): Flow<UploadPictureResultBean>
|
||||||
|
|
||||||
|
@Headers("${Header.FORCE_LOGIN}: ${Header.FORCE_LOGIN_TRUE}")
|
||||||
|
@POST("/c/f/ueg/checkjubao")
|
||||||
|
@FormUrlEncoded
|
||||||
|
fun checkReport(
|
||||||
|
@Field("category") category: String,
|
||||||
|
@FieldMap reportParam: Map<String, String>,
|
||||||
|
@Field("stoken") stoken: String? = AccountUtil.getLoginInfo()
|
||||||
|
?.sToken
|
||||||
|
): Call<CheckReportBean>
|
||||||
}
|
}
|
||||||
|
|
@ -843,9 +843,13 @@ fun ThreadPage(
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
onReportClick = {
|
onReportClick = {
|
||||||
|
val firstPostId =
|
||||||
|
thread?.get { firstPostId }.takeIf { it != 0L }
|
||||||
|
?: firstPost?.get { id }
|
||||||
|
?: 0L
|
||||||
TiebaUtil.reportPost(
|
TiebaUtil.reportPost(
|
||||||
context,
|
context,
|
||||||
thread?.get { postId }.toString()
|
firstPostId.toString()
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue