fY_xiangQing.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="box">
  3. <view class="top_bg">
  4. <topBox></topBox>
  5. <view @click="backBtn" class="back">⬅返回上一级</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. pageSize: '10'
  39. },
  40. function (res) {
  41. that.projectList = res.data;
  42. console.log(that.projectList, '内容列表更多');
  43. }
  44. );
  45. },
  46. backBtn() {
  47. console.log(11111);
  48. uni.navigateBack({
  49. delta: 1
  50. });
  51. }
  52. }
  53. };
  54. </script>
  55. <style>
  56. .box {
  57. width: 100%;
  58. height: 100vh;
  59. background: linear-gradient(180deg, rgba(240, 235, 222, 0.2) 0%, #f0ebde 5%, #f0ebde 100%);
  60. }
  61. .top_bg {
  62. width: 100%;
  63. position: absolute;
  64. color: #ffffff;
  65. z-index: 1;
  66. /* 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%); */
  67. }
  68. .zj_box {
  69. width: 100%;
  70. height: 60%;
  71. position: fixed;
  72. }
  73. .back {
  74. width: 12%;
  75. height: 15%;
  76. margin-left: 5%;
  77. margin-top: -2%;
  78. cursor: pointer;
  79. font-size: 12px;
  80. color: #8e6c4f;
  81. letter-spacing: 0.3em;
  82. }
  83. .qiehuan {
  84. position: absolute;
  85. top: 42%;
  86. left: 8%;
  87. z-index: 33;
  88. display: flex;
  89. justify-content: space-between;
  90. width: 87%;
  91. height: 8%;
  92. }
  93. .qh_btn {
  94. width: 3%;
  95. height: 65%;
  96. }
  97. .img {
  98. width: 100%;
  99. height: 100%;
  100. }
  101. </style>