enterprise_list.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. {extend name="public/base_human"/}
  2. {block name="css"}
  3. <style>
  4. .lw-list {width:90%;margin:0 auto;}
  5. .lw-item {background: #fff;box-shadow: 0 4px 8px 1px rgba(0,0,0,.03);border-radius: 6px;padding: 13px 8px;margin-top:10px;}
  6. .lw-item .title {display: flex;flex-direction: row;align-items: center;font-size:16px;font-weight: bold;}
  7. .lw-item .tel {font-size:14px;margin-top:10px;border-bottom:1px solid #ddd;padding-bottom: 10px;}
  8. .lw-item .join {display: flex;flex-direction: row;align-items: center;color:#777;font-size:14px;margin-top:10px;}
  9. .lw-item .join .flex-1{flex:1;}
  10. .lw-item .join .mobile{display: flex;flex-direction: row;align-items: center;}
  11. .lw-item .address {color:#777;font-size:14px;margin-top:10px;}
  12. .lw-item .booth {color:var(--red);font-size:16px;margin-top:10px;font-weight: bold;text-align: center;}
  13. .lw-item .tags {margin-top:10px;}
  14. .lw-item .tags .van-tag{margin-right:5px;}
  15. </style>
  16. {/block}
  17. {block name="body"}
  18. <van-sticky>
  19. <van-nav-bar
  20. class="nav-theme"
  21. :fixed="true"
  22. :placeholder="true"
  23. >
  24. <template #title>
  25. <span class="text-white">企业列表</span>
  26. </template>
  27. </van-nav-bar>
  28. <van-search v-model="keyword" placeholder="请输入企业名称" @search="onRefresh"></van-search>
  29. <van-dropdown-menu >
  30. <van-dropdown-item v-model="industry" :options="industry_list" @change="onRefresh"></van-dropdown-item>
  31. <van-dropdown-item v-model="cooperate" :options="cooperate_list" @change="onRefresh"></van-dropdown-item>
  32. </van-dropdown-menu>
  33. </van-sticky>
  34. <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
  35. <van-list
  36. v-model:loading="loading"
  37. :finished="finished"
  38. finished-text="没有更多了"
  39. @load="onList"
  40. >
  41. <div class="lw-list">
  42. <div class="lw-item" v-for="item in list" @click="toDetail(item.id)">
  43. <div class="title">
  44. <div style="width: 6px; height: 6px; background: #dd4250; border-radius: 50%; margin-right: 11px;"><span></span></div>
  45. <div>{{item.name}}</div>
  46. </div>
  47. <div class="tel" @click.stop="call(item.tel)">
  48. <van-icon name="phone" color=" #dd4250"></van-icon>
  49. 点击扫码联系
  50. </div>
  51. <div class="tags">
  52. <van-tag type="primary" v-for="tag in item.cooperate" size="medium">{{tag}}</van-tag>
  53. </div>
  54. <div class="join" v-if="item.join">
  55. <div class="flex-1">参会人:{{item.join}}</div>
  56. <div class="flex-1 mobile" v-if="item.join_mobile" @click.stop="call(item.join_mobile)">
  57. <van-icon name="phone" color=" #dd4250"></van-icon>
  58. 点击扫码联系
  59. </div>
  60. </div>
  61. <div class="address" v-if="item.industry">
  62. 行业:{{item.industry}}
  63. </div>
  64. <div class="address" v-if="item.capital">
  65. 注册资本:{{item.capital}}
  66. </div>
  67. <div class="address">
  68. 企业地址:{{item.address}}
  69. </div>
  70. <div class="booth" v-if="item.booth">
  71. 展位:{{item.booth}}
  72. </div>
  73. </div>
  74. </div>
  75. </van-list>
  76. </van-pull-refresh>
  77. <div style="width:100%;height:50px;"></div>
  78. <van-tabbar v-model="active">
  79. <van-tabbar-item icon="home-o">企业列表</van-tabbar-item>
  80. <van-tabbar-item icon="friends-o" @click="toInstitution">机构列表</van-tabbar-item>
  81. <van-tabbar-item icon="manager-o" @click="toCenter">服务中心</van-tabbar-item>
  82. </van-tabbar>
  83. {/block}
  84. {block name="script"}
  85. <script>
  86. function v_setup() {
  87. let base = {};
  88. base.active = Vue.ref(0);
  89. //搜索
  90. base.keyword = Vue.ref('');
  91. base.cooperate = Vue.ref('');
  92. base.industry = Vue.ref('');
  93. base.cooperate_list = Vue.reactive({$cooperate_list});
  94. base.industry_list = Vue.reactive({$industry_list});
  95. //列表
  96. base.page = Vue.ref(1);
  97. base.loading = Vue.ref(false);
  98. base.finished = Vue.ref(false);
  99. base.refreshing = Vue.ref(false);
  100. base.list = Vue.reactive([]);
  101. base.onList = () => {
  102. let param = {};
  103. param.page = base.page.value;
  104. param.name = base.keyword.value;
  105. param.cooperate = base.cooperate.value;
  106. param.industry = base.industry.value;
  107. base.page.value++;
  108. postJson("human/listEnterprise", param).then( ({data}) => {
  109. base.loading.value = false;
  110. if (base.refreshing.value) base.refreshing.value = false;
  111. if (data.length === 0) {
  112. base.finished.value = true;
  113. } else {
  114. base.list.push(...data);
  115. }
  116. });
  117. };
  118. base.onRefresh = () => {
  119. base.list = Vue.reactive([]);
  120. base.page.value = 1;
  121. base.loading.value = true;
  122. base.finished.value = false;
  123. base.onList();
  124. };
  125. base.call = (tel) => {
  126. vant.showImagePreview([
  127. '/static/mobile/images/wechat_qrcode_institution.jpg'
  128. ]);
  129. // location.href = "tel://" + tel;
  130. };
  131. base.toDetail = (id) => {
  132. location.href = "{:url('human/enterpriseDetail')}?id=" + id;
  133. };
  134. base.toInstitution = () => {
  135. location.href = "{:url('human/institutionList')}";
  136. };
  137. base.toCenter = () => {
  138. location.href = "{:url('human/center')}";
  139. };
  140. return base;
  141. }
  142. </script>
  143. {/block}