goodsgroup.wxml 5.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!-- 商品组 -->
  2. <view style="background:{{style.background}};width: 100%;padding:12rpx 0;">
  3. <!-- 一栏 -->
  4. <view wx:if="{{column == 'one'}}">
  5. <block wx:for="{{list}}" wx:for-item="goods" wx:key="index">
  6. <view bindtap="goNovaURL" data-id="{{goods.objectId}}" data-url="{{goods.url}}" class="goods-one" style="border-radius:{{style.borderRadius * 2}}rpx;width:{{style.width}}%;height:{{style.height * 2}}rpx;background:{{style.shopBackground}};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;">
  7. <view class="goods_img">
  8. <image class="image" src="{{goods.image || 'https://img01.yzcdn.cn/vant/empty-image-default.png'}}" alt="" mode="scaleToFill" style="height:{{style.imgheight * 2}}rpx;width:{{style.imgwidth * 2}}rpx;margin-right:{{style.imgmarginRight * 2}}rpx;border-radius:{{style.imgborderRadius * 2}}rpx;"
  9. />
  10. </view>
  11. <view class="detail" style="width:{{style.goodinfowidth * 2}}rpx;">
  12. <view class="name" style="color:{{style.nameColor}};font-size:{{style.namefontSize * 2}}rpx;font-weight:{{style.nameWeight}};margin-bottom:{{style.namemarginBottom * 2}}rpx">
  13. {{goods.name}}
  14. </view>
  15. <view class="desc name" style="color:{{style.descColor}};font-size:{{style.descfontSize * 2}}rpx;margin-bottom:{{style.descmarginBottom * 2}}rpx;">
  16. {{goods.desc}}
  17. </view>
  18. <view class="tags" style="margin-bottom:{{style.tagmarginBottom * 2}}rpx">
  19. <block wx:for="{{goods.tag}}" wx:key="t" wx:for-item="t">
  20. <van-tag class="tag" color="{{style.tagColor}}" type="primary">{{t}}</van-tag>
  21. </block>
  22. </view>
  23. <view class="bottom">
  24. <view class="price">
  25. <view style="color:{{style.priceColor}};font-size:{{style.pricefontSize * 2}}rpx;font-weight:{{style.pricefontWeight}};">
  26. ¥{{goods.price}}
  27. </view>
  28. <view style="color:{{style.opriceColor}};font-size:{{style.opricefontSize * 2}}rpx; margin-left: 10rpx;text-decoration: line-through;">
  29. ¥{{ goods.originalPrice }}
  30. </view>
  31. </view>
  32. <view class="pay" bindtap="goNovaURL" data-id="{{goods.objectId}}" data-url="{{goods.url}}">
  33. <view class="pay-title" style="background:{{style.buttonBackground}};color:{{style.buttonColor}};">
  34. 购买
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </block>
  41. </view>
  42. <!-- 两栏 -->
  43. <view wx:if="{{column == 'two'}}" class="fui-goods-group block" style="display: flex;flex-wrap: wrap;">
  44. <block wx:for="{{list}}" wx:for-item="goods" wx:key="index">
  45. <view bindtap="goNovaURL" data-id="{{goods.objectId}}" data-url="{{goods.url}}" class="goods-two" style="border-radius:{{style.borderRadius * 2}}rpx;width:{{style.width}}%;height:{{style.height * 2}}rpx;background:{{style.shopBackground}};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;">
  46. <view class="goods_img">
  47. <image class="image" src="{{goods.image || 'https://img01.yzcdn.cn/vant/empty-image-default.png'}}" alt="" mode="scaleToFill" style="height:{{style.imgheight * 2}}rpx;width:{{style.imgwidth * 2}}rpx;margin-right:{{style.imgmarginRight * 2}}rpx;border-radius:{{style.imgborderRadius * 2}}rpx;"
  48. />
  49. </view>
  50. <view class="detail" style="width:{{style.goodinfowidth * 2}}rpx;">
  51. <view class="name" style="-webkit-line-clamp: 1;color:{{style.nameColor}};font-size:{{style.namefontSize * 2}}rpx;font-weight:{{style.nameWeight}};margin-bottom:{{style.namemarginBottom * 2}}rpx">
  52. {{goods.name}}
  53. </view>
  54. <view class="price">
  55. <view style="color:{{style.priceColor}};font-size:{{style.pricefontSize * 2}}rpx;font-weight:{{style.pricefontWeight}};">
  56. ¥{{goods.price}}
  57. </view>
  58. <view style="color:{{style.opriceColor}};font-size:{{style.opricefontSize * 2}}rpx; margin-left: 10rpx;text-decoration: line-through;">
  59. ¥{{ goods.originalPrice }}
  60. </view>
  61. </view>
  62. <view class="sale_count" style="color:{{style.saleColor}};font-size:{{style.salefontSize * 2}}rpx;">
  63. 销量:{{item.sales || 123}}
  64. </view>
  65. <!-- <view class="pay" bindtap="goNovaURL" data-id="{{goods.objectId}}" data-url="{{goods.url}}">
  66. <view class="pay-title" style="background:{{style.buttonBackground}};color:{{style.buttonColor}};">
  67. 购买
  68. </view>
  69. </view> -->
  70. </view>
  71. </view>
  72. </block>
  73. </view>
  74. </view>