feat(sdk): 升级HaveADrink SDK并集成邀请系统
- 将HaveADrink依赖从1.0.8升级至1.0.12版本 - 集成邀请码功能,新增common/invite.js处理邀请链路 - 实现发送好友请求返回邀请码的新流程 - 添加删除动态功能,新增DeleteFeed接口 - 集成UniAppWebSocket适配器,重构WebSocket连接管理 - 优化好友请求支持关键词搜索功能 - 在FeedCard组件中添加删除按钮和分享按钮 - 更新SDK类型定义文件以匹配新接口规范
This commit is contained in:
+99
-2
@@ -14,7 +14,7 @@
|
||||
* 6. 社交模块 - 朋友圈动态、点赞
|
||||
|
||||
|
||||
**版本:** v1.0.8
|
||||
**版本:** v1.0.12
|
||||
|
||||
## 安装
|
||||
|
||||
@@ -100,6 +100,7 @@ client.WechatLogin(req).then(...).catch(...)
|
||||
### 获取微信手机号
|
||||
|
||||
|
||||
**已废弃:** 未使用
|
||||
|
||||
<font color="green">POST</font> `/api/have_a_drink/v1/auth/wechat/get_phone_number`
|
||||
|
||||
@@ -222,6 +223,7 @@ client.GetAchievements(req).then(...).catch(...)
|
||||
### 获取朋友圈动态
|
||||
|
||||
|
||||
**已废弃:** 不使用,待移除
|
||||
|
||||
<font color="green">GET</font> `/api/have_a_drink/v1/communication/feed`
|
||||
|
||||
@@ -1236,6 +1238,33 @@ const req = new PublishFeedReq()
|
||||
client.PublishFeed(req).then(...).catch(...)
|
||||
```
|
||||
|
||||
### 删除动态
|
||||
|
||||
|
||||
|
||||
<font color="green">DELETE</font> `/api/have_a_drink/v1/moments/feeds`
|
||||
|
||||
#### 请求参数
|
||||
|名称|类型|校验规则|说明|
|
||||
|:-|:-|:-|:-|
|
||||
|id|`string\|number`|required| 动态ID|
|
||||
|
||||
|
||||
|
||||
|
||||
#### 返回值
|
||||
|名称|类型|说明|
|
||||
|:-|:-:|:-|
|
||||
|ok|`boolean`| 是否成功<br>|
|
||||
|
||||
|
||||
|
||||
|
||||
```javascript
|
||||
const req = new DeleteFeedReq()
|
||||
client.DeleteFeed(req).then(...).catch(...)
|
||||
```
|
||||
|
||||
### 点赞
|
||||
|
||||
|
||||
@@ -1408,6 +1437,7 @@ client.GetFriends(req).then(...).catch(...)
|
||||
#### 请求参数
|
||||
|名称|类型|校验规则|说明|
|
||||
|:-|:-|:-|:-|
|
||||
|keyword|`string`|| 搜索关键词|
|
||||
|
||||
|
||||
|
||||
@@ -1445,7 +1475,6 @@ client.GetFriendRequests(req).then(...).catch(...)
|
||||
#### 请求参数
|
||||
|名称|类型|校验规则|说明|
|
||||
|:-|:-|:-|:-|
|
||||
|userId|`string\|number`|| 酒友ID|
|
||||
|message|`string`|| 消息|
|
||||
|
||||
|
||||
@@ -1454,6 +1483,7 @@ client.GetFriendRequests(req).then(...).catch(...)
|
||||
#### 返回值
|
||||
|名称|类型|说明|
|
||||
|:-|:-:|:-|
|
||||
|inviteCode|`string\|number`| 好友请求ID<br>|
|
||||
|
||||
|
||||
|
||||
@@ -1687,6 +1717,73 @@ const req = new CreateEventReq()
|
||||
client.CreateEvent(req).then(...).catch(...)
|
||||
```
|
||||
|
||||
### 修改酒局
|
||||
|
||||
|
||||
|
||||
<font color="green">POST</font> `/api/have_a_drink/v1/events/events/update`
|
||||
|
||||
#### 请求参数
|
||||
|名称|类型|校验规则|说明|
|
||||
|:-|:-|:-|:-|
|
||||
|id|`string\|number`|required| 酒局ID|
|
||||
|title|`string`|| 酒局标题|
|
||||
|time|`string`|| 酒局时间|
|
||||
|location|`string`|| 酒局地点|
|
||||
|maxPeople|`number`|| 最大人数|
|
||||
|geo|`GeoPoint`|| 坐标信息|
|
||||
|note|`string`|| 酒局备注|
|
||||
|
||||
|
||||
|
||||
**GeoPoint**
|
||||
|名称|类型|校验规则|说明|
|
||||
|:-|:-|:-|:-|
|
||||
|latitude|`number`|| 纬度|
|
||||
|longitude|`number`|| 经度|
|
||||
|
||||
|
||||
|
||||
#### 返回值
|
||||
|名称|类型|说明|
|
||||
|:-|:-:|:-|
|
||||
|ok|`boolean`| 是否成功<br>|
|
||||
|
||||
|
||||
|
||||
|
||||
```javascript
|
||||
const req = new UpdateEventReq()
|
||||
client.UpdateEvent(req).then(...).catch(...)
|
||||
```
|
||||
|
||||
### 删除酒局
|
||||
|
||||
|
||||
|
||||
<font color="green">POST</font> `/api/have_a_drink/v1/events/events/delete`
|
||||
|
||||
#### 请求参数
|
||||
|名称|类型|校验规则|说明|
|
||||
|:-|:-|:-|:-|
|
||||
|id|`string\|number`|required| 酒局ID|
|
||||
|
||||
|
||||
|
||||
|
||||
#### 返回值
|
||||
|名称|类型|说明|
|
||||
|:-|:-:|:-|
|
||||
|ok|`boolean`| 是否成功<br>|
|
||||
|
||||
|
||||
|
||||
|
||||
```javascript
|
||||
const req = new DeleteEventReq()
|
||||
client.DeleteEvent(req).then(...).catch(...)
|
||||
```
|
||||
|
||||
### 报名酒局
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user