topicDetail.wxml 2.5 KB

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