bayi пре 2 година
родитељ
комит
14056efe85

Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
api/global.js


+ 5 - 0
api/message.js

@@ -5,4 +5,9 @@ import {
 module.exports = {
   // 获取消息页面状态
   getAuthorityMsg: data => request('/v3/message', 'get', data),
+  // 获取消息通知列表 
+  getMessageList: (data, method = 'get') => request('/message', method, data),
+  // 获取点赞列表
+  getBeLikeList: data => request('/v3/message/likeInfo', 'get', data),
+
 }

+ 15 - 54
pages/like/index.js

@@ -1,66 +1,27 @@
-// pages/like/index.js
+import {
+  getBeLikeList
+} from '~/api/message'
+import reachBottom from '~/mixins/reachBottom'
 Page({
-
-  /**
-   * 页面的初始数据
-   */
+  behaviors: [reachBottom],
   data: {
-
+    list: []
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
+    this.getBeLikeList()
   },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
+  loadMore() {
+    this.getData(getBeLikeList)
   },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
+  async getBeLikeList() {
+    let list = await getBeLikeList()
+    console.log(list);
+    this.setData({
+      list
+    })
   }
 })

+ 0 - 1
pages/like/index.less

@@ -29,7 +29,6 @@
       width: 134rpx;
       height: 74rpx;
       border-radius: 10rpx;
-      background-color: skyblue;
     }
   }
 }

+ 5 - 15
pages/like/index.wxml

@@ -1,22 +1,12 @@
 <view class="like">
-  <view class="notes">
-    <image src="/static/stars-1.png" class="avatar" />
+  <view class="notes" wx:for="{{list}}" wx:key="index">
+    <image src="{{item.user.avatar}}" class="avatar" />
     <view class="body">
-      <view class="nickName">帅气席尔瓦去</view>
+      <view class="nickName">{{item.user.nickName||item.user.eid}}</view>
       <view class="date">
-        赞了你的视频 2023-3-14
+        赞了你的视频 {{item.likeLog.day}}
       </view>
     </view>
-    <image src="/static/heart_colored.png" class="cover" />
-  </view>
-  <view class="notes">
-    <image src="/static/stars-1.png" class="avatar" />
-    <view class="body">
-      <view class="nickName">帅气席尔瓦去</view>
-      <view class="date">
-        赞了你的视频<text style="margin-left:20rpx">2023-3-14</text>
-      </view>
-    </view>
-    <image src="/static/heart_colored.png" class="cover" />
+    <image src="{{item.userRead.coverImg}}" class="cover" wx:if="{{item.userRead.resourcesType==0}}" />
   </view>
 </view>

+ 0 - 1
pages/like/index.wxss

@@ -25,5 +25,4 @@
   width: 134rpx;
   height: 74rpx;
   border-radius: 10rpx;
-  background-color: skyblue;
 }

+ 1 - 0
pages/message/index.less

@@ -95,6 +95,7 @@
             height: 38rpx;
             border-radius: 50rpx;
             margin-left: 4rpx;
+            background-color: #E4E1E1;
           }
         }
       }

+ 6 - 6
pages/message/index.wxml

@@ -12,12 +12,12 @@
       <view class="body">
         <view class="name">评论</view>
         <view class="avatars">
-          <image src="/static/tj2.png" class="miniAvatar" wx:for="{{6}}" wx:key="index" />
+          <image wx:for="{{authorityMsg.postsAvatarList}}" wx:key="index" src="{{item}}" class="miniAvatar" />
         </view>
       </view>
       <view class="right">
-        <view class="date">2023-3-14</view>
-        <view class="unread">10</view>
+        <view class="date">{{filters.formatDate(authorityMsg.postsDate,5)}}</view>
+        <view class="unread" wx:if="{{authorityMsg.postsCount>0}}">{{authorityMsg.postsCount}}</view>
       </view>
     </view>
     <view class="base authority" bindtap="jump" data-url='like'>
@@ -25,12 +25,12 @@
       <view class="body">
         <view class="name">赞</view>
         <view class="avatars">
-          <image src="/static/tj2.png" class="miniAvatar" wx:for="{{6}}" wx:key="index" />
+          <image wx:for="{{authorityMsg.likeAvatarList}}" wx:key="index" src="{{item}}" class="miniAvatar" />
         </view>
       </view>
       <view class="right">
         <view class="date">{{filters.formatDate(authorityMsg.likeDate,5)}}</view>
-        <view class="unread">{{authorityMsg.likeCount}}</view>
+        <view class="unread" wx:if="{{authorityMsg.likeCount>0}}">{{authorityMsg.likeCount}}</view>
       </view>
     </view>
     <view class="base authority" bindtap="jump" data-url='notice'>
@@ -40,7 +40,7 @@
       </view>
       <view class="right">
         <view class="date">2023-3-14</view>
-        <view class="unread">10</view>
+        <view class="unread" wx:if="{{authorityMsg.messageCount>0}}">{{authorityMsg.messageCount}}</view>
       </view>
     </view>
     <view class="base user" wx:for="{{16}}" wx:key="index" data-id='10' bind:longpress="onLongPress"

+ 1 - 0
pages/message/index.wxss

@@ -83,6 +83,7 @@
   height: 38rpx;
   border-radius: 50rpx;
   margin-left: 4rpx;
+  background-color: #E4E1E1;
 }
 .messagePage .messageList .user .info {
   margin-top: 4rpx;

+ 1 - 1
pages/notice/index.js

@@ -1,6 +1,6 @@
 import {
   getMessageList
-} from '~/api/global'
+} from '~/api/message'
 import reachBottom from '~/mixins/reachBottom'
 Page({
   behaviors: [reachBottom],