commonItems.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="harder_box">
  3. <view class="box_banner">
  4. <view class="box_item">
  5. <view @click="detailsBtn(index)" class="banner_item" v-for="(item, index) in projectList" :key="item.index">
  6. <view class="banner_bgimg">
  7. <view class="banner_img">
  8. <image class="img" :src="item.image"></image>
  9. </view>
  10. </view>
  11. <view class="item_tit">{{ item.title }}</view>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. name: 'commonItems',
  20. props: {
  21. projectList: {
  22. type: Array,
  23. default: null
  24. },
  25. titList: {
  26. type: Array,
  27. default: null
  28. }
  29. },
  30. data() {
  31. return {
  32. // 闽南精神
  33. MnList: [
  34. {
  35. title: '人物名称',
  36. img: '/static/img/card_民俗宗教.png'
  37. },
  38. {
  39. title: '人物名称',
  40. img: '/static/img/card_民俗宗教.png'
  41. },
  42. {
  43. title: '人物名称',
  44. img: '/static/img/card_民俗宗教.png'
  45. },
  46. {
  47. title: '人物名称',
  48. img: '/static/img/card_民俗宗教.png'
  49. }
  50. ]
  51. };
  52. },
  53. onLoad() {
  54. console.log(this.titList, 555);
  55. },
  56. methods: {
  57. detailsBtn(i) {
  58. uni.navigateTo({
  59. url: `/pages/index2/fY_xiangQing/xiangMuXQ?id=${this.projectList[i].id}`
  60. });
  61. }
  62. }
  63. };
  64. </script>
  65. <style>
  66. .harder_box {
  67. position: relative;
  68. z-index: 1;
  69. width: 100%;
  70. height: 60vh;
  71. }
  72. .img {
  73. width: 100%;
  74. height: 100%;
  75. border-radius: 5px 25px 5px 25px;
  76. box-shadow: 0 3px 6px rgba(0, 0, 0, 0.56), -3px 0 6px rgba(0, 0, 0, 0.26);
  77. }
  78. .img::before {
  79. content: '';
  80. position: absolute;
  81. top: 0;
  82. left: 0;
  83. width: 100%;
  84. height: 100%;
  85. box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), -3px 0 6px rgba(0, 0, 0, 0.16);
  86. z-index: -1;
  87. }
  88. .box_banner {
  89. width: 82%;
  90. height: 28%;
  91. margin: auto;
  92. }
  93. .banner_img {
  94. position: absolute;
  95. top: 6%;
  96. left: 5%;
  97. width: 90%;
  98. height: 75%;
  99. }
  100. .banner_bgimg {
  101. position: relative;
  102. width: 100%;
  103. height: 100%;
  104. background: url('/static/img/bg_logo.png') no-repeat center;
  105. background-size: 100% 100%;
  106. }
  107. .box_item {
  108. width: 100%;
  109. height: 100%;
  110. display: flex;
  111. flex-wrap: wrap;
  112. }
  113. .banner_item {
  114. width: 23%;
  115. height: 120%;
  116. margin-bottom: 2%;
  117. position: relative;
  118. margin-left: 2%;
  119. }
  120. .item_tit {
  121. width: 90%;
  122. position: absolute;
  123. top: 83%;
  124. left: 5%;
  125. text-align: center;
  126. z-index: 1;
  127. font-size: 10px;
  128. color: #fbfcdc;
  129. /* text-shadow: 0px 4px 0px #8e5938; */
  130. }
  131. </style>