移动端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

insuranceProjectList.vue 6.3 KiB

2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <template>
  2. <div class="home_wrapper">
  3. <!-- 头部开始 -->
  4. <div class="header">
  5. <div class="header_left" @click="onClickLeft">
  6. <img src="../../../../static/images/agriculturalTrusteeship/return.png">
  7. <p>{{tt}}</p>
  8. </div>
  9. </div>
  10. <!-- 头部结束 -->
  11. <!-- 内容开始 -->
  12. <div class="main">
  13. <div class="search">
  14. <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_01.png" />
  15. <input type="text" placeholder="输入需求进行搜索" v-model="searchInput" />
  16. <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_02.png" @click="goSearch" />
  17. </div>
  18. <van-list
  19. v-model="loading"
  20. :finished="finished"
  21. finished-text="没有更多了"
  22. @load="getList"
  23. >
  24. <!-- @load="onLoad"-->
  25. <div class="main_content_right_list" v-for="(item,index) in productListYes" @click="$router.push({name:'agriculturalTrusteeshipSocietyProjectDetail',query:{id:item.id}})">
  26. <img v-if="item.mainImg" :src="item.mainImg" style="width: 18vw;height: 18vw;">
  27. <img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 18vw;height: 18vw;">
  28. <div class="main_content_right_list_content">
  29. <p class="tt">{{item.productName}}</p>
  30. <!-- <div class="tab">-->
  31. <!-- <p>¥<span>66</span>.00/亩</p>-->
  32. <!-- <p><span>销 600</span><span>分 4.7</span></p>-->
  33. <!-- </div>-->
  34. <p class="name">{{item.productType}}</p>
  35. </div>
  36. </div>
  37. </van-list>
  38. </div>
  39. <!-- 内容结束 -->
  40. </div>
  41. </template>
  42. <script>
  43. import Cookies from "js-cookie";
  44. import {productList, serviceList} from "@/api/agriculturalTrusteeship";
  45. export default {
  46. name: "agriculturalTrusteeshipInsuranceList",
  47. data() {
  48. return {
  49. activeKey: 0,
  50. active: 0,
  51. loading: false,
  52. finished: false,
  53. productListYes:[],
  54. productListNo:[],
  55. productList:[],
  56. query:{
  57. financialServiceId:'',
  58. productName:'',
  59. },
  60. tt:'',
  61. searchInput:'',
  62. };
  63. },
  64. created() {
  65. this.query.financialServiceId = this.$route.query.id;
  66. this.tt = this.$route.query.financialName
  67. },
  68. methods: {
  69. getList(){
  70. productList(this.query).then(response => {
  71. response.rows.map(res=>{
  72. if(res.sysYesNo == 'Y'){
  73. if (res.mainImg){
  74. let supplyMasterMap = res.mainImg.split( "," )
  75. res.mainImg = '/api'+supplyMasterMap[0]
  76. }
  77. this.productListYes.push(res);
  78. }
  79. if(res.sysYesNo == 'N'){
  80. this.productListNo.push(res);
  81. }
  82. this.productList.push(res);
  83. })
  84. if(this.productList.length >= response.total){
  85. this.finished = true;
  86. return;
  87. }else{
  88. this.loading = false;
  89. this.query.pageNum += 1 ;
  90. }
  91. });
  92. },
  93. goSearch(){
  94. this.productListYes = [];
  95. this.query.productName = this.searchInput;
  96. this.getList();
  97. },
  98. },
  99. }
  100. </script>
  101. <style scoped lang="scss">
  102. .home_wrapper{
  103. height: 100vh;
  104. background: #ffffff url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_head.png") no-repeat;
  105. }
  106. /*头部*/
  107. .header{
  108. display: flex;
  109. align-items: center;
  110. justify-content: space-between;
  111. padding: 2vh 4% 2vh;
  112. .header_left{
  113. display: flex;
  114. align-items: center;
  115. p{
  116. font-size: .4rem;
  117. color: #ffffff;
  118. line-height: 1;
  119. margin-left: 10PX;
  120. }
  121. }
  122. .header_right{
  123. font-size: .35rem;
  124. background: #ffffff url("../../../../static/images/agriculturalTrusteeship/address.png") no-repeat 10PX center;
  125. padding: 2PX 15PX 2PX 25PX;
  126. border-radius: 50PX;
  127. }
  128. }
  129. /* 内容 */
  130. .main{
  131. background: #ffffff;
  132. padding-top: 2vh;
  133. border-top-left-radius: 25PX;
  134. border-top-right-radius: 25PX;
  135. /deep/ .van-tabs__nav{
  136. border-top-left-radius: 25PX;
  137. border-top-right-radius: 25PX;
  138. overflow: hidden;
  139. }
  140. /deep/ .van-tabs__line{
  141. background: #334281!important;
  142. }
  143. /deep/ .van-tab--active{
  144. color: #334281;
  145. }
  146. /deep/ .van-tabs__content{
  147. background: #ffffff;
  148. padding-top: 2vh;
  149. }
  150. .search{
  151. display: flex;
  152. justify-content: space-between;
  153. align-items: center;
  154. width: 92%;
  155. margin: 0PX auto;
  156. border: 1px solid #6E93F3;
  157. padding: 1PX 1PX 1PX 12PX ;
  158. border-radius: 50PX;
  159. input{
  160. flex: 1;
  161. background: transparent;
  162. margin-left: 10PX;
  163. }
  164. }
  165. .main_content_right_list{
  166. display: flex;
  167. margin: 0 auto;
  168. margin-top: 2vh;
  169. width: 92%;
  170. img{
  171. border-radius: 15PX;
  172. margin-right: 4%;
  173. width: 20%;
  174. }
  175. .main_content_right_list_content{
  176. display: flex;
  177. flex-direction:column;
  178. justify-content: space-between;
  179. align-items: start;
  180. .tt{
  181. color: #333333;
  182. font-size: .35rem;
  183. }
  184. .tab{
  185. display: flex;
  186. justify-content: space-between;
  187. p{
  188. &:nth-child(1){
  189. flex: 1;
  190. color: #FF5E00;
  191. span{
  192. font-size: .4rem;
  193. }
  194. }
  195. &:nth-child(2){
  196. flex: 1;
  197. span{
  198. width: 50%;
  199. display: inline-block;
  200. text-align: center;
  201. padding: 2PX 2PX;
  202. &:nth-child(1){
  203. color: #497CE8;
  204. background: #E2E9FD;
  205. border-top-left-radius: 10PX;
  206. }
  207. &:nth-child(2){
  208. color: #ffffff;
  209. background-image: linear-gradient(to right , #5D87FA , #5FD5F5);
  210. border-bottom-right-radius: 10PX;
  211. }
  212. }
  213. }
  214. }
  215. }
  216. .name{
  217. color: #497CE8;
  218. background: #E2E9FD;
  219. padding:2PX 5PX;
  220. border-radius: 5PX;
  221. }
  222. }
  223. }
  224. }
  225. </style>