FaLv.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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="" style="border: 1px solid #eba869; width: 670rpx; margin: auto; margin-top: 32rpx">
  5. <u-search
  6. bgColor="transparent"
  7. v-model="val"
  8. shape="square"
  9. :showAction="true"
  10. actionText="搜索"
  11. @custom="searchBtn"
  12. :actionStyle="{ color: '#985741', fontSize: '28rpx', fontWeight: 'bold', backgroundColor: '#fff9e9' }"
  13. ></u-search>
  14. </view>
  15. <view class="fg_box" @click="lawBtn(item.id)" v-for="item in lawList" :key="item.id">
  16. <view class="">
  17. <image style="width: 180rpx; height: 266rpx" src="https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/fg_img.png"></image>
  18. </view>
  19. <view class="">
  20. <view class="title">{{ item.title }}</view>
  21. <view style="font-size: 24rpx; color: rgba(68, 68, 68, 0.4)">{{ item.create_date }}</view>
  22. </view>
  23. <view class="">
  24. <image :src="item.img" style="width: 40rpx; height: 40rpx"></image>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. let that;
  31. export default {
  32. data() {
  33. return {
  34. val: '',
  35. lawList: []
  36. };
  37. },
  38. onLoad() {
  39. that = this;
  40. this.getArchives();
  41. },
  42. methods: {
  43. getArchives() {
  44. uni.request({
  45. url: 'https://huli-app.wenlvti.net/addons/cms/api.archives/index',
  46. data: {
  47. page: 1,
  48. channel: 35,
  49. model: -1,
  50. menu_index: 1
  51. },
  52. success: function (res) {
  53. that.lawList = res.data.data.pageList.data;
  54. // console.log(that.lawList, 545);
  55. }
  56. });
  57. },
  58. searchBtn() {
  59. uni.request({
  60. url: 'https://huli-app.wenlvti.net//addons/cms/api.search/index',
  61. data: {
  62. model: 6,
  63. page: 1,
  64. orderby: 'default',
  65. orderway: 'asc',
  66. q: this.val
  67. },
  68. success: function (res) {
  69. console.log(res, 545);
  70. that.lawList = res.data.data.pageList.data;
  71. }
  72. });
  73. },
  74. lawBtn(id) {
  75. uni.navigateTo({
  76. url: '/index_fenbao/fuWu/FaLv/XiangQing?id=' + id
  77. });
  78. }
  79. }
  80. };
  81. </script>
  82. <style>
  83. .box {
  84. width: 100%;
  85. padding-bottom: 50rpx;
  86. /* background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xbg_2.png');
  87. background-size: 100% 100%;
  88. background-attachment: fixed;
  89. background-repeat: repeat-y; */
  90. min-height: 100%;
  91. height: auto;
  92. background-color: #fff9e9;
  93. }
  94. /deep/.u-input--radius.data-v-113bc24f,
  95. .u-input--square.data-v-113bc24f {
  96. border: 1px solid #eba869 !important;
  97. }
  98. .fg_box {
  99. display: flex;
  100. align-items: center;
  101. justify-content: space-around;
  102. margin: auto;
  103. margin-top: 40rpx;
  104. width: 670rpx;
  105. height: 322rpx;
  106. border: 2rpx solid #ebc9a9;
  107. }
  108. .title {
  109. width: 346rpx;
  110. /* height: 96rpx; */
  111. font-size: 32rpx;
  112. color: #444444;
  113. line-height: 48rpx;
  114. }
  115. .u-search__action--active.data-v-0a306a29 {
  116. height: 60rpx !important;
  117. line-height: 60rpx !important;
  118. }
  119. .u-search__action--active.data-v-2d141374 {
  120. height: 60rpx !important;
  121. line-height: 60rpx !important;
  122. }
  123. </style>