unifiedinteraction

This commit is contained in:
WanP
2025-10-16 14:14:26 +08:00
parent 89171696ff
commit c149d9bca4
2 changed files with 11 additions and 23 deletions

View File

@@ -32,25 +32,25 @@
<!-- 头像+关注 -->
<view class="user-section">
<image :src="videoData.userImg" class="user-avatar" mode="aspectFill"></image>
<view class="follow-btn-container" @tap="toggleFollow">
<view class="follow-btn-container" @tap="() => handleInteraction('follow')">
<image src="/static/imgs/followbtn/btn@3x.webp" mode="aspectFit"></image>
</view>
</view>
<!-- 点赞按钮 -->
<view class="action-btn" @tap="toggleLike">
<view class="action-btn" @tap="() => handleInteraction('like')">
<image src="/static/imgs/likeicon2/icon-2@3x.webp" class="action-icon" mode="aspectFit"></image>
<text class="action-count">{{ formatCount(videoData.likesum) }}</text>
</view>
<!-- 评论按钮 -->
<view class="action-btn" @tap="openComments">
<view class="action-btn" @tap="() => handleInteraction('comment')">
<image src="/static/imgs/commenticon/icon-2@3x.webp" class="action-icon" mode="aspectFit"></image>
<text class="action-count">{{ formatCount(videoData.commentsum) }}</text>
</view>
<!-- 分享按钮 -->
<view class="action-btn" @tap="shareVideo">
<view class="action-btn" @tap="() => handleInteraction('share')">
<image src="/static/imgs/shareicon/icon-2@3x.webp" class="action-icon" mode="aspectFit"></image>
<text class="action-count">{{ formatCount(videoData.sharesum) }}</text>
</view>
@@ -81,7 +81,6 @@ const formatDate = common.formatDate
// 折叠展开状态
const isExpanded = ref(false)
const videoRef = ref(null)
const ctx = ref(null)
// 静音状态
const isMuted = ref(false)
// 播放状态
@@ -209,23 +208,8 @@ const pausevideo = () => {
}
}
// 关注
const toggleFollow = () => {
common.openapp();
}
// 点赞
const toggleLike = () => {
common.openapp();
}
// 打开评论
const openComments = () => {
common.openapp();
}
// 分享视频
const shareVideo = () => {
// 统一处理交互操作
const handleInteraction = () => {
common.openapp();
}