XuanJiangYuan.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="box">
  3. <u-navbar title="文物宣讲员列表" autoBack :placeholder="true" bgColor="#fee1b9"></u-navbar>
  4. <view class="ban">
  5. <view style="margin-top: 20rpx">
  6. <u-search placeholder="搜索讲员" shape="square" :showAction="false" v-model="keyword"></u-search>
  7. </view>
  8. <!-- tab -->
  9. <!-- <view class="tab_box">
  10. <view @click="TabBtn(index)" class="tab_item" v-for="(item, index) in tabList" :key="index" :class="{ tab_item_active: index == tabIndex }">
  11. {{ item.name }}
  12. </view>
  13. </view> -->
  14. <!-- -->
  15. <view class="xjy_box" @click="$common.navigateTo('/index_fenbao/XuanJiangYuan/xjy_XiangQing?id=' + item.id)" v-for="item in xuangjiangyuanList" :key="item">
  16. <img :src="item.image" class="img" />
  17. <view style="margin-left: 60rpx">
  18. <view class="xjy_name">{{ item.name }}</view>
  19. <view class="xjy_addres">{{ item.cr_title }}</view>
  20. <view class="ckxq">查看详情</view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. let that;
  28. export default {
  29. onLoad(option) {
  30. that = this;
  31. that.getXuanjiangList();
  32. },
  33. data() {
  34. return {
  35. tabIndex: 0,
  36. keywords: '',
  37. tabList: [
  38. {
  39. name: '区域'
  40. },
  41. {
  42. name: '等级'
  43. },
  44. {
  45. name: '评分'
  46. }
  47. ],
  48. xuangjiangyuanList: []
  49. };
  50. },
  51. methods: {
  52. TabBtn(i) {
  53. this.tabIndex = i;
  54. },
  55. getXuanjiangList() {
  56. this.$api.getXuanjiangList(
  57. {
  58. page: 1,
  59. pageSize: 20,
  60. keywords: that.keywords
  61. },
  62. data => {
  63. if (data.code == 0) {
  64. that.$common.errorToShow(data.msg);
  65. return;
  66. } else {
  67. that.xuangjiangyuanList = data.data;
  68. // console.log(that.xuangjiangyuanList, '文物跑活动宣讲员');
  69. }
  70. }
  71. );
  72. },
  73. xqBtn() {
  74. uni.navigateTo({
  75. url: '/index_fenbao/XuanJiangYuan/xjy_XiangQing'
  76. });
  77. }
  78. }
  79. };
  80. </script>
  81. <style>
  82. .box {
  83. height: auto;
  84. width: 100%;
  85. padding-bottom: 50rpx;
  86. background-image: url('https://huli-app.wenlvti.net/app_static/minnanhun/image/gj_bg.png');
  87. background-repeat: repeat-y;
  88. background-size: 100%;
  89. }
  90. .ban {
  91. width: 92%;
  92. margin: auto;
  93. }
  94. .tab_box {
  95. display: flex;
  96. align-items: center;
  97. margin-top: 20rpx;
  98. }
  99. .tab_item {
  100. width: 90rpx;
  101. height: 60rpx;
  102. line-height: 60rpx;
  103. text-align: center;
  104. color: black;
  105. border-radius: 10rpx;
  106. background-color: #ffffff;
  107. }
  108. .tab_item_active {
  109. color: #794923 !important;
  110. background-color: #faefe6 !important;
  111. }
  112. .tab_item:nth-child(2) {
  113. margin-left: 10rpx;
  114. }
  115. .tab_item:nth-child(3) {
  116. margin-left: 10rpx;
  117. }
  118. .xjy_box {
  119. display: flex;
  120. align-items: center;
  121. width: 100%;
  122. height: 220rpx;
  123. border-radius: 10rpx;
  124. padding: 20rpx 20rpx 20rpx 50rpx;
  125. margin-top: 20rpx;
  126. background-color: #fff0e3;
  127. }
  128. .img {
  129. width: 100rpx;
  130. height: 100rpx;
  131. border-radius: 50%;
  132. }
  133. .xjy_name {
  134. color: black;
  135. font-size: 30rpx;
  136. }
  137. .xjy_addres {
  138. font-size: 26rpx;
  139. color: #6b5e49;
  140. /* margin-top: 10rpx; */
  141. }
  142. .ckxq {
  143. width: 140rpx;
  144. height: 60rpx;
  145. line-height: 60rpx;
  146. text-align: center;
  147. color: #ffffff;
  148. margin-top: 20rpx;
  149. border-radius: 10rpx;
  150. background-color: #e55d45;
  151. }
  152. </style>