first commit
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user