xiang_qing.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view>
  3. <u-navbar :autoBack="true" :title="title" bgColor="rgba(255,255,255,255)" :placeholder="true" titleStyle="font-weight:bold;color:#121212"></u-navbar>
  4. <view class="ad">
  5. <view class="box_22" v-for="(item, index) in projectList" :key="item.id">
  6. <view class="block_5">
  7. <image style="width: 100%; height: 100%; border-radius: 0 50rpx 0 20rpx" :src="item.thumbnail"></image>
  8. <view class="tag_1">
  9. <text lines="1" class="text_9">{{ item.type_text }}</text>
  10. </view>
  11. <view class="tag_2">
  12. <text lines="1" class="text_10">{{ item.title }}</text>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. let that;
  21. export default {
  22. data() {
  23. return { main_body_id: '', title: '', projectList: [] };
  24. },
  25. onLoad(o) {
  26. that = this;
  27. this.title = o.title;
  28. this.main_body_id = this.$db.get('main_body_id');
  29. console.log(o);
  30. this.getContentList(o);
  31. },
  32. methods: {
  33. // 主体栏目内容列表查看更多
  34. getContentList(o) {
  35. this.$api.getContentList(
  36. {
  37. model_id: o.id /* 模型id */,
  38. main_body_id: this.main_body_id,
  39. main_body_column_id: o.main_body_column_id /* 栏目id */,
  40. page: '1',
  41. pageSize: '10'
  42. },
  43. function (res) {
  44. console.log(res, '内容列表更多');
  45. that.projectList = res.data;
  46. }
  47. );
  48. }
  49. }
  50. };
  51. </script>
  52. <style>
  53. .ad {
  54. margin: 20rpx 32rpx 0 32rpx;
  55. }
  56. .box_22 {
  57. height: 345rpx;
  58. display: flex;
  59. flex-direction: column;
  60. width: 686rpx;
  61. margin-bottom: 50rpx;
  62. }
  63. .block_5 {
  64. position: relative;
  65. height: 345rpx;
  66. width: 686rpx;
  67. display: flex;
  68. flex-direction: column;
  69. }
  70. .tag_1 {
  71. position: absolute;
  72. background-color: rgba(77, 113, 153, 1);
  73. border-radius: 9rpx 9rpx 32rpx 0rpx;
  74. height: 48rpx;
  75. display: flex;
  76. flex-direction: column;
  77. width: 86rpx;
  78. }
  79. .tag_2 {
  80. position: absolute;
  81. bottom: 36rpx;
  82. right: 20rpx;
  83. }
  84. .text_10 {
  85. width: 147rpx;
  86. height: 29rpx;
  87. overflow-wrap: break-word;
  88. color: #ffffff;
  89. font-size: 34rpx;
  90. font-family: Adobe Heiti Std R;
  91. font-weight: normal;
  92. text-align: left;
  93. white-space: nowrap;
  94. line-height: 30rpx;
  95. }
  96. .text_9 {
  97. width: 47rpx;
  98. height: 23rpx;
  99. overflow-wrap: break-word;
  100. color: rgba(255, 255, 255, 1);
  101. font-size: 24rpx;
  102. font-family: SourceHanSansCN-Bold;
  103. font-weight: 700;
  104. text-align: left;
  105. white-space: nowrap;
  106. line-height: 24rpx;
  107. margin: 12rpx 0 0 19rpx;
  108. }
  109. </style>