deploy: auto commit uniapp changes 2026-07-04 23:59:31

This commit is contained in:
hajimi
2026-07-04 23:59:31 +08:00
parent 6081254d63
commit 675246cde2
2 changed files with 28 additions and 44 deletions
-20
View File
@@ -8,9 +8,6 @@
<text class="community-header__search-text">搜索世博头条</text>
</view>
<AiAssistantEntry size="large" />
<view class="community-header__publish" @tap="goPublish">
<text class="community-header__publish-icon">+</text>
</view>
</view>
</view>
@@ -399,23 +396,6 @@ const handleAiAnalysis = (post: any) => {
color: #808080;
}
&__publish {
width: 68rpx;
height: 68rpx;
display: flex;
align-items: center;
justify-content: center;
background: #E5EDFF;
border-radius: 12rpx;
flex-shrink: 0;
}
&__publish-icon {
font-size: 40rpx;
color: #185dff;
font-weight: 300;
line-height: 1;
}
}
.community-tags {
+28 -24
View File
@@ -110,25 +110,32 @@
<view class="nd-bar">
<view class="nd-bar__input" @tap="showCommentInput">
<u-icon name="edit-pen" :size="28" color="#999" />
<text class="nd-bar__placeholder">写评论...</text>
<view class="nd-bar__input-icon">
<u-icon name="edit-pen" :size="28" color="#185dff" />
</view>
<view class="nd-bar__input-text">
<text class="nd-bar__placeholder">写下你的评论...</text>
<text class="nd-bar__hint">{{ commentTotal ? `${commentTotal}条讨论` : '抢先参与讨论' }}</text>
</view>
</view>
<view class="nd-bar__actions">
<view class="nd-bar__item" @tap="handleLike">
<u-icon name="thumb-up" :size="36" :color="voteStatus === 1 ? '#185dff' : '#666'" />
<text :class="{ 'nd-bar__active': voteStatus === 1 }">{{ newsData.like_count || 0 }}</text>
<view class="nd-bar__item" :class="{ 'nd-bar__item--active': voteStatus === 1 }" @tap="handleLike">
<view class="nd-bar__icon">
<u-icon name="thumb-up" :size="34" :color="voteStatus === 1 ? '#185dff' : '#5f6673'" />
</view>
<text :class="{ 'nd-bar__active': voteStatus === 1 }">{{ formatActionCount(newsData.like_count || 0) }}</text>
</view>
<view class="nd-bar__item" @tap="handleDislike">
<u-icon name="thumb-down" :size="36" :color="voteStatus === 2 ? '#666' : '#999'" />
<text :class="{ 'nd-bar__active': voteStatus === 2 }">{{ newsData.dislike_count || 0 }}</text>
</view>
<view class="nd-bar__item" @tap="handleCollect">
<u-icon :name="newsData.collect ? 'star-fill' : 'star'" :size="36"
:color="newsData.collect ? '#f0ad4e' : '#666'" />
<view class="nd-bar__item" :class="{ 'nd-bar__item--active': newsData.collect }" @tap="handleCollect">
<view class="nd-bar__icon">
<u-icon :name="newsData.collect ? 'star-fill' : 'star'" :size="34"
:color="newsData.collect ? '#f0ad4e' : '#5f6673'" />
</view>
<text :class="{ 'nd-bar__active': newsData.collect }">{{ newsData.collect ? '已藏' : '收藏' }}</text>
</view>
<view class="nd-bar__item" @tap="handleShare">
<u-icon name="share" :size="36" color="#666" />
<view class="nd-bar__icon">
<u-icon name="share" :size="34" color="#5f6673" />
</view>
<text>分享</text>
</view>
</view>
@@ -546,17 +553,6 @@ const handleLike = async () => {
}
}
const handleDislike = async () => {
try {
const res = await articleVote({ article_id: Number(newsId), vote_type: 2 })
voteStatus.value = res.action === 'cancel' ? 0 : 2
newsData.value.like_count = res.like_count
newsData.value.dislike_count = res.dislike_count
} catch (e) {
// ignore
}
}
const handleCollect = async () => {
try {
if (newsData.value.collect) {
@@ -583,6 +579,14 @@ const handleShare = () => {
showSharePopup.value = true
}
const formatActionCount = (value: number | string) => {
const count = Number(value || 0)
if (!Number.isFinite(count) || count <= 0) return '点赞'
if (count >= 10000) return `${(count / 10000).toFixed(count >= 100000 ? 0 : 1)}`
if (count > 999) return '999+'
return String(count)
}
const formatTime = (t: string) => {
if (!t) return ''
const d = new Date(t.replace(/-/g, '/'))