articleList.vue 2.0 KB

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