fix(chat): update unlock response contract

This commit is contained in:
2026-06-30 18:15:39 +08:00
parent bfc2c3cc1e
commit 5f94105bc6
7 changed files with 130 additions and 30 deletions
+32
View File
@@ -0,0 +1,32 @@
用途:解锁某一条历史里的付费/私密消息。
请求体:
{
"messageId": "消息ID"
}
需要带登录 token
Authorization: Bearer <token>
Content-Type: application/json
返回示例:
{
"code": 200,
"message": "success",
"success": true,
"data": {
"unlocked": true,
"content": "完整消息内容",
"reason": "ok",
"creditBalance": 9180,
"creditsCharged": 10,
"requiredCredits": 10,
"shortfallCredits": 0,
"lockDetail": {
"locked": false,
"showContent": true,
"showUpgrade": false,
"reason": null,
"hint": null,
"detail": null
}
}
}
如果积分不够,会返回 unlocked:false,并带 requiredCredits / shortfallCredits / creditBalance。