index.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="distributionShop">
  3. <!-- header -->
  4. <cu-custom isBack bgColor="bg-gradual-blue"><view slot="content">分销商品</view></cu-custom>
  5. <!-- section -->
  6. <view class="section flex justify-center flex-wrap">
  7. <view @click="handler" v-for="(item, index) in 10" :key="index" class="item bg-white radius padding">
  8. <image lazy-load="true" src="https://gd-hbimg.huaban.com/d478a9c4bd0167adae79806c6ccaa2d7f59ded5dd101-WmmTdI_fw658/format/webp" mode="aspectFit"></image>
  9. <view class="text-xl">商品名称</view>
  10. <view class="text-gray">销量:1000</view>
  11. <view class="flex justify-between">
  12. <view class="text-red text-price">
  13. <cu-price value="100" size="32" />
  14. </view>
  15. <text class="cuIcon-cart text-xl"></text>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data(){
  24. return {
  25. }
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. .distributionShop {
  31. .section {
  32. .item {
  33. width: calc(50vw - 60upx);
  34. box-sizing: border-box;
  35. margin: 15upx 30upx;
  36. image{
  37. width: calc(50vw - 60upx);
  38. height: calc(50vw - 60upx);
  39. }
  40. }
  41. .item:nth-child(2n + 1) {
  42. margin-left: 15upx;
  43. }
  44. .item:nth-child(2n + 1) {
  45. margin-right: 15upx;
  46. }
  47. }
  48. }
  49. </style>