index.wxml 3.9 KB

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