myconcern.wxml 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <wxs module="wxs">
  2. function formatDate(time) {
  3. var timeTemp = getDate(time);
  4. var timeString = timeTemp.toLocaleDateString() + timeTemp.toLocaleTimeString();
  5. return timeString.replace('/','-').replace('/','-').replace('上午',' ').replace('下午',' ');
  6. }
  7. module.exports.formatDate = formatDate;
  8. </wxs>
  9. <view class='my-concern'>
  10. <view class="concern-center">
  11. <view class='concern-info' wx:for="{{ fanList }}" wx:key="{{ index }}">
  12. <view class='avatar-box'>
  13. <image class='avatar-image' src="{{ item.user.avatar }}" />
  14. </view>
  15. <view class="avatar-name">
  16. <text class="nickName">{{ item.user.wechatName }}</text>
  17. <text class="time">{{ wxs.formatDate(item.fans.gmtCreated) }}</text>
  18. </view>
  19. <view class="avatar-follow" wx:if='{{ item.isEachOther }}'>
  20. <view class='avatar-img'>
  21. <image class='avatar-images' src="../../../static/image/concernback.png" />
  22. </view>
  23. <view class="follow-status">相互关注</view>
  24. </view>
  25. <view class="avatar-follow" wx:elif='{{ item.followBack === item.followBack || item.isEachOther }}'>
  26. <view class='avatar-img'>
  27. <image class='avatar-images' src="../../../static/image/concerned.png" />
  28. </view>
  29. <view class="follow-status">已关注</view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>