fY_xiangQing.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. <commonItems :projectList="projectList" class="box_item"></commonItems>
  9. </view>
  10. <!-- <view class="qiehuan">
  11. <view class="qh_btn">
  12. <image class="img" src="/static/img/left.png"></image>
  13. </view>
  14. <view class="qh_btn">
  15. <image class="img" src="/static/img/right.png"></image>
  16. </view>
  17. </view> -->
  18. </view>
  19. </template>
  20. <script>
  21. let that;
  22. export default {
  23. data() {
  24. return { projectList: [] };
  25. },
  26. onLoad(o) {
  27. console.log(o);
  28. that = this;
  29. this.getContentList();
  30. },
  31. methods: {
  32. getContentList(o) {
  33. this.$api.getContentList(
  34. {
  35. model_id: 2 /* 模型id */,
  36. main_body_id: 1,
  37. page: '1',
  38. },
  39. function (res) {
  40. that.projectList = res.data.list;
  41. console.log(that.projectList, '内容列表更多');
  42. }
  43. );
  44. },
  45. backBtn() {
  46. console.log(11111);
  47. uni.navigateBack({
  48. delta: 1
  49. });
  50. }
  51. }
  52. };
  53. </script>
  54. <style>
  55. .box {
  56. width: 100%;
  57. height: 100vh;
  58. background: linear-gradient(180deg, rgba(240, 235, 222, 0.2) 0%, #f0ebde 5%, #f0ebde 100%);
  59. }
  60. .top_bg {
  61. width: 100%;
  62. position: absolute;
  63. color: #ffffff;
  64. z-index: 1;
  65. /* 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%); */
  66. }
  67. .zj_box {
  68. width: 100%;
  69. height: 60%;
  70. position: fixed;
  71. }
  72. .back {
  73. width: 12%;
  74. height: 15%;
  75. margin-left: 5%;
  76. margin-top: -2%;
  77. cursor: pointer;
  78. font-size: 12px;
  79. color: #8e6c4f;
  80. letter-spacing: 0.3em;
  81. }
  82. .qiehuan {
  83. position: absolute;
  84. top: 42%;
  85. left: 8%;
  86. z-index: 33;
  87. display: flex;
  88. justify-content: space-between;
  89. width: 87%;
  90. height: 8%;
  91. }
  92. .qh_btn {
  93. width: 3%;
  94. height: 65%;
  95. }
  96. .img {
  97. width: 100%;
  98. height: 100%;
  99. }
  100. </style>