fY_xiangQing.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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: 2 /* 模型id */,
  49. main_body_id: 1,
  50. page: '1',
  51. },
  52. function (res) {
  53. that.projectList = res.data.list;
  54. console.log(that.projectList, '内容列表更多');
  55. }
  56. );
  57. },
  58. detailsBtn(i) {
  59. uni.navigateTo({
  60. url: `/pages/index2/fY_xiangQing/xiangMuXQ?id=${this.projectList[i].id}`
  61. });
  62. },
  63. backBtn() {
  64. console.log(11111);
  65. uni.navigateBack({
  66. delta: 1
  67. });
  68. }
  69. }
  70. };
  71. </script>
  72. <style>
  73. .box {
  74. width: 100%;
  75. height: 100vh;
  76. background: linear-gradient(180deg, rgba(240, 235, 222, 0.2) 0%, #f0ebde 5%, #f0ebde 100%);
  77. }
  78. .top_bg {
  79. width: 100%;
  80. position: absolute;
  81. color: #ffffff;
  82. z-index: 1;
  83. /* 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%); */
  84. }
  85. .zj_box {
  86. width: 100%;
  87. height: 60%;
  88. position: fixed;
  89. }
  90. .back {
  91. width: 12%;
  92. height: 15%;
  93. margin-left: 5%;
  94. margin-top: -2%;
  95. cursor: pointer;
  96. font-size: 12px;
  97. color: #8e6c4f;
  98. letter-spacing: 0.3em;
  99. }
  100. .qiehuan {
  101. position: absolute;
  102. top: 42%;
  103. left: 8%;
  104. z-index: 33;
  105. display: flex;
  106. justify-content: space-between;
  107. width: 87%;
  108. height: 8%;
  109. }
  110. .qh_btn {
  111. width: 3%;
  112. height: 65%;
  113. }
  114. .img {
  115. width: 100%;
  116. height: 100%;
  117. }
  118. /* 列表 */
  119. .harder_box {
  120. position: relative;
  121. z-index: 1;
  122. width: 100%;
  123. height: 25vh;
  124. }
  125. .itemImg {
  126. width: 100%;
  127. height: 100%;
  128. border-radius: 5px 25px 5px 25px;
  129. box-shadow: 0 3px 6px rgba(0, 0, 0, 0.56), -3px 0 6px rgba(0, 0, 0, 0.26);
  130. }
  131. .itemImg::before {
  132. content: '';
  133. position: absolute;
  134. top: 0;
  135. left: 0;
  136. width: 100%;
  137. height: 100%;
  138. box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), -3px 0 6px rgba(0, 0, 0, 0.16);
  139. z-index: -1;
  140. }
  141. .box_banner {
  142. width: 82%;
  143. height: 28%;
  144. /* height: 28%; */
  145. margin: auto;
  146. }
  147. .banner_img {
  148. position: absolute;
  149. top: 6%;
  150. left: 5%;
  151. width: 90%;
  152. height: 75%;
  153. }
  154. .banner_bgimg {
  155. position: relative;
  156. width: 100%;
  157. height: 100%;
  158. background: url('../../../static/img/bg_logo.png') no-repeat center;
  159. background-size: 100% 100%;
  160. }
  161. .box_item {
  162. width: 100%;
  163. height: 100%;
  164. display: flex;
  165. flex-wrap: wrap;
  166. }
  167. .banner_item {
  168. width: 23%;
  169. height: 120%;
  170. margin-bottom: 2%;
  171. position: relative;
  172. margin-left: 2%;
  173. }
  174. .item_tit {
  175. width: 90%;
  176. position: absolute;
  177. top: 83%;
  178. left: 5%;
  179. text-align: center;
  180. z-index: 1;
  181. font-size: 10px;
  182. color: #fbfcdc;
  183. /* text-shadow: 0px 4px 0px #8e5938; */
  184. }
  185. </style>