普兆健康管家前端代码仓库
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.

76 lines
1.5 KiB

  1. <template>
  2. <view class="view">
  3. <view v-for="item in list" :key="item.id">
  4. <productCard
  5. :data="item"
  6. cardStyle="width: 100%; height: 210px;"
  7. imgStyle="width: 100%; height: 110px;"
  8. ></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. id: '003',
  43. url: '',
  44. name: '腹部超声',
  45. sales: 24770,
  46. price: 688.00,
  47. originalPrice: 1664,
  48. },
  49. ]
  50. },
  51. methods: {
  52. onLevel1TabChange(e) {
  53. console.log('level1', e.index)
  54. this.level1 = e.index
  55. this.level2 = this.tabs[this.level1].children?.length ? 0 : null
  56. // todo
  57. },
  58. onLevel2TabChange(e) {
  59. console.log('level2', e.index)
  60. this.level2 = e.index
  61. // todo
  62. },
  63. },
  64. }
  65. </script>
  66. <style scoped lang="scss">
  67. .view {
  68. padding: 0 32rpx 24rpx 32rpx;
  69. display: grid;
  70. grid-template-columns: repeat(2, 1fr);
  71. gap: 32rpx;
  72. }
  73. </style>