|
|
@@ -5,9 +5,9 @@
|
|
|
<div class="consult-wrapper">
|
|
|
<div class="consult-top">
|
|
|
<div class="tabs">
|
|
|
- <a href="/company/0/" class="tabs-item" :class="pagination.selectedTabVal==0 ? 'active' : ''">全部</a>
|
|
|
- <a href="/company/19/" class="tabs-item" :class="pagination.selectedTabVal==19 ? 'active' : ''">技术服务商</a>
|
|
|
- <a href="/company/18/" class="tabs-item" :class="pagination.selectedTabVal==18 ? 'active' : ''">人力外包</a>
|
|
|
+ <div class="tabs-item" :class="num==0 ? 'active' : ''" @click="tabsItem(0)">全部</div>
|
|
|
+ <div class="tabs-item" :class="num==19 ? 'active' : ''" @click="tabsItem(19)">技术服务商</div>
|
|
|
+ <div class="tabs-item" :class="num==18 ? 'active' : ''" @click="tabsItem(18)">人力外包</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
@@ -56,6 +56,7 @@ export default {
|
|
|
name: 'SeoCompanyList',
|
|
|
data () {
|
|
|
return {
|
|
|
+ num: 0,
|
|
|
baseUrl: '',
|
|
|
isWeixinApp: true,
|
|
|
defaultImg: require('@/assets/img/common/empty@2x.png')
|
|
|
@@ -117,28 +118,33 @@ export default {
|
|
|
this.isWeixinApp = navigator.userAgent.indexOf("miniProgram") > -1
|
|
|
},
|
|
|
methods: {
|
|
|
+ tabsItem(num){
|
|
|
+ this.num = num
|
|
|
+ this.getCompanyList(num)
|
|
|
+ },
|
|
|
getCompanyList (num=0) {
|
|
|
+ this.pagination.loading = true
|
|
|
let data = {
|
|
|
cert_id: num,
|
|
|
- page: this.page.currentPage,
|
|
|
- pagesize: this.page.pageSize
|
|
|
+ page: this.pagination.page,
|
|
|
+ pagesize: this.pagination.pageSize
|
|
|
}
|
|
|
this.$axios.$post('/uapi/company', data).then(res => {
|
|
|
const { data, info, status} = res
|
|
|
if(status===1){
|
|
|
this.companyList = data.list
|
|
|
- this.page.total = data.count
|
|
|
+ this.pagination.total = data.count
|
|
|
}
|
|
|
+ }).then(()=>{
|
|
|
+ this.pagination.loading = false
|
|
|
})
|
|
|
// this.pagination.loading = true
|
|
|
// this.pagination.noMore = false
|
|
|
},
|
|
|
/** 分页页码改变时 */
|
|
|
handlePageChange (val) {
|
|
|
- let query = {
|
|
|
- page: val
|
|
|
- }
|
|
|
- window.location.href = `${window.location.origin}${window.location.pathname}?${qs.stringify(query)}`
|
|
|
+ this.pagination.page = val
|
|
|
+ this.getCompanyList(this.num)
|
|
|
},
|
|
|
/** mobile 加载更多 */
|
|
|
// handleLoadMoreConsult () {
|