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

95 lines
2.0 KiB

  1. <template>
  2. <view class="view">
  3. <view>
  4. <view class="card" v-for="article in articleList" :key="article.id" @click="$utils.navigateTo(article.path)">
  5. <image class="card-img" :src="article.url" mode="scaleToFill"></image>
  6. </view>
  7. </view>
  8. <view class="ways__view">
  9. <view class="way flex flex-column" v-for="(way, wIdx) in wayList" :key="wIdx" @click="$utils.navigateTo(way.path)">
  10. <image class="way-icon" :src="way.url" mode="scaleToFill"></image>
  11. <view class="way-desc">{{ way.desc }}</view>
  12. <view class="way-title flex"><text style="margin-right: 4rpx;">{{ way.title }}</text><uv-icon name="arrow-right" color="#252545" size="24rpx"></uv-icon></view>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. props: {
  20. articleList: {
  21. type: Array,
  22. default() {
  23. return []
  24. }
  25. },
  26. wayList: {
  27. type: Array,
  28. default() {
  29. return []
  30. }
  31. },
  32. },
  33. }
  34. </script>
  35. <style scoped lang="scss">
  36. .view {
  37. padding: 24rpx 32rpx 0 32rpx;
  38. }
  39. .card {
  40. font-size: 0;
  41. overflow: hidden;
  42. border-radius: 32rpx;
  43. background-image: linear-gradient(to right, #FAFAFF, #F3F3F3);
  44. box-shadow: -5rpx -5rpx 20rpx 0 #FFFFFF,
  45. 10rpx 10rpx 20rpx 0 #AAAACC80,
  46. 4rpx 4rpx 10rpx 0 #AAAACC40,
  47. -2rpx -2rpx 5rpx 0 #FFFFFF;
  48. & + & {
  49. margin-top: 32rpx;
  50. }
  51. &-img {
  52. width: 100%;
  53. height: calc((100vw - 32rpx*2) * 129 / 343);
  54. }
  55. }
  56. .ways__view {
  57. margin-top: 80rpx;
  58. display: grid;
  59. grid-template-columns: repeat(3, 1fr);
  60. grid-column-gap: 24rpx;
  61. }
  62. .way {
  63. &-icon {
  64. width: 80rpx;
  65. height: 80rpx;
  66. }
  67. &-desc {
  68. margin-top: 24rpx;
  69. font-family: PingFang SC;
  70. font-size: 22rpx;
  71. font-weight: 400;
  72. line-height: 1.4;
  73. color: #989898;
  74. }
  75. &-title {
  76. font-family: PingFang SC;
  77. font-size: 24rpx;
  78. font-weight: 400;
  79. line-height: 1.4;
  80. color: #252545;
  81. }
  82. }
  83. </style>