lessongroup.wxml 6.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!-- 课程组 -->
  2. <view class="fui-lesson-group block" style="margin:{{style.areaMargin.top*2}}rpx {{style.areaMargin.right*2}}rpx {{style.areaMargin.bottom*2}}rpx {{style.areaMargin.left*2}}rpx;background-color: {{style.areaBackground}};">
  3. <!-- 两列 -->
  4. <block wx:if="{{column == 'two'}}" >
  5. <block wx:for="{{list}}" wx:for-item="item" wx:key="index">
  6. <view class="fui-lesson-item lesson-two" bindtap="goNovaURL" data-id="{{item.objectId}}" data-url="{{item.url}}"
  7. style="width: {{style.width}}%;height: {{style.height*2}}rpx;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;background-color: {{style.background}};border-radius: {{style.borderRadius*2}}rpx;">
  8. <view class="lesson_image">
  9. <image class="image" src="{{item.image || 'https://img01.yzcdn.cn/vant/empty-image-default.png'}}" alt="" mode="scaleToFill"
  10. style="width: {{style.imgWidth*2}}rpx;height: {{style.imgHeight*2}}rpx;margin-right: {{style.imgmarginRight*2}}rpx;border-radius: {{style.imgborderRadius*2}}rpx;"/>
  11. </view>
  12. <view class="info" style="width: {{style.lessoninfoWidth*2}}rpx">
  13. <view class="name" style="color: {{style.nameColor}};font-size: {{style.namefontSize*2}}rpx;font-weight: {{style.namefontWeight}};margin-bottom: {{style.namemarginBottom*2}}rpx;">
  14. {{ item.title }}
  15. </view>
  16. <view class="teacher" wx:if="{{block.showTeacher == 'true'}}"
  17. style="color: {{style.teachernameColor}};font-size: {{style.teacherfontSize*2}}rpx;font-weight: {{style.teacherfontWeight}};">
  18. {{ item.teacher }}
  19. </view>
  20. <view class="desc" wx:if="{{block.showDesc == 'true'}}" style="color: {{style.descColor}};font-size: {{style.descfontSize*2}}rpx;margin-bottom: {{style.descmarginBottom*2}}rpx;">
  21. {{ item.desc }}
  22. </view>
  23. <view class="tags" style="{'margin-bottom': style.tagmarginBottom rpx}">
  24. <block wx:if="{{item.tag && item.tag.length > 0}}">
  25. <block wx:for="{{item.tag}}" wx:for-item="tag" wx:key="index">
  26. <view class="tag" style="background:{{style.tagColor}}">{{tag}}</view>
  27. </block>
  28. </block>
  29. </view>
  30. <view class="buy_group">
  31. <view class="price" wx:if="{{block.showPrice == 'true'}}" style="color: {{style.priceColor}};">
  32. ¥{{ item.price }}
  33. <view wx:if="{{block.showOriginalPrice == 'true'}}" style=" color: {{style.opriceColor}};">¥{{
  34. item.originalPrice }}</view>
  35. </view>
  36. <view class="btn" wx:if="{{block.showButton == 'true'}}" bindtap="goNovaURL" data-id="{{item.objectId}}" data-url="{{item.url}}"
  37. style="width: {{style.buttonWidth*2}}rpx;height: {{style.buttonHeight*2}}rpx;line-height: {{style.buttonHeight*2}}rpx;font-size: {{style.buttonfontSize*2}}rpx;color: {{style.buttonColor}};background-color: {{style.buttonBackground}};border-radius: {{style.buttonborderRadius*2}}rpx;">
  38. {{style.buttonText}}
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </block>
  44. </block>
  45. <!-- 一列 -->
  46. <block wx:if="{{column == 'one'}}">
  47. <block wx:for="{{list}}" wx:for-item="item" wx:key="index">
  48. <view class="fui-lesson-item lesson-one" bindtap="goNovaURL" data-id="{{item.objectId}}" data-url="{{item.url}}"
  49. style="width: {{style.width}}%;height: {{style.height*2}}rpx;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;background-color: {{style.background}};border-radius: {{style.borderRadius*2}}rpx;">
  50. <view class="lesson_image">
  51. <image class="image" src="{{item.image || 'https://img01.yzcdn.cn/vant/empty-image-default.png'}}" alt="" mode="scaleToFill"
  52. style="width: {{style.imgWidth*2}}rpx;height: {{style.imgHeight*2}}rpx;margin-right: {{style.imgmarginRight*2}}rpx;border-radius: {{style.imgborderRadius*2}}rpx;"/>
  53. </view>
  54. <view class="info" style="width: {{style.lessoninfoWidth*2}}rpx">
  55. <view class="name" style="color: {{style.nameColor}};font-size: {{style.namefontSize*2}}rpx;font-weight: {{style.namefontWeight}};margin-bottom: {{style.namemarginBottom}}rpx;">
  56. {{ item.title }}
  57. </view>
  58. <view class="teacher" wx:if="{{block.showTeacher == 'true'}}" style="color: {{style.teachernameColor}};font-size: {{style.teacherfontSize*2}}rpx;font-weight: {{style.teacherfontWeight}};">{{ item.teacher }}</view>
  59. <view class="desc" wx:if="{{block.showDesc == 'true'}}" style="color: {{style.descColor}};font-size: {{style.descfontSize*2}}rpx;margin-bottom: {{style.descmarginBottom}};">{{ item.desc }}</view>
  60. <view class="tags" style="{'margin-bottom': style.tagmarginBottom rpx}">
  61. <block wx:if="{{item.tag && item.tag.length > 0}}">
  62. <block wx:for="{{item.tag}}" wx:for-item="tag" wx:key="index">
  63. <view class="tag" style="background:{{style.tagColor}}">{{tag}}</view>
  64. </block>
  65. </block>
  66. </view>
  67. <view class="buy_group">
  68. <view class="price" wx:if="{{block.showPrice == 'true'}}" style="color: {{style.priceColor}};">¥{{ item.price }}
  69. <view wx:if="{{block.showOriginalPrice == 'true'}}" style="color: {{style.opriceColor}};" >¥{{item.originalPrice }}</view>
  70. </view>
  71. <view class="btn" wx:if="{{block.showButton == 'true'}}" bindtap="goNovaURL" data-id="{{item.objectId}}" data-url="{{item.url}}"
  72. style="width: {{style.buttonWidth*2}}rpx;height: {{style.buttonHeight*2}}rpx;line-height: {{style.buttonHeight*2}}rpx;font-size: {{style.buttonfontSize*2}}rpx;color: {{style.buttonColor}};background-color: {{style.buttonBackground}};border-radius: {{style.buttonborderRadius*2}}rpx;">{{style.buttonText}}</view>
  73. </view>
  74. </view>
  75. </view>
  76. </block>
  77. </block>
  78. </view>