content.wxml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <!-- components/diy-content/content.wxml -->
  2. <block wx:if="{{column == 'template1'}}">
  3. <view class="one_index" style="width:{{style.width}}%;background:{{style.background}};margin:{{style.margin.top * 2}}rpx {{style.margin.right * 2}}rpx {{style.margin.bottom * 2}}rpx {{style.margin.left * 2}}rpx;padding:{{style.padding.top * 2}}rpx {{style.padding.right * 2}}rpx {{style.padding.bottom * 2}}rpx {{style.padding.left * 2}}rpx;border-radius: {{style.borderRadius * 2}}rpx;">
  4. <block wx:for="{{list}}" wx:key="index" wx:for-item="contents">
  5. <view class="one_info" bindtap="goNovaURL" data-id="{{item.objectId}}" data-url="{{item.url}}" style="width:{{style.articleWidth}}%;background:{{style.articleBackground}};margin:{{style.articleMargin.top * 2}}rpx {{style.articleMargin.right * 2}}rpx {{style.articleMargin.bottom * 2}}rpx {{style.articleMargin.left * 2}}rpx;padding:{{style.articlePadding.top * 2}}rpx {{style.articlePadding.right * 2}}rpx {{style.articlePadding.bottom * 2}}rpx {{style.articlePadding.left * 2}}rpx;border-radius: {{style.articleBorderRadius * 2}}rpx;">
  6. <image class="one_image" style="border-radius: {{style.articleBorderRadius * 2}}rpx {{style.articleBorderRadius * 2}}rpx 0 0;" src="{{contents.image}}" mode="widthFix" lazy-load="false" binderror="" bindload="" />
  7. <view class="one_name" style="font-size:{{style.titleSize * 2}}rpx;color:{{style.titleColor}}">
  8. {{contents.title}}
  9. </view>
  10. <view class="tags" wx:if="{{data.showTag}}">
  11. <block wx:for="{{contents.tag}}" wx:key="index">
  12. <van-tag color="#ffe1e1" text-color="#000000" custom-class="tag">
  13. #{{item}}
  14. </van-tag>
  15. </block>
  16. </view>
  17. <view class="one_down">
  18. <view class="reading">
  19. <view class="read">阅读 {{contents.pageView}}</view>
  20. <view class="autor" style="font-size:{{style.autorSize * 2}}rpx" wx:if="{{data.showAuth}}">
  21. 作者:{{contents.author_name ? contents.author_name : '暂无'}}
  22. </view>
  23. </view>
  24. <view class="praise" wx:if="{{data.showLike}}">
  25. <van-icon name="like-o" size="24rpx" />
  26. {{contents.likeCount}}
  27. </view>
  28. </view>
  29. </view>
  30. </block>
  31. </view>
  32. </block>
  33. <block wx:if="{{column == 'template2'}}">
  34. <view class="two_index" style="width:{{style.width}}%;background:{{style.background}};margin:{{style.margin.top * 2}}rpx {{style.margin.right * 2}}rpx {{style.margin.bottom * 2}}rpx {{style.margin.left * 2}}rpx;padding:{{style.padding.top * 2}}rpx {{style.padding.right * 2}}rpx {{style.padding.bottom * 2}}rpx {{style.padding.left * 2}}rpx;border-radius: {{style.borderRadius * 2}}rpx;">
  35. <block wx:for="{{list}}" wx:key="index" wx:for-item="contents">
  36. <view class="two_info" bindtap="goNovaURL" data-id="{{item.objectId}}" data-url="{{item.url}}" style="border-radius: {{style.articleBorderRadius * 2}}rpx;width:{{style.articleWidth}}%;margin:{{style.articleMargin.top * 2}}rpx {{style.articleMargin.right * 2}}rpx {{style.articleMargin.bottom * 2}}rpx {{style.articleMargin.left * 2}}rpx;padding:{{style.articlePadding.top * 2}}rpx {{style.articlePadding.right * 2}}rpx {{style.articlePadding.bottom * 2}}rpx {{style.articlePadding.left * 2}}rpx;background:{{style.articleBackground}}">
  37. <image class="two_image" style="border-radius: {{style.articleBorderRadius * 2}}rpx {{style.articleBorderRadius * 2}}rpx 0 0;" src="{{contents.image}}" mode="widthFix" lazy-load="false" binderror="" bindload="" />
  38. <view class="two_name" style="font-size:{{style.titleSize * 2}}rpx;color:{{style.titleColor}}">
  39. {{contents.title}}
  40. </view>
  41. <view class="tags" wx:if="{{data.showTag}}">
  42. <block wx:for="{{contents.tag}}" wx:key="index">
  43. <van-tag color="#ffe1e1" text-color="#000000" custom-class="tag">
  44. #{{item}}
  45. </van-tag>
  46. </block>
  47. </view>
  48. <view class="two_down">
  49. <view class="reading">
  50. <view class="read">阅读 {{contents.pageView}}</view>
  51. <view class="autor" style="font-size:{{style.autorSize * 2}}rpx" wx:if="{{data.showAuth}}">
  52. 作者:{{contents.author_name ? contents.author_name : '暂无'}}
  53. </view>
  54. </view>
  55. <view class="praise" wx:if="{{data.showLike}}">
  56. <van-icon name="like-o" size="24rpx" />
  57. {{contents.likeCount}}
  58. </view>
  59. </view>
  60. </view>
  61. </block>
  62. </view>
  63. </block>
  64. <block wx:if="{{column == 'template3'}}">
  65. <scroll-view scroll-x="true" style="width:{{style.width}}%;background:{{style.background}};margin:{{style.margin.top * 2}}rpx {{style.margin.right * 2}}rpx {{style.margin.bottom * 2}}rpx {{style.margin.left * 2}}rpx;padding:{{style.padding.top * 2}}rpx {{style.padding.right * 2}}rpx {{style.padding.bottom * 2}}rpx {{style.padding.left * 2}}rpx;border-radius: {{style.borderRadius * 2}}rpx;">
  66. <view class="three_index">
  67. <block wx:for="{{list}}" wx:key="index" wx:for-item="contents">
  68. <view class="three_info" bindtap="goNovaURL" data-id="{{item.objectId}}" data-url="{{item.url}}" style="border-radius: {{style.articleBorderRadius * 2}}rpx;width:{{style.articleWidth}}%;margin:{{style.articleMargin.top * 2}}rpx {{style.articleMargin.right * 2}}rpx {{style.articleMargin.bottom * 2}}rpx {{style.articleMargin.left * 2}}rpx;padding:{{style.articlePadding.top * 2}}rpx {{style.articlePadding.right * 2}}rpx {{style.articlePadding.bottom * 2}}rpx {{style.articlePadding.left * 2}}rpx;background:{{style.articleBackground}}">
  69. <image class="three_image" style="border-radius: {{style.articleBorderRadius * 2}}rpx {{style.articleBorderRadius * 2}}rpx 0 0;" src="{{contents.image}}" mode="widthFix" lazy-load="false" binderror="" bindload="" />
  70. <view class="three_name" style="font-size:{{style.titleSize * 2}}rpx;color:{{style.titleColor}}">
  71. {{contents.title}}
  72. </view>
  73. <view class="tags" wx:if="{{data.showTag}}">
  74. <block wx:for="{{contents.tag}}" wx:key="index">
  75. <van-tag color="#ffe1e1" text-color="#000000" custom-class="tag">
  76. #{{item}}
  77. </van-tag>
  78. </block>
  79. </view>
  80. <view class="three_down">
  81. <view class="reading">
  82. <view class="read">阅读 {{contents.pageView}}</view>
  83. <view class="autor" style="font-size:{{style.autorSize * 2}}rpx" wx:if="{{data.showAuth}}">
  84. 作者:{{contents.author_name ? contents.author_name : '暂无'}}
  85. </view>
  86. </view>
  87. <view class="praise" wx:if="{{data.showLike}}">
  88. <van-icon name="like-o" size="24rpx" />
  89. {{contents.likeCount}}
  90. </view>
  91. </view>
  92. </view>
  93. </block>
  94. </view>
  95. </scroll-view>
  96. </block>
  97. <!-- <block wx:if="{{column == 'template4'}}">
  98. <view class="four_index" style="width:{{styleFour.width}}%;margin:{{styleFour.margin * 2}}rpx auto;border-radius:{{styleFour.radius * 2}}rpx">
  99. <view class="four_info" style="background-image:url('{{fourTop.image}}');border-radius:{{styleFour.radius * 2}}rpx {{styleFour.radius * 2}}rpx 0 0;height:{{styleFour.height * 2}}rpx;">
  100. <view class="four_name" style="font-weight:{{styleFour.fontWeight}}">
  101. {{fourTop.name}}
  102. </view>
  103. <view class="tags" wx:if="{{styleFour.tags}}">
  104. <block wx:for="{{fourTop.tags}}" wx:key="index">
  105. <van-tag color="#e3e3e3" text-color="#000000" custom-class="tag">
  106. {{item.tag}}
  107. </van-tag>
  108. </block>
  109. <view class="reading" wx:if="{{styleFour.reading}}">阅读 {{fourTop.readingNum}}</view>
  110. <view class="praise" wx:if="{{styleFour.praise}}">
  111. <van-icon name="like-o" />
  112. {{fourTop.praiseNum}}
  113. </view>
  114. </view>
  115. </view>
  116. <block wx:for="{{fourTop.fourInfo}}" wx:key="index">
  117. <view class="down_info">
  118. <view class="left_info">
  119. <view class="name" style="font-weight:{{styleFour.fontWeight}}">
  120. {{item.name}}
  121. </view>
  122. <view class="tags" wx:if="{{styleFour.tags}}">
  123. <block wx:for="{{item.tags}}" wx:key="index">
  124. <van-tag color="#e3e3e3" text-color="#000000" custom-class="tag">
  125. {{item.tag}}
  126. </van-tag>
  127. </block>
  128. </view>
  129. <view class="four_down">
  130. <view class="reading" wx:if="{{styleFour.reading}}">
  131. 阅读 {{item.readingNum}}
  132. </view>
  133. <view class="praise" wx:if="{{styleFour.praise}}">
  134. <van-icon name="like-o" />
  135. {{item.praiseNum}}
  136. </view>
  137. </view>
  138. </view>
  139. <image class="four_image" style="width:{{styleFour.imageWidth * 2}}rpx;height:{{styleFour.imageHeight * 2}}rpx;border-radius:{{styleFour.imageRadius * 2}}rpx" src="{{item.image}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
  140. </view>
  141. </block>
  142. </view>
  143. </block> -->
  144. <block wx:if="{{column == 'template5'}}">
  145. <view class="five_index" style="width:{{style.width}}%;background:{{style.background}};margin:{{style.margin.top * 2}}rpx {{style.margin.right * 2}}rpx {{style.margin.bottom * 2}}rpx {{style.margin.left * 2}}rpx;padding:{{style.padding.top * 2}}rpx {{style.padding.right * 2}}rpx {{style.padding.bottom * 2}}rpx {{style.padding.left * 2}}rpx;border-radius: {{style.borderRadius * 2}}rpx;">
  146. <block wx:for="{{list}}" wx:key="index" wx:for-item="contents">
  147. <view class="five_info" bindtap="goNovaURL" data-id="{{contents.objectId}}" data-url="{{contents.url}}" data-pageView="{{contents.pageView}}" style="border-radius: {{style.articleBorderRadius * 2}}rpx;width:{{style.articleWidth}}%;margin:{{style.articleMargin.top * 2}}rpx {{style.articleMargin.right * 2}}rpx {{style.articleMargin.bottom * 2}}rpx {{style.articleMargin.left * 2}}rpx;padding:{{style.articlePadding.top * 2}}rpx {{style.articlePadding.right * 2}}rpx {{style.articlePadding.bottom * 2}}rpx {{style.articlePadding.left * 2}}rpx;background:{{style.articleBackground}}">
  148. <view class="left_info">
  149. <view class="name" style="font-size:{{style.titleSize * 2}}rpx;color:{{style.titleColor}}">
  150. {{contents.title}}
  151. </view>
  152. <view class="tags" wx:if="{{data.showTag}}">
  153. <block wx:for="{{contents.tag}}" wx:key="index">
  154. <van-tag color="#e3e3e3" text-color="#000000" custom-class="tag">
  155. #{{item}}
  156. </van-tag>
  157. </block>
  158. </view>
  159. <view class="five_down">
  160. <view class="reading">
  161. <view class="read">阅读 {{contents.pageView}}</view>
  162. <view class="autor" style="font-size:{{style.autorSize * 2}}rpx" wx:if="{{data.showAuth}}">
  163. 作者:{{contents.author_name ? contents.author_name : '暂无'}}
  164. </view>
  165. </view>
  166. <view class="praise" wx:if="{{data.showLike}}">
  167. <van-icon name="like-o" size="24rpx" />
  168. {{contents.likeCount}}
  169. </view>
  170. </view>
  171. </view>
  172. <image class="five_image" style="border-radius: 0 {{style.articleBorderRadius * 2}}rpx {{style.articleBorderRadius * 2}}rpx 0" src="{{contents.image}}" lazy-load="false" binderror="" bindload="" />
  173. </view>
  174. </block>
  175. </view>
  176. </block>