index.wxml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <wxs src="../../utils/filter.wxs" module="filters" />
  2. <navigationBar></navigationBar>
  3. <import src="./index.skeleton" />
  4. <view class="messagePage">
  5. <view class="input" bindtap="setSearch">
  6. 查找昵称/学号/手机号
  7. </view>
  8. <view class="messageList">
  9. <view class="base authority" bindtap="jump" data-url='comment' wx:if="{{authorityMsg.postsCount>0}}">
  10. <image src="/static/message3.png" class="avatar" />
  11. <view class="body">
  12. <view class="name">评论</view>
  13. <view class="avatars">
  14. <image wx:for="{{authorityMsg.postsAvatarList}}" wx:key="index" src="{{item}}" class="miniAvatar" />
  15. </view>
  16. </view>
  17. <view class="right">
  18. <view class="date">{{filters.formatDate(authorityMsg.postsDate,5)}}</view>
  19. <view class="unread">{{authorityMsg.postsCount}}</view>
  20. </view>
  21. </view>
  22. <view class="base authority" bindtap="jump" data-url='like' wx:if="{{authorityMsg.likeCount>0}}">
  23. <image src="/static/zan.png" class="avatar" />
  24. <view class="body">
  25. <view class="name">赞</view>
  26. <view class="avatars">
  27. <image wx:for="{{authorityMsg.likeAvatarList}}" wx:key="index" src="{{item}}" class="miniAvatar" />
  28. </view>
  29. </view>
  30. <view class="right">
  31. <view class="date">{{filters.formatDate(authorityMsg.likeDate,5)}}</view>
  32. <view class="unread">{{authorityMsg.likeCount}}</view>
  33. </view>
  34. </view>
  35. <view class="base authority" bindtap="jump" data-url='notice'>
  36. <image src="/static/notice.png" class="avatar" />
  37. <view class="body">
  38. <view class="name">通知</view>
  39. </view>
  40. <view class="right">
  41. <view class="date"></view>
  42. <view class="unread" wx:if="{{authorityMsg.messageCount>0}}">{{authorityMsg.messageCount}}</view>
  43. </view>
  44. </view>
  45. <view class="base user" wx:for="{{authorityMsg.topList}}" wx:key="index" data-item='{{item}}' data-top="{{true}}"
  46. bind:longpress="onLongPress" hover-class='pressHover' bindtap="jumpChat">
  47. <image src="{{item.user.avatar}}" class="avatar" />
  48. <view class="body">
  49. <view class="name textOver">{{item.user.nickName||item.user.eid}}</view>
  50. <view class="info textOver">
  51. {{item.content}}
  52. </view>
  53. </view>
  54. <view class="right">
  55. <view class="date">{{filters.formatDate(item.gmtModified,5)}}</view>
  56. <view class="unread" wx:if="{{item.unReadCount>0}}">{{item.unReadCount}}</view>
  57. </view>
  58. </view>
  59. <view class="skeleton" wx:if="{{loading}}">
  60. <template is='skeleton'></template>
  61. </view>
  62. <block wx:else>
  63. <view class="base user" wx:for="{{list}}" wx:key="index" data-item='{{item}}' data-top="{{false}}"
  64. bind:longpress="onLongPress" hover-class='pressHover' bindtap="jumpChat">
  65. <image src="{{item.user.avatar}}" class="avatar" />
  66. <view class="body">
  67. <view class="name textOver">{{item.user.nickName||item.user.eid}}</view>
  68. <view class="info textOver">
  69. {{item.content}}
  70. </view>
  71. </view>
  72. <view class="right">
  73. <view class="date">{{filters.formatDate(item.gmtModified,5)}}</view>
  74. <view class="unread" wx:if="{{item.unReadCount>0}}">{{item.unReadCount}}</view>
  75. </view>
  76. </view>
  77. </block>
  78. </view>
  79. <view class="menuBg" bind:touchstart="cancelMenu" wx:if="{{menu.show}}"></view>
  80. <view class="menu" style="display: {{menu.show?'block':'none'}}; top:{{menu.top}}px;left:{{menu.left}}px">
  81. <view class="menu-one" bindtap="msgTopping">
  82. <image src="/static/istop.png" class="icon" />{{isTop?'取消置顶':'置顶该聊天'}}
  83. </view>
  84. <!-- <view bindtap="delMessage">
  85. <image src="/static/del.png" class="icon" />
  86. 删除该聊天
  87. </view> -->
  88. </view>
  89. </view>