普兆健康管家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.5 KiB

  1. <template>
  2. <view>
  3. <view class="flex header">
  4. <view class="title">推荐检测</view>
  5. <button class="btn flex"><text style="margin-right: 4rpx;">查看全部</text><uv-icon name="arrow-right" color="#C6C6C6" size="24rpx"></uv-icon></button>
  6. </view>
  7. <view class="content">
  8. <productCard v-for="item in list" :key="item.id" :data="item"></productCard>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import productCard from '@/pages_order/product/productCard.vue'
  14. export default {
  15. components: {
  16. productCard,
  17. },
  18. data() {
  19. return {
  20. list: [],
  21. }
  22. },
  23. mounted() {
  24. this.list = [
  25. {
  26. id: '001',
  27. url: '',
  28. name: '月度装定制营养包',
  29. sales: 24770,
  30. price: 688.00,
  31. originalPrice: 1664,
  32. },
  33. {
  34. id: '002',
  35. url: '',
  36. name: '月度装定制营养包',
  37. sales: 24770,
  38. price: 688.00,
  39. originalPrice: 1664,
  40. },
  41. ]
  42. },
  43. }
  44. </script>
  45. <style scoped lang="scss">
  46. .header {
  47. justify-content: space-between;
  48. .title {
  49. font-family: PingFang SC;
  50. font-weight: 600;
  51. font-size: 36rpx;
  52. line-height: 1.2;
  53. color: #252545;
  54. }
  55. .btn {
  56. font-family: PingFang SC;
  57. font-weight: 400;
  58. font-size: 24rpx;
  59. line-height: 1.4;
  60. color: #A8A8A8;
  61. }
  62. }
  63. .content {
  64. margin-top: 24rpx;
  65. display: grid;
  66. grid-template-columns: repeat(2, 1fr);
  67. grid-column-gap: 32rpx;
  68. }
  69. </style>