Files
xl-mobile/src/pages/taskDetails/components/CollectMaterials.vue

128 lines
3.7 KiB
Vue
Raw Normal View History

2025-03-28 15:34:00 +08:00
<script setup>
2025-04-07 18:04:39 +08:00
import {ref, reactive} from "vue";
import XSquareCarouselImage from "../../../components/XSquareCarouselImage.vue";
import {toPage} from "../../../utils/uils.js";
2025-03-28 15:34:00 +08:00
2025-05-19 19:03:53 +08:00
const {data} = defineProps({
data: {
type: Object,
default: null,
}
});
2025-04-07 18:04:39 +08:00
const current = ref(0);
2025-03-28 15:34:00 +08:00
</script>
<template>
<!--领取素材-->
2025-04-07 18:04:39 +08:00
<view class="!flex gap-[24rpx] !mb-[28rpx]">
<view
2025-05-19 19:03:53 +08:00
v-for="(item,index) in data.children.material"
2025-04-07 18:04:39 +08:00
@click="current=index"
:class="['tab-item', index===current?'cur':'']">
2025-05-19 19:03:53 +08:00
素材{{ index + 1 }}
2025-04-07 18:04:39 +08:00
</view>
</view>
<template v-if="true">
<view class="block">
<view class="block-title">
标题:
</view>
<view class="block-info">
2025-05-19 19:03:53 +08:00
{{ data.children.material[current].title }}
2025-04-07 18:04:39 +08:00
</view>
</view>
<view class="block">
<view class="block-title">
话题:
</view>
<view class="block-info">
#话题1 #话题2 #话题3 #话题4 #话题5
</view>
</view>
<view class="block">
<view class="block-title">
正文:
</view>
<view class="block-info">
2025-05-19 19:03:53 +08:00
{{ data.children.material[current].content }}
2025-04-07 18:04:39 +08:00
</view>
</view>
<view class="block">
<view class="block-title">
素材:
</view>
<view class="block-info">
2025-05-19 19:03:53 +08:00
<x-square-carousel-image :list="data.children.material[current].material_arr"></x-square-carousel-image>
2025-04-07 18:04:39 +08:00
</view>
</view>
<view class="block">
<view class="block-title">
评论区案例:
</view>
<view class="block-info">
<view>
<view>评论1我用的也是这款早tb可以购买噢~我用的也是这款早tb可以购买噢~</view>
<view class="!flex gap-[20rpx] flex-wrap">
2025-05-19 19:03:53 +08:00
<image class="!w-[96rpx] !h-[96rpx] !aspect-square" mode="aspectFill"
src="/static/images/test.png"></image>
<image class="!w-[96rpx] !h-[96rpx] !aspect-square" mode="aspectFill"
src="/static/images/test.png"></image>
<image class="!w-[96rpx] !h-[96rpx] !aspect-square" mode="aspectFill"
src="/static/images/test.png"></image>
<image class="!w-[96rpx] !h-[96rpx] !aspect-square" mode="aspectFill"
src="/static/images/test.png"></image>
2025-04-07 18:04:39 +08:00
</view>
</view>
</view>
</view>
<tui-button size="28" @click="toPage('/pages/downloadMaterials/index')">
<tui-icon size="20" color="#fff" name="bottom"></tui-icon>
<view class="!ml-[20rpx]">一键下载</view>
</tui-button>
</template>
2025-03-28 15:34:00 +08:00
</template>
<style scoped lang="scss">
2025-04-07 18:04:39 +08:00
.tab-item {
2025-05-19 19:03:53 +08:00
padding: 12rpx 26rpx;
2025-04-07 18:04:39 +08:00
border-radius: 9999rpx;
background-color: #F7F8FA;
font-size: 24rpx;
color: #4E5969;
transition: 500ms;
}
.cur {
background-color: #E8F3FF;
color: #165DFF;
}
.block {
display: flex;
gap: 20rpx;
margin-bottom: 20rpx;
.block-title {
flex-shrink: 0;
color: rgb(134, 144, 156);
font-size: 24rpx;
font-weight: 500;
line-height: 140%;
letter-spacing: 0;
text-align: left;
width: 160rpx;
}
2025-03-28 15:34:00 +08:00
2025-04-07 18:04:39 +08:00
.block-info {
color: rgb(78, 89, 105);
font-size: 24rpx;
font-weight: 500;
line-height: 140%;
letter-spacing: 0;
}
}
2025-03-28 15:34:00 +08:00
</style>