category.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="content">
  3. <view class="main">
  4. <view v-for="(item, index) in 10">
  5. <view class="first" v-if="index == 0">
  6. <view class="title">【鼎立足行】鼎立足行足垫走姿矫正器研发相关 纪录大揭秘</view>
  7. <view class="image"></view>
  8. <view class="time">更新时间:2021-12-06</view>
  9. </view>
  10. <view class="item flex" v-else>
  11. <view class="item-left"></view>
  12. <view class="item-right">
  13. <view class="item-font clamp">信愿行如三足鼎立,缺一不可</view>
  14. <view class="item-time">更新时间:2021-12-06</view>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import { getCategoryList } from '@/api/product.js';
  23. export default {
  24. data() {
  25. return {
  26. list: []
  27. };
  28. },
  29. onLoad() {
  30. this.loadData();
  31. },
  32. methods: {
  33. // 载入数据
  34. async loadData() {
  35. let obj = this;
  36. },
  37. navToList(sid, tid) {
  38. // 点击导航跳转到详细页面
  39. uni.navigateTo({
  40. url: '/pages/product/list?fid=' + this.currentId + '&sid=' + sid + '&tid=' + tid
  41. });
  42. }
  43. }
  44. };
  45. </script>
  46. <style lang="scss">
  47. page,
  48. .content {
  49. height: auto;
  50. min-height: 100%;
  51. background: #f5f5f5;
  52. }
  53. .main {
  54. margin-top: 20rpx;
  55. background: #ffffff;
  56. .first {
  57. padding: 50rpx 0 18rpx;
  58. margin: 0 22rpx;
  59. border-bottom: 1px solid #e0e0e0;
  60. .title {
  61. font-size: 32rpx;
  62. font-family: PingFang SC;
  63. font-weight: bold;
  64. color: #333333;
  65. }
  66. .image {
  67. width: 710rpx;
  68. height: 400rpx;
  69. background: #4cd964;
  70. margin-top: 20rpx;
  71. image {
  72. width: 100%;
  73. height: 100%;
  74. }
  75. }
  76. .time {
  77. margin-top: 20rpx;
  78. font-size: 26rpx;
  79. font-family: PingFang SC;
  80. font-weight: 500;
  81. color: #666666;
  82. }
  83. }
  84. .item {
  85. padding: 26rpx 0 18rpx;
  86. margin: 0 22rpx;
  87. justify-content: flex-start;
  88. align-items: flex-start;
  89. border-bottom: 1px solid #e0e0e0;
  90. .item-left {
  91. width: 224rpx;
  92. height: 160rpx;
  93. background: #DC4D46;
  94. image {
  95. width: 100%;
  96. height: 100%;
  97. }
  98. }
  99. .item-right {
  100. height: 160rpx;
  101. margin-left: 24rpx;
  102. padding: 18rpx 0;
  103. display: flex;
  104. flex-direction: column;
  105. justify-content: space-between;
  106. .item-font {
  107. font-size: 32rpx;
  108. font-family: PingFang SC;
  109. font-weight: bold;
  110. color: #333333;
  111. }
  112. .item-time {
  113. font-size: 28rpx;
  114. font-family: PingFang SC;
  115. font-weight: 500;
  116. color: #666666;
  117. }
  118. }
  119. }
  120. }
  121. </style>