feat(sdk): 升级HaveADrink SDK并集成邀请系统
- 将HaveADrink依赖从1.0.8升级至1.0.12版本 - 集成邀请码功能,新增common/invite.js处理邀请链路 - 实现发送好友请求返回邀请码的新流程 - 添加删除动态功能,新增DeleteFeed接口 - 集成UniAppWebSocket适配器,重构WebSocket连接管理 - 优化好友请求支持关键词搜索功能 - 在FeedCard组件中添加删除按钮和分享按钮 - 更新SDK类型定义文件以匹配新接口规范
This commit is contained in:
+35
-4
@@ -53,8 +53,13 @@
|
||||
<text class="feed-action-icon">💬</text>
|
||||
<text class="feed-action-num">{{ feed.comments || '' }}</text>
|
||||
</view>
|
||||
<view class="feed-action" @click.stop="$emit('share', feed)">
|
||||
<text class="feed-action-icon">↗</text>
|
||||
<button class="feed-action share-btn" open-type="share" @click.stop="$emit('share', feed)">
|
||||
<text class="feed-action-icon">📤</text>
|
||||
</button>
|
||||
<!-- 删除:仅自己的动态显示 -->
|
||||
<view v-if="canDelete" class="feed-action feed-delete" @click.stop="$emit('delete', feed)">
|
||||
<text class="feed-action-icon">🗑️</text>
|
||||
<text class="feed-delete-text">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -66,9 +71,11 @@ import { getCatIcon, isIconPath } from '../common/utils'
|
||||
export default {
|
||||
name: 'FeedCard',
|
||||
props: {
|
||||
feed: { type: Object, default: () => ({}) }
|
||||
feed: { type: Object, default: () => ({}) },
|
||||
// 是否允许删除(仅自己的动态传 true)
|
||||
canDelete: { type: Boolean, default: false }
|
||||
},
|
||||
emits: ['item-click', 'like', 'comment', 'share'],
|
||||
emits: ['item-click', 'like', 'comment', 'share', 'delete'],
|
||||
methods: {
|
||||
getCatIcon,
|
||||
isIconPath,
|
||||
@@ -228,6 +235,16 @@ export default {
|
||||
border-top: 1rpx solid var(--divider-color, rgba(255,255,255,0.08));
|
||||
}
|
||||
|
||||
/* 删除按钮靠右 */
|
||||
.feed-delete {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.feed-delete-text {
|
||||
font-size: $fs-sm;
|
||||
color: $text-tertiary;
|
||||
}
|
||||
|
||||
.feed-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -251,4 +268,18 @@ export default {
|
||||
font-size: $fs-sm;
|
||||
color: $text-tertiary;
|
||||
}
|
||||
|
||||
/* 分享按钮:重置 button 默认样式,保持与其他操作项视觉一致 */
|
||||
.feed-action.share-btn {
|
||||
margin: 0;
|
||||
padding: 8rpx 0;
|
||||
background: transparent;
|
||||
line-height: 1;
|
||||
border-radius: 0;
|
||||
font-size: inherit;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user