docs(external-entry): add promotion links

This commit is contained in:
2026-07-14 19:04:42 +08:00
parent 84e677f687
commit 52bbc363cf
2 changed files with 35 additions and 9 deletions
+27
View File
@@ -0,0 +1,27 @@
# 外部入口链接清单
以下链接可以直接点击打开,用于验证普通聊天和促销模式。
## 测试环境
APP HOST`frontend-test.banlv-ai.com`
| 模式 | `mode` | `promotion_type` | 链接 |
| --- | --- | --- | --- |
| 普通聊天 | 不传 | 不传 | [打开普通聊天](https://frontend-test.banlv-ai.com/external-entry?target=chat) |
| 语音促销 | `promotion` | `voice` | [打开语音促销](https://frontend-test.banlv-ai.com/external-entry?target=chat&mode=promotion&promotion_type=voice) |
| 图片促销 | `promotion` | `image` | [打开图片促销](https://frontend-test.banlv-ai.com/external-entry?target=chat&mode=promotion&promotion_type=image) |
| 私密文本促销 | `promotion` | `private` | [打开私密文本促销](https://frontend-test.banlv-ai.com/external-entry?target=chat&mode=promotion&promotion_type=private) |
## 正式环境
APP HOST`cozsweet.com`
| 模式 | `mode` | `promotion_type` | 链接 |
| --- | --- | --- | --- |
| 普通聊天 | 不传 | 不传 | [打开普通聊天](https://cozsweet.com/external-entry?target=chat) |
| 语音促销 | `promotion` | `voice` | [打开语音促销](https://cozsweet.com/external-entry?target=chat&mode=promotion&promotion_type=voice) |
| 图片促销 | `promotion` | `image` | [打开图片促销](https://cozsweet.com/external-entry?target=chat&mode=promotion&promotion_type=image) |
| 私密文本促销 | `promotion` | `private` | [打开私密文本促销](https://cozsweet.com/external-entry?target=chat&mode=promotion&promotion_type=private) |
如需传递 Facebook 身份信息,可在任一链接末尾追加 `&asid=<ASID>&psid=<PSID>`。ASID 和 PSID 均为可选参数。
+8 -9
View File
@@ -1,10 +1,13 @@
# 外部应用入口
外部应用统一通过以下地址进入本应用
外部应用统一通过 `/external-entry` 进入本应用。当前 APP HOST
```text
https://<APP_HOST>/external-entry
```
| 环境 | APP HOST |
| --- | --- |
| 测试环境 | `frontend-test.banlv-ai.com` |
| 正式环境 | `cozsweet.com` |
普通模式和促销模式的可点击链接统一维护在 [外部入口链接清单](./external-entry-links.md)。
入口会先保存传入的身份数据,再使用 `replace` 跳转到目标页面。身份参数和入口控制参数会从地址栏中移除;目标页面自身需要的状态参数会保留,例如打赏页的 `coffee_type`
@@ -75,11 +78,7 @@ https://<APP_HOST>/external-entry?target=tip&coffee_type=large
## 促销入口
促销模式只在 `target=chat` 时生效,并且 `mode``promotion_type` 必须同时有效
```text
https://<APP_HOST>/external-entry?target=chat&mode=promotion&promotion_type=voice&asid=<ASID>&psid=<PSID>
```
促销模式只在 `target=chat` 时生效,并且 `mode``promotion_type` 必须同时有效。所有有效组合及其测试、正式环境链接见 [外部入口链接清单](./external-entry-links.md)。
进入聊天后,正常历史仍会加载,列表底部会额外展示一条对应类型的锁定促销消息。消息首次解锁使用前端生成的 `clientLockId`,真实内容、积分价格和后端 `messageId` 均由 `/api/chat/unlock-private` 返回。