htc 6 дней назад
Родитель
Сommit
ba07e6749c
1 измененных файлов с 11 добавлено и 3 удалено
  1. 11 3
      pagesHome/activityDetail.vue

+ 11 - 3
pagesHome/activityDetail.vue

@@ -107,8 +107,9 @@
 		<view class="box box2">
 			<view class="box-title">活动详情</view>
 			<view class="box2-detail" v-if="activityInfo&&activityInfo.activityDetails">
-				<up-read-more :toggle="true" showHeight="374rpx" color="#989998" fontSize="24rpx" openText="收起更多信息" closeText="展开更多信息">
-				    <rich-text :nodes="activityInfo.activityDetails"></rich-text>
+				<up-read-more :toggle="true" showHeight="374rpx" color="#989998" fontSize="24rpx" openText="收起" closeText="展开" ref="uReadMore">
+				    <!-- <rich-text :nodes="activityInfo.activityDetails"></rich-text> -->
+					<u-parse :content="activityInfo.activityDetails" @load="load"></u-parse>
 				</up-read-more>
 			</view>
 		</view>
@@ -218,7 +219,7 @@
 <script setup name="">
 	import CusHeader from '@/components/CusHeader/index.vue'
 	import { onLoad } from '@dcloudio/uni-app';
-	import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
+	import { ref, reactive, onMounted, getCurrentInstance ,nextTick } from 'vue'
 	import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app' 
 	const { proxy } = getCurrentInstance()
 	
@@ -242,6 +243,7 @@
 	const avatars = ref([])
 	const fail = ref(false)
 	const share = ref(false)
+	const uReadMore = ref()
 
 	// --- 海报生成相关 ---
 	const posterShow = ref(false) // 控制海报弹窗显示
@@ -271,6 +273,12 @@
 		{ img:'https://oss.familydaf.cn/sxsnfile/20251218/125b3da887974ae2b600ce2ec72c1fbe.png',title:'保存图片', type:'save' },
 	])
 	
+	const load = () => {
+		nextTick(()=>{
+			proxy.$refs.uReadMore.init();
+		})
+	}
+	
 	const handleReviewMembers = () => {
 		uni.navigateTo({
 			url:'/pagesHome/recruitsNumber?activityId='+activityInfo.value?.id+'&recruitmentMax='+activityInfo.value?.recruitmentMax+'&recruitmentMin='+activityInfo.value?.recruitmentMin