作者 mxd

表扬点赞

1 <template> 1 <template>
2 <view class="teacher_praise"> 2 <view class="teacher_praise">
3 - <view class="tel_index_bg"></view>  
4 - <view class="teacher_praise-main">  
5 - <scroll-view :scroll-y="true" class="praise_andLike-list" @scrolltolower="getData">  
6 - <view v-if="dataList.length">  
7 - <praise-item :type="LIKETYPE.TEACHERSEND" :info="item" v-for="item in dataList" :key="item.id"></praise-item> 3 + <view class="card" v-for="item in dataList" :key="item.id">
  4 + <view class="user">
  5 + <u--image
  6 + shape="circle"
  7 + height="60rpx"
  8 + width="60rpx"
  9 + :src="item.uimg"
  10 + >
  11 + </u--image>
  12 + <view class="info">
  13 + <view class="name">
  14 + {{ item.uname }}
  15 + </view>
  16 + <view class="time">
  17 + {{ item.create_time }}
  18 + </view>
  19 + </view>
  20 + </view>
  21 + <view class="content">
  22 + {{ item.content }}
8 </view> 23 </view>
9 - <u-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" ></u-empty>  
10 - </scroll-view>  
11 -  
12 </view> 24 </view>
  25 + <u-empty v-if="!dataList.length" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" ></u-empty>
13 </view> 26 </view>
14 </template> 27 </template>
15 28
16 <script> 29 <script>
17 - import praise_item from "@/components/praise_item/praise_item.vue"  
18 import { LIKETYPE } from "@/emit/index.js" 30 import { LIKETYPE } from "@/emit/index.js"
19 export default { 31 export default {
20 - components: {  
21 - PraiseItem: praise_item  
22 - },  
23 data() { 32 data() {
24 return { 33 return {
25 LIKETYPE, 34 LIKETYPE,
@@ -57,20 +66,41 @@ @@ -57,20 +66,41 @@
57 66
58 <style lang="scss"> 67 <style lang="scss">
59 .teacher_praise{ 68 .teacher_praise{
60 - .tel_index_bg{  
61 - position: absolute;  
62 - top: 0;  
63 - z-index: 1;  
64 - width: 100%;  
65 - min-height: 220rpx;  
66 - background: linear-gradient(0deg, #f8f8f8 0%, #ffffff 25%, #5D9DFD 60%, #428EFE 70%, #2D81FF 100%); 69 + padding: 25rpx;
  70 + .card {
  71 + padding: 30rpx;
  72 + background-color: #fff;
  73 + border-radius: 20rpx;
  74 + & + .card {
  75 + margin-top: 20rpx;
  76 + }
  77 + .user {
  78 + display: flex;
  79 + .info {
  80 + flex: 1;
  81 + margin-left: 30rpx;
  82 + .name {
  83 + font-size: 26rpx;
  84 + font-family: PingFang SC;
  85 + font-weight: 500;
  86 + color: #323232;
  87 + }
  88 + .time {
  89 + font-size: 24rpx;
  90 + font-family: PingFang SC;
  91 + font-weight: 400;
  92 + color: #979797;
  93 + margin-top: 10rpx;
  94 + }
  95 + }
67 } 96 }
68 - .teacher_praise-main{  
69 - padding: 40rpx 25rpx;  
70 - position: relative;  
71 - z-index: 1;  
72 - .praise_andLike-list{  
73 - height: calc(100vh - 122rpx); 97 + .content {
  98 + font-size: 26rpx;
  99 + font-family: PingFang SC;
  100 + font-weight: 400;
  101 + color: #323232;
  102 + line-height: 42px;
  103 + margin-top: 20rpx;
74 } 104 }
75 } 105 }
76 } 106 }