myworks.wxml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <!--pages/user/myworks/myworks.wxml-->
  2. <wxs module="wxs">
  3. function formatDate(time) {
  4. var t = getDate(time);
  5. var tf = function(i){return (i < 10 ? '0' : '') + i};
  6. var year = t.getFullYear();
  7. var month = tf(t.getMonth() + 1);
  8. var day = tf(t.getDate());
  9. var hour = tf(t.getHours());
  10. var minute = tf(t.getMinutes());
  11. return month + '-' + day + ' ' + hour + ':' + minute;
  12. }
  13. module.exports.formatDate = formatDate;
  14. </wxs>
  15. <view class='user-works'>
  16. <view class='follow-details'>
  17. <view class='follow-info'>
  18. <view class='avatar-bg'>
  19. <view class='avatar-box'>
  20. <image class='avatar-image' src='https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg'></image>
  21. </view>
  22. <view class='occupation-title'>家长</view>
  23. </view>
  24. <view class='avatar-msg'>
  25. <view class='avatar-nickname'>木小雅</view>
  26. <view class='avatar-birthday'>1992年07月13日</view>
  27. <view class='avatar-address'>北京市,海淀区中关村三小</view>
  28. </view>
  29. </view>
  30. <view class='mine-category'>
  31. <view class='play-count'>
  32. <view>{{ 3232 }}</view>
  33. <view class='border-right'>
  34. <view class='play-img'>
  35. <image src='../../../static/image/play.png'></image>
  36. </view>
  37. <text>播放量</text>
  38. </view>
  39. </view>
  40. <view class='follow-count'>
  41. <view class='color'>{{ 5200 }}</view>
  42. <view class='border-right'>
  43. <view class='play-img'>
  44. <image src='../../../static/image/follow.png'></image>
  45. </view>
  46. <text>关注</text>
  47. </view>
  48. </view>
  49. <view class='point-count'>
  50. <view class='color'>{{ 300 }}</view>
  51. <view class='border-right'>
  52. <view class='play-img'>
  53. <image src='../../../static/image/point.png'></image>
  54. </view>
  55. <text>赞</text>
  56. </view>
  57. </view>
  58. <view class='flower-count'>
  59. <view class='color'>{{ 100 }}</view>
  60. <view class='border-right'>
  61. <view class='play-img'>
  62. <image src='../../../static/image/flower.png'></image>
  63. </view>
  64. <text>红花</text>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class='works-article' wx:for="{{ wareCards }}" wx:key="{{ index }}">
  70. <view class='user-info'>
  71. <view class='avatar-img'>
  72. <image src='{{ item.user.avatar }}'></image>
  73. </view>
  74. <view>
  75. <view class='user-name'>{{ item.user.wechatName }}</view>
  76. <view class='user-time'>{{ wxs.formatDate(item.userRead.gmtCreated) }}</view>
  77. </view>
  78. </view>
  79. <view class='video-preview' bindtap='toMyWorks' data-id='{{ item.userRead.id }}' data-title='{{ item.userRead.title }}'>
  80. <image src='{{ item.userRead.iconImg }}'></image>
  81. </view>
  82. <view class='content-title'>
  83. {{ item.userRead.title }}
  84. </view>
  85. <view class='content-detail'>
  86. <view class='left'>{{ item.userRead.summary }}</view>
  87. <view class='right'>
  88. <view class='right-detail'>
  89. <view class='play-img'>
  90. <image src='../../../static/image/hotPlays.png'></image>
  91. </view>
  92. <text>{{ item.userRead.playAmount }}</text>
  93. </view>
  94. <view class='right-detail'>
  95. <view class='point-img'>
  96. <image src='../../../static/image/like.png'></image>
  97. </view>
  98. <text>{{ item.userRead.likeAmount }}</text>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. </view>