Files
sifa-mp/userPages/pages/userFeedback.vue
T
2025-05-22 10:33:32 +08:00

67 lines
2.1 KiB
Vue

<template>
<view class="min-height bg-main-light">
<HeaderItem title="我的专题反馈"/>
<template v-if="list.length">
<view class="card m-25 text-25" v-for="(item, index) in list" :key="index">
<view class="flex justify-start items-center font-bold">
{{ item.title }}
</view>
<view class="flex justify-start items-center mt-15 text-gray">
活动单位: {{ item.company }}
</view>
<view class="flex justify-start items-center mt-15 text-gray">
活动地点: {{ item.address }}
</view>
<view class="flex justify-start items-center mt-15 text-gray">
活动日期: {{ item.date }}
</view>
<template v-if="item.content">
<view class="flex justify-start items-center mt-15 text-gray" :class="[item.showAll ? '' : 'u-line-2']">
活动概览: {{ item.content }}
</view>
<text @click="list[index].showAll = !list[index].showAll" class="text-25 text-main mt-15" v-if="item.showBtn">
{{ item.showAll ? '折叠' : '展开' }}
</text>
</template>
<view class="mt-15" v-if="item.pics">
<u-album :urls="JSON.parse(item.pics)"/>
</view>
<view class="mt-15" v-if="item.video">
<video :src="item.video" style="width: 660rpx; height: 300rpx" class="rounded-sm"></video>
</view>
</view>
</template>
<u-empty v-else icon="/static/empty.png"/>
</view>
</template>
<script>
import HeaderItem from "@/components/HeaderItem.vue";
import {listFeedbackReq} from "@/api/common";
export default {
name: "userFeedback",
components: {HeaderItem},
data() {
return {
list: []
}
},
methods: {
async getList() {
const {data} = await listFeedbackReq()
this.list = data.map(item => {
if (item.content) {
item.showAll = item.content.length < 50
item.showBtn = item.content.length > 50
}
console.log(item)
return item
})
}
},
onLoad() {
this.getList()
},
}
</script>