topicDetail.wxml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <scroll-view class="container">
  2. <scroll-view class="content">
  3. <import src="../../lib/wxParse/wxParse.wxml" />
  4. <template is="wxParse" data="{{wxParseData:topicDetail.nodes}}" />
  5. </scroll-view>
  6. <scroll-view class="sv-goods" wx:if="{{topicGoods.length > 0 }}">
  7. <view class="topic-goods">
  8. <view class="h">
  9. <text class="t">专题商品</text>
  10. <van-icon class="i" bindtap="addCollectOrNot" name="star" wx:if="{{collect}}" color="#ab956d"/>
  11. <van-icon class="i" bindtap="addCollectOrNot" name="star-o" wx:else/>
  12. </view>
  13. <view class="b">
  14. <view class="item" wx:for="{{topicGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
  15. <navigator url="/pages/goods/goods?id={{item.id}}">
  16. <image class="img" src="{{item.picUrl}}" background-size="cover"></image>
  17. <view class="right">
  18. <view class="text">
  19. <text class="name">{{item.name}}</text>
  20. <text class="desc">{{item.brief}}</text>
  21. <text class="price">¥{{item.retailPrice}}</text>
  22. </view>
  23. </view>
  24. </navigator>
  25. </view>
  26. </view>
  27. </view>
  28. </scroll-view>
  29. <scroll-view class="comments">
  30. <view class="h">
  31. <text class="t">精选留言</text>
  32. <van-icon bindtap="postComment" class="i" name="comment-o" />
  33. </view>
  34. <view class="has-comments" wx:if="{{commentList.length > 0 }}">
  35. <view class="b">
  36. <view class="item" wx:for="{{commentList}}" wx:key="id">
  37. <view class="info">
  38. <view class="user">
  39. <image class="avatar" src="{{item.userInfo.avatarUrl}}"></image>
  40. <text class="nickname">{{item.userInfo.nickName}}</text>
  41. </view>
  42. <view class="time">{{item.addTime}}</view>
  43. </view>
  44. <view class="comment">
  45. {{item.content}}
  46. </view>
  47. </view>
  48. </view>
  49. <view class="load" wx:if="{{commentCount > 5}}">
  50. <navigator url="/pages/topicComment/topicComment?valueId={{topic.id}}&type=1">查看更多</navigator>
  51. </view>
  52. </view>
  53. <view class="no-comments" wx:if="{{commentList.length <= 0}}">
  54. <text class="txt">等你来留言</text>
  55. </view>
  56. </scroll-view>
  57. <scroll-view class="rec-box">
  58. <view class="h">
  59. <text class="txt">专题推荐</text>
  60. </view>
  61. <view class="b">
  62. <navigator class="item" wx:for="{{topicList}}" wx:key="id" url="../topicDetail/topicDetail?id={{item.id}}">
  63. <image class="img" src="{{item.picUrl}}"></image>
  64. <text class="title">{{item.title}}</text>
  65. </navigator>
  66. </view>
  67. </scroll-view>
  68. </scroll-view>