This commit is contained in:
王一嘉
2025-07-23 19:10:17 +08:00
parent f5da17b9f9
commit bddd14faff
3 changed files with 43 additions and 32 deletions

View File

@@ -53,6 +53,15 @@ const saveM = () => {
</view> </view>
</view> </view>
<view class="block" v-if="detail.material_type?.desc_limit > 0 && detail.children?.material[current].content">
<view class="title">正文</view>
<view class="info">
{{ detail.children?.material[current].content }}
<view class="copy-button" @click="copy(detail.children?.material[current].content)">复制</view>
</view>
</view>
<view class="block" <view class="block"
v-if="detail.material_type?.tags_limit > 0 && detail.children?.material[current].tags_arr.length > 0"> v-if="detail.material_type?.tags_limit > 0 && detail.children?.material[current].tags_arr.length > 0">
<view class="title"> <view class="title">
@@ -71,15 +80,6 @@ const saveM = () => {
</view> </view>
</view> </view>
<view class="block" v-if="detail.material_type?.desc_limit > 0 && detail.children?.material[current].content">
<view class="title">正文</view>
<view class="info">
{{ detail.children?.material[current].content }}
<view class="copy-button" @click="copy(detail.children?.material[current].content)">复制</view>
</view>
</view>
<view class="block"> <view class="block">
<view class="title">素材请按顺序下载&发布</view> <view class="title">素材请按顺序下载&发布</view>
<view class="info"> <view class="info">

View File

@@ -40,6 +40,14 @@ const list = computed(() => data.children.material[current.value].comment?.flatM
{{ data.children.material[current].title }} {{ data.children.material[current].title }}
</view> </view>
</view> </view>
<view class="block" v-if="data.material_type?.desc_limit > 0">
<view class="block-title">
正文:
</view>
<view class="block-info">
{{ data.children.material[current].content }}
</view>
</view>
<view class="block" <view class="block"
v-if="data.material_type?.tags_limit > 0 && data.children.material[current].tags_arr?.length > 0"> v-if="data.material_type?.tags_limit > 0 && data.children.material[current].tags_arr?.length > 0">
<view class="block-title"> <view class="block-title">
@@ -49,14 +57,6 @@ const list = computed(() => data.children.material[current.value].comment?.flatM
{{ data.children.material[current].tags_arr.map(item => `#${item}`).join(' ') }} {{ data.children.material[current].tags_arr.map(item => `#${item}`).join(' ') }}
</view> </view>
</view> </view>
<view class="block" v-if="data.material_type?.desc_limit > 0">
<view class="block-title">
正文:
</view>
<view class="block-info">
{{ data.children.material[current].content }}
</view>
</view>
<view class="block" v-if="data.children.material[current].material_arr?.length > 0"> <view class="block" v-if="data.children.material[current].material_arr?.length > 0">
<view class="block-title"> <view class="block-title">
素材: 素材:

View File

@@ -5,6 +5,7 @@ import XImage from "../../../components/XImage.vue";
import XSquareCarouselImage from "../../../components/XSquareCarouselImage.vue"; import XSquareCarouselImage from "../../../components/XSquareCarouselImage.vue";
import HF_ICON from "../../../static/icons/icon-wrapper.png"; import HF_ICON from "../../../static/icons/icon-wrapper.png";
import {copy} from "../../../utils/uils.js"; import {copy} from "../../../utils/uils.js";
import {computed} from "vue";
const {data, home} = defineProps({ const {data, home} = defineProps({
data: { data: {
@@ -16,6 +17,8 @@ const {data, home} = defineProps({
default: false default: false
} }
}); });
const list = computed(() => [data.comment_arr]?.flatMap(v => v.children ? [v, ...v.children] : [v]));
</script> </script>
<template> <template>
@@ -53,21 +56,29 @@ const {data, home} = defineProps({
<view class="block"> <view class="block">
<view class="block-title">评论区案例:</view> <view class="block-title">评论区案例:</view>
<view class="test-24r text-[#4E5969]"> <view class="test-24r text-[#4E5969]">
<view v-if="data.comment_arr"> <view v-for="(v, index) in list">
评论1: <view>
<text v-if="data.comment_arr.pid!==0" class="text-[#86909C]"> 评论{{ index + 1 }}:
<image class="!size-[20rpx]" src="/static/icons/msgback.png"></image> <text v-if="v.pid" class="text-[rgba(134,144,156)]">
回复1: <image class="!size-[20rpx]" src="/static/icons/msgback.png"></image>
</text> 回复{{
{{ data.comment_arr.intro }} list.findIndex(k => k.pid === v.pid)
</view> }}
<view v-for="(v, index) in data.comment_arr.children"> </text>
评论{{ index + 2 }}: {{ v.intro }}
<text class="text-[#86909C]"> </view>
<image class="!size-[20rpx]" src="/static/icons/msgback.png"></image> <view class="!flex gap-[20rpx] flex-wrap !my-[10rpx]">
回复1: <view class="!w-[96rpx] !h-[96rpx] !aspect-square" v-for="k in v.image_arr">
</text> <x-image
{{ v.intro }} :style="{
width: '96rpx',
height: '96rpx',
}"
:src="k"
:list="v.image_arr">
</x-image>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>