作者 mxd

表扬点赞

<template>
<view class="teacher_praise">
<view class="tel_index_bg"></view>
<view class="teacher_praise-main">
<scroll-view :scroll-y="true" class="praise_andLike-list" @scrolltolower="getData">
<view v-if="dataList.length">
<praise-item :type="LIKETYPE.TEACHERSEND" :info="item" v-for="item in dataList" :key="item.id"></praise-item>
<view class="card" v-for="item in dataList" :key="item.id">
<view class="user">
<u--image
shape="circle"
height="60rpx"
width="60rpx"
:src="item.uimg"
>
</u--image>
<view class="info">
<view class="name">
{{ item.uname }}
</view>
<view class="time">
{{ item.create_time }}
</view>
</view>
<u-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" ></u-empty>
</scroll-view>
</view>
<view class="content">
{{ item.content }}
</view>
</view>
<u-empty v-if="!dataList.length" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" ></u-empty>
</view>
</template>
<script>
import praise_item from "@/components/praise_item/praise_item.vue"
import { LIKETYPE } from "@/emit/index.js"
export default {
components: {
PraiseItem: praise_item
},
data() {
return {
LIKETYPE,
... ... @@ -57,20 +66,41 @@
<style lang="scss">
.teacher_praise{
.tel_index_bg{
position: absolute;
top: 0;
z-index: 1;
width: 100%;
min-height: 220rpx;
background: linear-gradient(0deg, #f8f8f8 0%, #ffffff 25%, #5D9DFD 60%, #428EFE 70%, #2D81FF 100%);
}
.teacher_praise-main{
padding: 40rpx 25rpx;
position: relative;
z-index: 1;
.praise_andLike-list{
height: calc(100vh - 122rpx);
padding: 25rpx;
.card {
padding: 30rpx;
background-color: #fff;
border-radius: 20rpx;
& + .card {
margin-top: 20rpx;
}
.user {
display: flex;
.info {
flex: 1;
margin-left: 30rpx;
.name {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #323232;
}
.time {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #979797;
margin-top: 10rpx;
}
}
}
.content {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: #323232;
line-height: 42px;
margin-top: 20rpx;
}
}
}
... ...