cloudroam
2025-07-17 f3ea52bf97e61f6917ccaab904817d74d9d4860c
sub-pages/film-list/film-detail.vue
@@ -11,7 +11,7 @@
                        </view>
                    </view>
                    <view class="opera-info">
                        <button class="custom-btn">关注</button>
<!--                        <button class="custom-btn">关注</button>-->
                        <up-icon name="/static/common/share2.png" size="40rpx" color="#999" @click="openSharePopup" />
                    </view>
                </view>
@@ -45,14 +45,14 @@
                        <!-- <view v-html="filmInfo.filmContent||'暂无'" class="rich" style="overflow: scroll;"></view> -->
                    </view>
                    <view class="annotation content-item">
                        <text>{{ formatRelativeTime(filmInfo?.createTime) }} 美国</text>
<!--                        <text>{{ formatRelativeTime(filmInfo?.createTime) }} 美国</text>-->
                    </view>
                </view>
                <up-line></up-line>
                <view class="comment">
                    <view class="writer-view" @click="showCommentLayer">
                    <view class="writer-view" @click="() => showCommentLayer()">
                        <up-icon name="chat-fill" size="60rpx" />
                        <view class="comment-operation">
                            <up-text size="12px" text="说点什么......" margin="0 0 0 20rpx" color="#B9B9B9" />
@@ -87,7 +87,7 @@
            <!-- 固定底部输入框 -->
            <view class="comment-box">
                <view class="input-row">
                    <view class="comment-input" @click="showCommentLayer">
                    <view class="comment-input" @click="() => showCommentLayer()">
                        <up-text size="12px" text="说点什么......" margin="0 0 0 20rpx" color="#B9B9B9" />
                    </view>
<!--                    <up-icon name="heart" size="60rpx" color="#B9B9B9" label="11" />-->
@@ -183,7 +183,8 @@
    title: filmInfo.value?.coverTitle || '分享内容',
    desc: filmInfo.value?.filmContent?.substring(0, 50) || '',
    image: filmPictureList.value[0] || '',
    url: `https://您的域名/sub-pages/film-list/film-detail?id=${filmInfo.value?.id}`
    // url: `http://您的域名/sub-pages/film-list/film-detail?id=${filmInfo.value?.id}`
    url: `/sub-pages/film-list/film-detail?id=${filmInfo.value?.id}`
  }
  showSharePopup.value = true
}
@@ -193,7 +194,9 @@
const copyLink = () => {
  sharePopupShow.value = false
  uni.setClipboardData({
    data: `https://你的域名/sub-pages/film-list/film-detail?id=${filmInfo.value?.id}`,
    // data: `http://14.103.144.28/sub-pages/film-list/film-detail?id=${filmInfo.value?.id}`,
    // 此处应该是一个小程序的外链
    data: `http://14.103.144.28/sub-pages/film-list/film-detail?id=${filmInfo.value?.id}`,
    success: () => $message.showToast('链接已复制')
  })
}
@@ -253,8 +256,11 @@
}
// film-detail.vue
const showCommentLayer = (parentId?: number) => {
const showCommentLayer = (parentId?: number | string) => {
  console.log('点击了评论按钮',parentId)
  if (typeof parentId === 'object') {
    parentId = ''
  }
  commentShow.value = true
  // 如果有parentId,说明是回复评论,需要设置parentId
  // 如果没有parentId,说明是直接评论,不需要设置parentId
@@ -426,7 +432,8 @@
    return {
      title: filmInfo.value?.coverTitle || '分享内容',
      query: `id=${filmInfo.value?.id}`,
      imageUrl: filmPictureList.value[0] || ''
      imageUrl: filmPictureList.value[0] || '',
      desc: filmInfo.value?.filmContent?.substring(0, 50) || ''
    }
  }
})