feat: redesign community tab page

This commit is contained in:
hajimi
2026-08-02 00:42:11 +08:00
parent 07a366cf3a
commit 0b46d497ae
8 changed files with 988 additions and 1383 deletions
@@ -1,116 +1,96 @@
<template>
<view class="post-card" @tap="$emit('tap')">
<image class="post-card__avatar" :src="post.user?.avatar || '/static/images/avatar.png'" mode="aspectFill"
@tap.stop="$emit('avatar-tap', post.user_id)" />
<view class="post-card__body">
<view class="post-card__main">
<!-- 头部昵称·时间 + 标签 -->
<view class="post-card__header">
<view class="post-card__user">
<text class="post-card__nickname">{{ post.user?.nickname || '匿名用户' }}</text>
<text class="post-card__dot">·</text>
<text class="post-card__time">{{ formatTime(post.create_time) }}</text>
</view>
<view class="post-card__badges">
<view v-if="post.is_paid" class="post-card__badge post-card__badge--paid">
<text>{{ post.price_points }}积分</text>
</view>
<view v-if="post.is_hot" class="post-card__badge post-card__badge--hot">
<text>热门</text>
</view>
<view v-if="post.is_top" class="post-card__badge post-card__badge--top">
<text>置顶</text>
</view>
</view>
</view>
<view v-if="post.is_paid && !post.is_unlocked" class="post-card__paid-notice">
<u-icon name="lock" size="25" color="#1468f5" />
<text>付费内容 · {{ post.price_points }} 积分</text>
</view>
<!-- 正文内容 -->
<view class="post-card__content">
<text class="post-card__text"
:class="{ 'post-card__text--locked': post.is_paid && !post.is_unlocked }">{{ post.content_short
|| post.content }}</text>
</view>
<view v-if="displayTranslatedText" class="post-card__translate">
<text class="post-card__translate-text">{{ displayTranslatedText }}</text>
</view>
<!-- 付费解锁 -->
<view v-if="post.is_paid && !post.is_unlocked" class="post-card__unlock" @tap.stop="$emit('unlock')">
<text class="post-card__unlock-text">{{ post.price_points }}积分解锁全文</text>
<view class="post-card__unlock-btn">
<text>解锁</text>
</view>
</view>
<!-- 图片 -->
<view v-if="
post.images &&
post.images.length > 0 &&
!(post.is_paid && !post.is_unlocked)
" class="post-card__images" :class="{ 'post-card__images--full': isLotteryPost }">
<template v-if="isLotteryPost">
<image v-for="(img, idx) in post.images" :key="idx" class="post-card__img post-card__img--full"
:src="img" mode="widthFix" @tap.stop="previewImage(idx)" />
</template>
<template v-else-if="trumpSourceUrl">
<view class="post-card__external-cover" @tap.stop="openSourceUrl">
<view class="post-card__external-cover-icon">
<text>T</text>
</view>
<view class="post-card__external-cover-body">
<text class="post-card__external-cover-title">Truth Social 图片暂不可直连</text>
<text class="post-card__external-cover-desc">点击查看原帖</text>
</view>
<view class="post-card__external-cover-btn">
<text>查看原帖</text>
</view>
</view>
</template>
<template v-else>
<image v-for="(img, idx) in post.images.slice(0, 3)" :key="idx" class="post-card__img"
:src="img" mode="aspectFill" @tap.stop="previewImage(idx)" />
<view v-if="post.images.length > 3" class="post-card__img-more" @tap.stop="previewImage(3)">
<text>+{{ post.images.length - 3 }}</text>
</view>
</template>
</view>
<!-- 话题标签 -->
<view v-if="post.tags && post.tags.length > 0" class="post-card__tags">
<view v-for="(t, i) in post.tags" :key="i" class="post-card__tag">
<text>#{{ t }}</text>
</view>
<view class="post-card__header">
<image class="post-card__avatar" :src="post.user?.avatar || '/static/images/avatar.png'" mode="aspectFill"
@tap.stop="$emit('avatar-tap', post.user_id)" />
<view class="post-card__author">
<view class="post-card__identity">
<text class="post-card__nickname">{{ post.user?.nickname || '匿名用户' }}</text>
<text v-if="post.is_top" class="post-card__pin">置顶</text>
</view>
<text class="post-card__time">{{ formatTime(post.create_time) }}</text>
</view>
<view class="post-card__status">
<text v-if="!post.is_paid || post.is_unlocked" class="post-card__free">免费</text>
<text v-else class="post-card__price">{{ post.price_points }} 积分</text>
<u-icon name="more-dot-fill" size="30" color="#8d96a3" />
</view>
</view>
<!-- 操作栏 -->
<view class="post-card__actions">
<view class="post-card__action" @tap.stop="$emit('view')">
<text class="post-card__action-icon">👁</text>
<text class="post-card__action-num">{{ formatCount(post.view_count) }}</text>
<view class="post-card__content">
<text v-if="contentTitle" class="post-card__title">{{ contentTitle }}</text>
<text class="post-card__summary" :class="{ 'post-card__summary--locked': post.is_paid && !post.is_unlocked }">
{{ contentSummary }}
</text>
</view>
<view v-if="displayTranslatedText" class="post-card__translation">
<text>AI 翻译</text>
<text class="post-card__translation-text">{{ displayTranslatedText }}</text>
</view>
<view v-if="post.is_paid && !post.is_unlocked" class="post-card__unlock" @tap.stop="$emit('unlock')">
<view>
<text class="post-card__unlock-title">深度内容待解锁</text>
<text class="post-card__unlock-desc">解锁后阅读完整分析与讨论</text>
</view>
<view class="post-card__unlock-btn">查看详情</view>
</view>
<view v-if="post.images?.length && !(post.is_paid && !post.is_unlocked)" class="post-card__images"
:class="{ 'post-card__images--full': isLotteryPost }">
<template v-if="isLotteryPost">
<image v-for="(image, index) in post.images" :key="index" class="post-card__image post-card__image--full"
:src="image" mode="widthFix" @tap.stop="previewImage(index)" />
</template>
<template v-else-if="trumpSourceUrl">
<view class="post-card__external-cover" @tap.stop="openSourceUrl">
<view class="post-card__external-cover-icon">T</view>
<view class="post-card__external-cover-copy">
<text>Truth Social 图片暂不可直连</text>
<text>点击查看原帖</text>
</view>
<u-icon name="arrow-right" size="26" color="#ffffff" />
</view>
<view class="post-card__action" @tap.stop="$emit('comment')">
<text class="post-card__action-icon">💬</text>
<text class="post-card__action-num">{{ formatCount(post.comment_count) }}</text>
</view>
<view class="post-card__action" :class="{ 'post-card__action--active': post.is_liked }"
@tap.stop="$emit('like')">
<text class="post-card__action-icon">👍</text>
<text class="post-card__action-num">{{ formatCount(post.like_count) }}</text>
</view>
<view v-if="isLiuhePost" class="post-card__action"
:class="{ 'post-card__action--loading': post._ai_loading }" @tap.stop="handleAiAnalysis">
<text class="post-card__action-icon">🤖</text>
<text class="post-card__action-num">{{
post._ai_loading ? '…' : (aiAnalyzed ? '已分析' : 'AI')
}}</text>
</view>
<view class="post-card__action" @tap.stop="handleShareTap">
<text class="post-card__action-icon">↗</text>
<text class="post-card__action-num">{{ post.share_count ? formatCount(post.share_count) : ''
}}</text>
</template>
<template v-else>
<image v-for="(image, index) in post.images.slice(0, 3)" :key="index" class="post-card__image"
:src="image" mode="aspectFill" @tap.stop="previewImage(index)" />
<view v-if="post.images.length > 3" class="post-card__image-more" @tap.stop="previewImage(3)">
<text>+{{ post.images.length - 3 }}</text>
</view>
</template>
</view>
<view v-if="post.tags?.length" class="post-card__tags">
<view v-for="(tag, index) in post.tags" :key="index" class="post-card__tag">{{ tag }}</view>
</view>
<view class="post-card__actions">
<view class="post-card__action" @tap.stop="$emit('tap')">
<u-icon name="eye" size="31" color="#7a8494" />
<text>{{ formatCount(post.view_count) }}</text>
</view>
<view class="post-card__action" @tap.stop="$emit('tap')">
<u-icon name="chat" size="30" color="#7a8494" />
<text>{{ formatCount(post.comment_count) }}</text>
</view>
<view class="post-card__action" :class="{ 'post-card__action--active': post.is_liked }" @tap.stop="$emit('like')">
<u-icon :name="post.is_liked ? 'thumb-up-fill' : 'thumb-up'" size="31" :color="post.is_liked ? '#1468f5' : '#7a8494'" />
<text>{{ formatCount(post.like_count) }}</text>
</view>
<view v-if="isLiuhePost" class="post-card__action" :class="{ 'post-card__action--loading': post._ai_loading }"
@tap.stop="handleAiAnalysis">
<text class="post-card__ai-icon">AI</text>
<text>{{ post._ai_loading ? '分析中' : (aiAnalyzed ? '已分析' : 'AI 分析') }}</text>
</view>
<view class="post-card__action post-card__action--share" @tap.stop="handleShareTap">
<u-icon name="share" size="31" color="#7a8494" />
</view>
</view>
@@ -126,68 +106,53 @@ import { translatePost } from '@/api/community'
import { getToken } from '@/utils/auth'
import SharePopup from '@/components/share-popup/share-popup.vue'
const props = defineProps<{
post: any
}>()
const emit = defineEmits(['tap', 'unlock', 'view', 'comment', 'like', 'avatar-tap', 'ai-analysis'])
const props = defineProps<{ post: any }>()
const emit = defineEmits(['tap', 'unlock', 'like', 'avatar-tap', 'ai-analysis'])
const showSharePopup = ref(false)
const handleShareTap = () => {
showSharePopup.value = true
}
const LIUHE_TAGS = ['旧澳六合', '新澳六合']
const translatedText = ref('')
const cachedContent = ref(props.post.translated_content || '')
const isLotteryPost = computed(
() => Array.isArray(props.post?.tags) && props.post.tags.includes('彩票')
)
const isLiuhePost = computed(() => {
const tags = Array.isArray(props.post?.tags) ? props.post.tags : []
return LIUHE_TAGS.some((tag) => tags.includes(tag))
const autoTranslateStarted = ref(false)
const LIUHE_TAGS = ['旧澳六合', '新澳六合']
const rawContent = computed(() => String(props.post?.content_short || props.post?.content || '').trim())
const contentParts = computed(() => {
const lines = rawContent.value.split('\n').map((line) => line.trim()).filter(Boolean)
const firstLine = lines[0] || ''
if (lines.length > 1 && firstLine.length <= 58) {
return { title: firstLine, summary: lines.slice(1).join('\n') }
}
return { title: '', summary: rawContent.value }
})
const isTrumpPost = computed(
() => Array.isArray(props.post?.tags) && props.post.tags.includes('特朗普')
)
const contentTitle = computed(() => contentParts.value.title)
const contentSummary = computed(() => contentParts.value.summary)
const isLotteryPost = computed(() => Array.isArray(props.post?.tags) && props.post.tags.includes('彩票'))
const isLiuhePost = computed(() => LIUHE_TAGS.some((tag) => props.post?.tags?.includes(tag)))
const isTrumpPost = computed(() => Array.isArray(props.post?.tags) && props.post.tags.includes('特朗普'))
const trumpSourceUrl = computed(() => {
if (props.post?.source_url) return props.post.source_url
const originId = props.post?.origin_id || ''
if (!originId.startsWith('truthsocial:')) return ''
const postId = originId.split(':')[1]
if (!postId) return ''
return `https://truthsocial.com/@realDonaldTrump/${postId}`
return postId ? `https://truthsocial.com/@realDonaldTrump/${postId}` : ''
})
const displayTranslatedText = computed(() => translatedText.value || cachedContent.value || props.post?.translated_content || '')
const autoTranslateStarted = ref(false)
const aiAnalyzed = computed(() => !!displayTranslatedText.value)
const openSourceUrl = () => {
if (!trumpSourceUrl.value) return
uni.navigateTo({
url: `/pages/webview/webview?url=${encodeURIComponent(trumpSourceUrl.value)}`
})
}
const handleShareTap = () => { showSharePopup.value = true }
const openSourceUrl = () => trumpSourceUrl.value && uni.navigateTo({ url: `/pages/webview/webview?url=${encodeURIComponent(trumpSourceUrl.value)}` })
const previewImage = (index: number) => {
const images = props.post?.images || []
if (!images.length) return
uni.previewImage({
urls: images,
current: images[index] || images[0],
})
if (images.length) uni.previewImage({ urls: images, current: images[index] || images[0] })
}
const requestTranslate = async () => {
try {
const res = await translatePost({ post_id: props.post.id })
if (res?.translated_content) {
cachedContent.value = res.translated_content
translatedText.value = res.translated_content
return
const result = await translatePost({ post_id: props.post.id })
if (result?.translated_content) {
cachedContent.value = result.translated_content
translatedText.value = result.translated_content
}
} catch (e: any) {
}
} catch (_error) { }
}
const handleAiAnalysis = () => {
@@ -199,384 +164,332 @@ const handleAiAnalysis = () => {
emit('ai-analysis', props.post)
}
watch(
() => props.post?.translated_content,
(value) => {
if (value) {
cachedContent.value = value
translatedText.value = value
}
},
{ immediate: true }
)
watch(
() => props.post?.id,
async () => {
autoTranslateStarted.value = false
cachedContent.value = props.post?.translated_content || ''
translatedText.value = props.post?.translated_content || ''
if (!isTrumpPost.value || cachedContent.value || autoTranslateStarted.value || !props.post?.content) return
autoTranslateStarted.value = true
if (getToken()) {
await requestTranslate()
}
},
{ immediate: true }
)
const formatTime = (ts: any) => {
if (!ts) return ''
let timestamp: number
if (typeof ts === 'string') {
timestamp = new Date(ts.replace(/-/g, '/')).getTime() / 1000
} else {
timestamp = ts
watch(() => props.post?.translated_content, (value) => {
if (value) {
cachedContent.value = value
translatedText.value = value
}
if (isNaN(timestamp)) return ''
const now = Date.now() / 1000
const diff = now - timestamp
if (diff < 60) return '刚刚'
if (diff < 3600) return Math.floor(diff / 60) + '分钟前'
if (diff < 86400) return Math.floor(diff / 3600) + '小时前'
if (diff < 2592000) return Math.floor(diff / 86400) + '天前'
const d = new Date(timestamp * 1000)
return `${d.getMonth() + 1}-${d.getDate()}`
}, { immediate: true })
watch(() => props.post?.id, async () => {
autoTranslateStarted.value = false
cachedContent.value = props.post?.translated_content || ''
translatedText.value = props.post?.translated_content || ''
if (!isTrumpPost.value || cachedContent.value || autoTranslateStarted.value || !props.post?.content) return
autoTranslateStarted.value = true
if (getToken()) await requestTranslate()
}, { immediate: true })
const formatTime = (value: any) => {
if (!value) return ''
const timestamp = typeof value === 'string' ? new Date(value.replace(/-/g, '/')).getTime() / 1000 : Number(value)
if (Number.isNaN(timestamp)) return ''
const seconds = Date.now() / 1000 - timestamp
if (seconds < 60) return '刚刚发布'
if (seconds < 3600) return `${Math.floor(seconds / 60)} 分钟前`
if (seconds < 86400) return `${Math.floor(seconds / 3600)} 小时前`
if (seconds < 2592000) return `${Math.floor(seconds / 86400)} 天前`
const date = new Date(timestamp * 1000)
return `${date.getMonth() + 1}-${date.getDate()}`
}
const formatCount = (count: any) => {
if (!count) return '0'
const n = Number(count)
if (n >= 10000) return (n / 10000).toFixed(1) + 'w'
if (n >= 1000) return (n / 1000).toFixed(1) + 'k'
return String(n)
const formatCount = (value: any) => {
const count = Number(value || 0)
if (count >= 10000) return `${(count / 10000).toFixed(1)}`
if (count >= 1000) return `${(count / 1000).toFixed(1)}k`
return String(count)
}
</script>
<style lang="scss" scoped>
.post-card {
display: flex;
gap: 20rpx;
padding: 28rpx;
position: relative;
margin: 0 26rpx 18rpx;
padding: 26rpx 26rpx 22rpx;
border: 1rpx solid rgba(225, 231, 240, 0.86);
border-radius: 24rpx;
background: #fff;
border-radius: 16rpx;
margin: 0 24rpx 16rpx;
box-shadow: 0 8rpx 24rpx rgba(31, 54, 89, 0.055);
box-sizing: border-box;
&__avatar {
width: 84rpx;
height: 84rpx;
border-radius: 12rpx;
flex-shrink: 0;
}
&__body {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 10rpx;
}
&__main {
display: flex;
flex-direction: column;
gap: 16rpx;
&__paid-notice {
display: inline-flex;
align-items: center;
gap: 8rpx;
margin: -2rpx 0 20rpx;
color: #1468f5;
font-size: 24rpx;
font-weight: 600;
}
&__header {
display: flex;
align-items: center;
justify-content: space-between;
}
&__user {
display: flex;
align-items: center;
gap: 0;
min-width: 0;
}
&__nickname {
font-size: 28rpx;
font-weight: 600;
color: #000;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&__avatar {
width: 78rpx;
height: 78rpx;
margin-right: 16rpx;
border-radius: 50%;
flex-shrink: 0;
background: #eef2f8;
}
&__dot {
font-size: 24rpx;
color: #666;
margin: 0 8rpx;
flex-shrink: 0;
&__author {
flex: 1;
min-width: 0;
}
&__identity,
&__status {
display: flex;
align-items: center;
}
&__identity { gap: 10rpx; }
&__nickname {
max-width: 250rpx;
overflow: hidden;
color: #202a3b;
font-size: 29rpx;
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
}
&__pin,
&__free,
&__price {
padding: 4rpx 12rpx;
border-radius: 8rpx;
color: #1468f5;
font-size: 20rpx;
font-weight: 600;
background: #edf4ff;
}
&__time {
font-size: 24rpx;
color: #666;
white-space: nowrap;
display: block;
margin-top: 5rpx;
color: #9099a8;
font-size: 23rpx;
}
&__status {
gap: 15rpx;
margin-left: 14rpx;
flex-shrink: 0;
}
&__badges {
display: flex;
align-items: center;
gap: 8rpx;
flex-shrink: 0;
margin-left: 12rpx;
}
&__badge {
padding: 2rpx 10rpx;
border-radius: 6rpx;
font-size: 22rpx;
line-height: 1.2;
&--paid {
background: #e5edff;
text {
color: #185dff;
}
}
&--hot {
background: #ffe5e5;
text {
color: #ee3835;
}
}
&--top {
background: #e5edff;
text {
color: #185dff;
}
}
}
&__price { color: #7653d6; background: #f1edff; }
&__content {
line-height: 1.7;
display: flex;
flex-direction: column;
gap: 10rpx;
padding: 24rpx 0 0;
}
&__text {
font-size: 26rpx;
color: #000;
word-break: break-word;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
overflow: hidden;
&__title {
color: #172033;
font-size: 34rpx;
font-weight: 700;
line-height: 1.38;
}
&--locked {
-webkit-line-clamp: 2;
}
&__summary {
display: -webkit-box;
overflow: hidden;
color: #566173;
font-size: 28rpx;
line-height: 1.62;
white-space: pre-wrap;
word-break: break-word;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
&--locked { -webkit-line-clamp: 2; }
}
&__translation {
display: flex;
flex-direction: column;
gap: 8rpx;
margin-top: 16rpx;
padding: 16rpx 18rpx;
border-left: 4rpx solid #94bbff;
border-radius: 0 12rpx 12rpx 0;
background: #f5f8ff;
> text:first-child { color: #1468f5; font-size: 21rpx; font-weight: 700; }
}
&__translation-text {
display: -webkit-box;
overflow: hidden;
color: #59667a;
font-size: 25rpx;
line-height: 1.55;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
}
&__unlock {
display: flex;
align-items: center;
justify-content: space-between;
height: 120rpx;
padding: 0 24rpx;
background: #e5edff;
border-radius: 12rpx;
gap: 18rpx;
margin-top: 20rpx;
padding: 20rpx 22rpx;
border-radius: 16rpx;
background: linear-gradient(108deg, #f1f6ff, #f9fbff);
}
&__unlock-text {
font-size: 28rpx;
color: #185dff;
}
&__unlock-title { display: block; color: #1e4b9c; font-size: 27rpx; font-weight: 700; }
&__unlock-desc { display: block; margin-top: 5rpx; color: #7283a0; font-size: 22rpx; }
&__unlock-btn {
min-width: 142rpx;
height: 56rpx;
padding: 0 24rpx;
display: flex;
align-items: center;
justify-content: center;
background: #185dff;
border-radius: 12rpx;
text {
font-size: 28rpx;
color: #fff;
}
border: 2rpx solid #1468f5;
border-radius: 999rpx;
color: #1468f5;
font-size: 24rpx;
font-weight: 600;
box-sizing: border-box;
flex-shrink: 0;
}
&__images {
display: flex;
gap: 12rpx;
position: relative;
display: flex;
gap: 10rpx;
margin-top: 20rpx;
overflow: hidden;
border-radius: 16rpx;
&--full {
display: block;
}
&--full { display: block; }
}
&__img {
flex: 1;
height: 210rpx;
border-radius: 12rpx;
min-width: 0;
&__image {
width: calc((100% - 20rpx) / 3);
height: 184rpx;
border-radius: 14rpx;
background: #eef2f8;
&--full {
display: block;
width: 100%;
height: auto;
margin-bottom: 12rpx;
margin-bottom: 10rpx;
}
}
&__img-more {
&__image-more {
position: absolute;
right: 0;
top: 0;
width: 33.33%;
height: 210rpx;
border-radius: 12rpx;
background: rgba(0, 0, 0, 0.4);
width: calc((100% - 20rpx) / 3);
height: 184rpx;
display: flex;
align-items: center;
justify-content: center;
text {
font-size: 32rpx;
color: #fff;
font-weight: 600;
}
border-radius: 14rpx;
color: #fff;
font-size: 31rpx;
font-weight: 700;
background: rgba(18, 29, 48, 0.58);
}
&__external-cover {
width: 100%;
min-height: 210rpx;
border-radius: 12rpx;
padding: 24rpx;
background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
min-height: 176rpx;
display: flex;
align-items: center;
gap: 20rpx;
gap: 18rpx;
padding: 22rpx;
color: #fff;
background: linear-gradient(135deg, #172033, #34425a);
box-sizing: border-box;
}
&__external-cover-icon {
width: 76rpx;
height: 76rpx;
border-radius: 20rpx;
background: rgba(255, 255, 255, 0.12);
width: 64rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
text {
font-size: 40rpx;
color: #fff;
font-weight: 700;
}
border-radius: 18rpx;
font-size: 33rpx;
font-weight: 700;
background: rgba(255, 255, 255, 0.16);
}
&__external-cover-body {
&__external-cover-copy {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 8rpx;
}
&__external-cover-title {
font-size: 28rpx;
color: #fff;
font-weight: 600;
}
&__external-cover-desc {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.72);
}
&__external-cover-btn {
height: 60rpx;
padding: 0 20rpx;
border-radius: 999rpx;
background: #185dff;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
text {
font-size: 24rpx;
color: #fff;
font-weight: 600;
}
}
&__translate {
margin-top: 10rpx;
padding-left: 4rpx;
&-text {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
font-size: 28rpx;
color: #3f4a5a;
line-height: 1.75;
word-break: break-word;
white-space: pre-wrap;
}
text:first-child { font-size: 26rpx; font-weight: 600; }
text:last-child { color: rgba(255, 255, 255, 0.7); font-size: 22rpx; }
}
&__tags {
display: flex;
flex-wrap: wrap;
gap: 10rpx;
margin-top: 18rpx;
}
&__tag {
padding: 2rpx 10rpx;
border-radius: 6rpx;
background: #e5edff;
text {
font-size: 22rpx;
color: #185dff;
}
padding: 5rpx 13rpx;
border-radius: 8rpx;
color: #1468f5;
font-size: 22rpx;
background: #edf4ff;
}
&__actions {
display: flex;
align-items: center;
gap: 40rpx;
gap: 42rpx;
margin-top: 22rpx;
padding-top: 18rpx;
border-top: 1rpx solid #edf0f4;
}
&__action {
display: flex;
align-items: center;
gap: 6rpx;
&--active {
.post-card__action-icon,
.post-card__action-num {
color: #185dff;
}
}
}
&__action-icon {
font-size: 28rpx;
color: #262626;
line-height: 1;
}
&__action-num {
gap: 7rpx;
color: #7a8494;
font-size: 24rpx;
color: #262626;
line-height: 1;
&--active { color: #1468f5; }
&--share { margin-left: auto; }
&--loading { opacity: 0.6; }
}
&__ai-icon {
width: 29rpx;
height: 29rpx;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
color: #fff;
font-size: 17rpx;
font-weight: 800;
background: #1468f5;
}
}
</style>