activity-review-list.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="精彩回顾" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <view class="fiex_top">
  5. <view class="" style="border: 1px solid #eba869; width: 670rpx; margin: auto; margin-top: 32rpx">
  6. <u-search
  7. bgColor="transparent"
  8. v-model="val"
  9. shape="square"
  10. :showAction="true"
  11. actionText="搜索"
  12. @custom="searchBtn"
  13. :actionStyle="{ color: '#985741', fontSize: '28rpx', fontWeight: 'bold', backgroundColor: '#fff9e9' }"
  14. ></u-search>
  15. </view>
  16. </view>
  17. <scroll-view v-if="list.length" style="height: 1200rpx; margin-left: 6rpx" scroll-y="true" @scrolltolower="LoadMore">
  18. <view class="wenwu_box">
  19. <view @click="detailsBtn(item.id)" class="" v-for="(item, index) in list" :key="item.id">
  20. <view class="gc_item">
  21. <view class="gc_box" style="">
  22. <image style="width: 100%; height: 100%; border-radius: 15rpx" :src="item.thumbnail"></image>
  23. </view>
  24. <view class="tit">{{ item.title }}</view>
  25. <!-- <view class="bg_box">湖里区</view> -->
  26. <!-- <u-badge type="primary" max="99" :value="item.district" :absolute="true" :offset="[10, 5]"></u-badge> -->
  27. </view>
  28. </view>
  29. </view>
  30. </scroll-view>
  31. <view v-else><u-empty mode="data" text="暂无数据"></u-empty></view>
  32. </view>
  33. </template>
  34. <script>
  35. let that;
  36. export default {
  37. data() {
  38. return {
  39. val: '',
  40. page: 1,
  41. list: [],
  42. isLoading: false
  43. };
  44. },
  45. onLoad() {
  46. that = this;
  47. this.getContentList();
  48. },
  49. methods: {
  50. detailsBtn(id) {
  51. uni.navigateTo({
  52. url: '/index_fenbao/XuanJiangYuan/activity-review-details?id=' + id
  53. });
  54. },
  55. getContentList(id) {
  56. this.isLoading = true;
  57. this.$api.getContentList(
  58. {
  59. page: this.page,
  60. pageSize: '10',
  61. model_id: 15,
  62. main_body_column_id: 186 ,
  63. keywords: this.val
  64. },
  65. data => {
  66. that.isLoading = false;
  67. that.list = [...that.list, ...data.data];
  68. }
  69. );
  70. },
  71. searchBtn() {
  72. this.page = 1;
  73. this.list = [];
  74. this.getContentList();
  75. },
  76. LoadMore() {
  77. if (this.isLoading) {
  78. return;
  79. } else {
  80. this.page++;
  81. this.getContentList();
  82. }
  83. },
  84. clear() {
  85. this.val = '';
  86. }
  87. }
  88. };
  89. </script>
  90. <style>
  91. .box {
  92. width: 100%;
  93. padding-bottom: 50rpx;
  94. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xbg_2.png');
  95. background-size: 100% 100%;
  96. background-attachment: fixed;
  97. background-repeat: repeat-y;
  98. height: auto;
  99. }
  100. .fiex_top {
  101. /* margin-bottom: 20rpx; */
  102. }
  103. .top_box {
  104. display: flex;
  105. width: 90%;
  106. margin: auto;
  107. justify-content: space-between;
  108. }
  109. .tit_box {
  110. display: flex;
  111. align-items: center;
  112. text-align: center;
  113. width: 215rpx;
  114. height: 56rpx;
  115. justify-content: space-around;
  116. border: 2rpx solid #eba869;
  117. }
  118. .tit {
  119. overflow: hidden;
  120. text-overflow: ellipsis;
  121. white-space: nowrap;
  122. }
  123. .wenwu_box {
  124. width: 92%;
  125. margin: auto;
  126. margin-top: 20rpx;
  127. display: flex;
  128. flex-flow: wrap;
  129. justify-content: space-between;
  130. }
  131. .gc_item {
  132. position: relative;
  133. width: 324rpx;
  134. color: #444444;
  135. /* font-weight: 900; */
  136. font-size: 32rpx;
  137. margin-top: 20rpx;
  138. font-family: 'MyGlobalFont';
  139. }
  140. .gc_box {
  141. width: 333rpx;
  142. height: 280rpx;
  143. }
  144. .bg_box {
  145. width: 184rpx;
  146. height: 62rpx;
  147. margin: auto;
  148. margin-top: 20rpx;
  149. line-height: 62rpx;
  150. color: #fef3e1;
  151. font-size: 28rpx;
  152. font-weight: 500;
  153. background-image: url('/static/img/tab.png');
  154. background-size: 100% 100%;
  155. }
  156. .u-search__action--active.data-v-0a306a29 {
  157. height: 60rpx !important;
  158. line-height: 60rpx !important;
  159. }
  160. .u-search__action--active.data-v-2d141374 {
  161. height: 60rpx !important;
  162. line-height: 60rpx !important;
  163. }
  164. </style>