feat(circle): 添加酒友圈社交模块

- 新增酒友圈、圈子详情、发布动态、好友列表、活动创建等页面配置
- 添加酒友圈相关API接口,包括动态、评论、好友、活动等功能
- 实现模拟数据用于前端开发和测试
- 创建评论项、空状态、活动卡片、动态卡片、好友项等组件
- 编写酒友圈模块详细的接口文档,定义数据结构和业务规则
This commit is contained in:
cg
2026-07-20 22:53:04 +08:00
parent 9f5c69e1e5
commit fabbb167cf
18 changed files with 3992 additions and 18 deletions
+99
View File
@@ -0,0 +1,99 @@
<template>
<view class="friend-item" @click="$emit('tap', friend)">
<view class="friend-avatar-wrap">
<image v-if="friend.avatar" class="friend-avatar" :src="friend.avatar" mode="aspectFill"></image>
<view v-else class="friend-avatar friend-avatar-ph">
<text class="friend-avatar-text">{{ friend.nickname ? friend.nickname[0] : '酒' }}</text>
</view>
<view v-if="friend.online" class="friend-online"></view>
</view>
<view class="friend-info">
<text class="friend-name">{{ friend.nickname }}</text>
<text class="friend-last">{{ friend.lastDrink }} · {{ friend.lastDrinkTime }}</text>
</view>
<slot name="action"></slot>
</view>
</template>
<script>
export default {
name: 'FriendItem',
props: {
friend: { type: Object, default: () => ({}) }
}
}
</script>
<style lang="scss" scoped>
.friend-item {
display: flex;
align-items: center;
gap: $sp-md;
padding: $sp-lg;
background: $bg-card;
border-radius: $radius-lg;
border: 1rpx solid var(--border-faint, rgba(255,255,255,0.08));
margin-bottom: $sp-sm;
&:active {
background: $bg-card-alt;
}
}
.friend-avatar-wrap {
position: relative;
flex-shrink: 0;
}
.friend-avatar {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
}
.friend-avatar-ph {
background: linear-gradient(135deg, rgba(232,168,56,0.15), rgba(139,133,184,0.15));
display: flex;
align-items: center;
justify-content: center;
}
.friend-avatar-text {
font-size: $fs-lg;
font-weight: $fw-bold;
color: $amber;
}
.friend-online {
position: absolute;
bottom: 4rpx;
right: 4rpx;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background: $mint;
border: 3rpx solid $bg-card;
}
.friend-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 6rpx;
}
.friend-name {
font-size: $fs-base;
font-weight: $fw-bold;
color: $text-primary;
}
.friend-last {
font-size: $fs-xs;
color: $text-tertiary;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>