123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- {extend name="public/base_human"/}
- {block name="css"}
- <style>
- .lw-list {width:90%;margin:0 auto;}
- .lw-item {background: #fff;box-shadow: 0 4px 8px 1px rgba(0,0,0,.03);border-radius: 6px;padding: 13px 8px;margin-top:10px;}
- .lw-item .title {display: flex;flex-direction: row;align-items: center;font-size:16px;font-weight: bold;}
- .lw-item .tel {font-size:14px;margin-top:10px;border-bottom:1px solid #ddd;padding-bottom: 10px;}
- .lw-item .join {display: flex;flex-direction: row;align-items: center;color:#777;font-size:14px;margin-top:10px;}
- .lw-item .join .flex-1{flex:1;}
- .lw-item .join .mobile{display: flex;flex-direction: row;align-items: center;}
- .lw-item .address {color:#777;font-size:14px;margin-top:10px;}
- .lw-item .booth {color:var(--red);font-size:16px;margin-top:10px;font-weight: bold;text-align: center;}
- .lw-item .tags {margin-top:10px;}
- .lw-item .tags .van-tag{margin-right:5px;}
- </style>
- {/block}
- {block name="body"}
- <van-sticky>
- <van-nav-bar
- class="nav-theme"
- :fixed="true"
- :placeholder="true"
- >
- <template #title>
- <span class="text-white">企业列表</span>
- </template>
- </van-nav-bar>
- <van-search v-model="keyword" placeholder="请输入企业名称" @search="onRefresh"></van-search>
- <van-dropdown-menu >
- <van-dropdown-item v-model="industry" :options="industry_list" @change="onRefresh"></van-dropdown-item>
- <van-dropdown-item v-model="cooperate" :options="cooperate_list" @change="onRefresh"></van-dropdown-item>
- </van-dropdown-menu>
- </van-sticky>
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
- <van-list
- v-model:loading="loading"
- :finished="finished"
- finished-text="没有更多了"
- @load="onList"
- >
- <div class="lw-list">
- <div class="lw-item" v-for="item in list" @click="toDetail(item.id)">
- <div class="title">
- <div style="width: 6px; height: 6px; background: #dd4250; border-radius: 50%; margin-right: 11px;"><span></span></div>
- <div>{{item.name}}</div>
- </div>
- <div class="tel" @click.stop="call(item.tel)">
- <van-icon name="phone" color=" #dd4250"></van-icon>
- 点击扫码联系
- </div>
- <div class="tags">
- <van-tag type="primary" v-for="tag in item.cooperate" size="medium">{{tag}}</van-tag>
- </div>
- <div class="join" v-if="item.join">
- <div class="flex-1">参会人:{{item.join}}</div>
- <div class="flex-1 mobile" v-if="item.join_mobile" @click.stop="call(item.join_mobile)">
- <van-icon name="phone" color=" #dd4250"></van-icon>
- 点击扫码联系
- </div>
- </div>
- <div class="address" v-if="item.industry">
- 行业:{{item.industry}}
- </div>
- <div class="address" v-if="item.capital">
- 注册资本:{{item.capital}}
- </div>
- <div class="address">
- 企业地址:{{item.address}}
- </div>
- <div class="booth" v-if="item.booth">
- 展位:{{item.booth}}
- </div>
- </div>
- </div>
- </van-list>
- </van-pull-refresh>
- <div style="width:100%;height:50px;"></div>
- <van-tabbar v-model="active">
- <van-tabbar-item icon="home-o">企业列表</van-tabbar-item>
- <van-tabbar-item icon="friends-o" @click="toInstitution">机构列表</van-tabbar-item>
- <van-tabbar-item icon="manager-o" @click="toCenter">服务中心</van-tabbar-item>
- </van-tabbar>
- {/block}
- {block name="script"}
- <script>
- function v_setup() {
- let base = {};
- base.active = Vue.ref(0);
- //搜索
- base.keyword = Vue.ref('');
- base.cooperate = Vue.ref('');
- base.industry = Vue.ref('');
- base.cooperate_list = Vue.reactive({$cooperate_list});
- base.industry_list = Vue.reactive({$industry_list});
- //列表
- base.page = Vue.ref(1);
- base.loading = Vue.ref(false);
- base.finished = Vue.ref(false);
- base.refreshing = Vue.ref(false);
- base.list = Vue.reactive([]);
- base.onList = () => {
- let param = {};
- param.page = base.page.value;
- param.name = base.keyword.value;
- param.cooperate = base.cooperate.value;
- param.industry = base.industry.value;
- base.page.value++;
- postJson("human/listEnterprise", param).then( ({data}) => {
- base.loading.value = false;
- if (base.refreshing.value) base.refreshing.value = false;
- if (data.length === 0) {
- base.finished.value = true;
- } else {
- base.list.push(...data);
- }
- });
- };
- base.onRefresh = () => {
- base.list = Vue.reactive([]);
- base.page.value = 1;
- base.loading.value = true;
- base.finished.value = false;
- base.onList();
- };
- base.call = (tel) => {
- vant.showImagePreview([
- '/static/mobile/images/wechat_qrcode_institution.jpg'
- ]);
- // location.href = "tel://" + tel;
- };
- base.toDetail = (id) => {
- location.href = "{:url('human/enterpriseDetail')}?id=" + id;
- };
- base.toInstitution = () => {
- location.href = "{:url('human/institutionList')}";
- };
- base.toCenter = () => {
- location.href = "{:url('human/center')}";
- };
- return base;
- }
- </script>
- {/block}
|