|
1 | 1 | <template> |
2 | 2 | <div class="expert-list-wrap"> |
3 | 3 | <div class="technician w1190"> |
4 | | - <!--<div class="industry-tag"> |
5 | | - <span>筛选行业:</span> |
6 | | - <a v-for="(item,index) in Items" v-on:click="tabActiveIndex = index" :class="{active: tabActiveIndex === index}">法律咨询</a> |
7 | | - <a>其他</a> |
8 | | - </div>--> |
9 | 4 |
|
10 | | - <div class="technician-list fn-clear" |
11 | | - v-for="(item,index) in technicianLists"> |
| 5 | + <div class="technician-list fn-clear" v-for="(item,index) in technicianLists"> |
12 | 6 | <div class="technician-list-l fn-left"> |
13 | 7 | <!-- <img :src="item.imgUrl | imgCdn"> --> |
14 | | - <img v-if="item.imgUrl" |
15 | | - v-lazyload="lazyLoadPic(item.imgUrl)" |
16 | | - @click="jpExpertDetail(item.id)"> |
17 | | - <img v-else |
18 | | - src="../assets/img/head.png" |
19 | | - @click="jpExpertDetail(item.id)"> |
| 8 | + <img v-if="item.imgUrl" v-lazyload="Filters.imgCdn(item.imgUrl)" @click="jpExpertDetail(item.id)"> |
| 9 | + <img v-else src="../assets/img/head.png" @click="jpExpertDetail(item.id)"> |
20 | 10 | </div> |
21 | 11 | <div class="technican-list-r fn-left"> |
22 | 12 | <div class="expert-brief"> |
23 | | - <h5 @click="jpExpertDetail(item.id)" |
24 | | - :title="item.expertName">{{item.expertName | subStr(6)}}</h5> |
25 | | - <span class="location" |
26 | | - :title="item.city">{{ item.city | subStr(10) }}</span> |
27 | | - <span class="company" |
28 | | - :title="item.positionName" |
29 | | - v-if="item.positionName">{{item.positionName | subStr(10) }}</span><span v-if="isNotEmpty(item)"> | </span><span :title="item.companyName" |
30 | | - v-if="item.companyName">{{item.companyName | subStr(10)}}</span> |
31 | | - <button v-if="item.isFavorite == -1" |
32 | | - class="collection" |
33 | | - :plain="true" |
34 | | - @click="handleCollection(1,item,index)">收藏专家</button> |
35 | | - <button v-else-if="item.isFavorite == 0" |
36 | | - class="collection" |
37 | | - :plain="true" |
38 | | - @click="handleCollection(1,item,index)">收藏专家</button> |
39 | | - <button v-else |
40 | | - class="not-collection" |
41 | | - @click="handleCollection(0,item,index)">取消收藏</button> |
| 13 | + <h5 @click="jpExpertDetail(item.id)" :title="item.expertName">{{item.expertName | subStr(6)}}</h5> |
| 14 | + <span class="location" :title="item.city">{{ item.city | subStr(10) }}</span> |
| 15 | + <span class="company" :title="item.positionName" v-if="item.positionName">{{item.positionName | subStr(10) }}</span> |
| 16 | + <span v-if="isNotEmpty(item)"> | </span> |
| 17 | + <span :title="item.companyName" v-if="item.companyName">{{item.companyName | subStr(10)}}</span> |
| 18 | + <button v-if="item.isFavorite == -1" class="collection" :plain="true" @click="handleCollection(1,item,index)">收藏专家</button> |
| 19 | + <button v-else-if="item.isFavorite == 0" class="collection" :plain="true" @click="handleCollection(1,item,index)">收藏专家</button> |
| 20 | + <button v-else class="not-collection" @click="handleCollection(0,item,index)">取消收藏</button> |
42 | 21 | </div> |
43 | 22 | <div class="expert-detail"> |
44 | 23 | <h4>专家简介</h4> |
|
49 | 28 |
|
50 | 29 | <!--分页--> |
51 | 30 | <div class="block"> |
52 | | - <el-pagination @current-change="handleCurrentChange" |
53 | | - :current-page="currentPage1" |
54 | | - layout="prev, pager, next, jumper" |
55 | | - :page-size="8" |
56 | | - :total="technicianListsAll.totalSize"> |
| 31 | + <el-pagination @current-change="handleCurrentChange" :current-page="currentPage1" layout="prev, pager, next, jumper" :page-size="8" :total="technicianListsAll.totalSize"> |
57 | 32 | </el-pagination> |
58 | 33 | </div> |
59 | 34 | </div> |
60 | 35 | </div> |
61 | 36 | </template> |
62 | 37 | <script> |
63 | 38 | import { mapState, mapGetters, mapMutations, mapActions } from 'vuex' |
64 | | -import Vue from 'vue' |
65 | 39 |
|
66 | 40 | export default { |
67 | 41 | data() { |
@@ -99,11 +73,8 @@ export default { |
99 | 73 | } |
100 | 74 | }, |
101 | 75 | methods: { |
102 | | - lazyLoadPic(url) { |
103 | | - return Vue.filter('imgCdn')(url) |
104 | | - }, |
105 | 76 | isNotEmpty(item) { |
106 | | - if (item.positionName && item.companyName) { |
| 77 | + if (item.positionName && item.companyName) { |
107 | 78 | return true; |
108 | 79 | } |
109 | 80 | return false; |
|
0 commit comments