debug
All checks were successful
Deploy to Server / deploy (push) Successful in 25s

This commit is contained in:
jeremygan2021
2026-02-28 13:01:02 +08:00
parent b778fbb923
commit b31e8fff09
7 changed files with 53 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react'
import Taro, { useRouter, useShareAppMessage, useDidShow } from '@tarojs/taro'
import Taro, { useRouter, useShareAppMessage, useShareTimeline, useDidShow } from '@tarojs/taro'
import { View, Text, Image, Video, Input, ScrollView } from '@tarojs/components'
import { AtActivityIndicator, AtIcon, AtActionSheet, AtActionSheetItem, AtFloatLayout } from 'taro-ui'
import { getTopicDetail, createReply, uploadMedia, getStarUsers } from '../../../api'
@@ -70,6 +70,7 @@ const ForumDetail = () => {
setShowStarUsers(false)
}
// 分享给好友
useShareAppMessage(() => {
return {
title: topic?.title || '技术社区',
@@ -77,6 +78,15 @@ const ForumDetail = () => {
}
})
// 分享到朋友圈
useShareTimeline(() => {
return {
title: topic?.title || '技术社区',
query: `id=${id}`,
imageUrl: topic?.author_info?.avatar_url || 'https://via.placeholder.com/300x300?text=技术社区'
}
})
const handleReplyChange = (e) => {
setReplyContent(e.detail.value)
}