houDong.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="box">
  3. <view class="top_bg">
  4. <topBox></topBox>
  5. <view @click="backBtn" class="back" tabindex="0">返回上一级</view>
  6. </view>
  7. <view class="zj_box">
  8. <view class="harder_box box_item">
  9. <view class="box_banner">
  10. <view class="box_item">
  11. <view @click="detailsBtn(index)" class="banner_item" v-for="(item, index) in projectList" :key="item.index" tabindex="0">
  12. <view class="banner_bgimg">
  13. <view class="banner_img">
  14. <image class="itemImg" :src="item.image" mode="aspectFill"></image>
  15. </view>
  16. </view>
  17. <view class="item_tit">{{ item.title }}</view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- <view class="qiehuan">
  24. <view class="qh_btn">
  25. <image class="img" src="/static/img/left.png"></image>
  26. </view>
  27. <view class="qh_btn">
  28. <image class="img" src="/static/img/right.png"></image>
  29. </view>
  30. </view> -->
  31. </view>
  32. </template>
  33. <script>
  34. let that;
  35. export default {
  36. data() {
  37. return { projectList: [] };
  38. },
  39. onLoad(o) {
  40. console.log(o);
  41. that = this;
  42. this.getContentList();
  43. },
  44. methods: {
  45. getContentList(o) {
  46. this.$api.getContentList(
  47. {
  48. model_id: 18 /* 模型id */,
  49. main_body_id: 1,
  50. main_body_column_id: 290,
  51. page: '1',
  52. pageSize: '10'
  53. },
  54. function (res) {
  55. that.projectList = res.data.list;
  56. console.log(that.projectList, '内容列表更多');
  57. }
  58. );
  59. },
  60. detailsBtn(i) {
  61. uni.navigateTo({
  62. url: `/pages/index2/fY_xiangQing/xiangMuXQ?id=${this.projectList[i].id}`
  63. });
  64. },
  65. backBtn() {
  66. console.log(11111);
  67. uni.navigateBack({
  68. delta: 1
  69. });
  70. }
  71. }
  72. };
  73. </script>
  74. <style>
  75. .box {
  76. width: 100%;
  77. height: 100vh;
  78. background: linear-gradient(180deg, rgba(240, 235, 222, 0.2) 0%, #f0ebde 5%, #f0ebde 100%);
  79. }
  80. .top_bg {
  81. width: 100%;
  82. position: absolute;
  83. color: #ffffff;
  84. z-index: 1;
  85. /* background: linear-gradient(10deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2) 100%); */
  86. }
  87. .zj_box {
  88. width: 100%;
  89. height: 60%;
  90. position: fixed;
  91. }
  92. .back {
  93. width: 12%;
  94. height: 15%;
  95. margin-left: 5%;
  96. margin-top: -2%;
  97. cursor: pointer;
  98. font-size: 12px;
  99. color: #8e6c4f;
  100. letter-spacing: 0.3em;
  101. }
  102. .qiehuan {
  103. position: absolute;
  104. top: 42%;
  105. left: 8%;
  106. z-index: 33;
  107. display: flex;
  108. justify-content: space-between;
  109. width: 87%;
  110. height: 8%;
  111. }
  112. .qh_btn {
  113. width: 3%;
  114. height: 65%;
  115. }
  116. .img {
  117. width: 100%;
  118. height: 100%;
  119. }
  120. /* 列表 */
  121. .harder_box {
  122. position: relative;
  123. z-index: 1;
  124. width: 100%;
  125. height: 25vh;
  126. }
  127. .itemImg {
  128. width: 100%;
  129. height: 100%;
  130. border-radius: 5px 25px 5px 25px;
  131. box-shadow: 0 3px 6px rgba(0, 0, 0, 0.56), -3px 0 6px rgba(0, 0, 0, 0.26);
  132. }
  133. .itemImg::before {
  134. content: '';
  135. position: absolute;
  136. top: 0;
  137. left: 0;
  138. width: 100%;
  139. height: 100%;
  140. box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), -3px 0 6px rgba(0, 0, 0, 0.16);
  141. z-index: -1;
  142. }
  143. .box_banner {
  144. width: 82%;
  145. height: 28%;
  146. /* height: 28%; */
  147. margin: auto;
  148. }
  149. .banner_img {
  150. position: absolute;
  151. top: 6%;
  152. left: 5%;
  153. width: 90%;
  154. height: 75%;
  155. }
  156. .banner_bgimg {
  157. position: relative;
  158. width: 100%;
  159. height: 100%;
  160. background: url('../../../static/img/bg_logo.png') no-repeat center;
  161. background-size: 100% 100%;
  162. }
  163. .box_item {
  164. width: 100%;
  165. height: 100%;
  166. display: flex;
  167. flex-wrap: wrap;
  168. }
  169. .banner_item {
  170. width: 23%;
  171. height: 120%;
  172. margin-bottom: 2%;
  173. position: relative;
  174. margin-left: 2%;
  175. }
  176. .item_tit {
  177. width: 90%;
  178. position: absolute;
  179. top: 83%;
  180. left: 5%;
  181. text-align: center;
  182. z-index: 1;
  183. font-size: 10px;
  184. color: #fbfcdc;
  185. /* text-shadow: 0px 4px 0px #8e5938; */
  186. }
  187. </style>