作者 朱振飞

修改

... ... @@ -99,29 +99,19 @@ Page({
})
},
tabCharge(e) {
let s = this, singleWidth = s.data.windowWidth / 7, cur = e.currentTarget.dataset.index+1;
if (e.currentTarget.dataset.idx == -1) {
s.setData({
selectindex:0
})
} else{
s.setData({
selectindex: e.currentTarget.dataset.idx
})
}
let s = this, singleWidth = s.data.windowWidth / 3, cur = e.currentTarget.dataset.index + 1;
s.setData({
beautiful_switch: e.currentTarget.dataset.beau,
companyList:[],
page:1,
companyList: [],
page: 1,
current: e.currentTarget.dataset.current,
category_id: e.currentTarget.dataset.current,
navScrollLeft:(cur-2)*singleWidth
navScrollLeft: (cur - 2) * singleWidth
})
s.getCompanyList(e.currentTarget.dataset.beau,e.currentTarget.dataset.current, s.data.park)
s.getCompanyList(e.currentTarget.dataset.current, s.data.park)
},
/**
* 生命周期函数--监听页面加载
*/
... ...
... ... @@ -9,11 +9,9 @@
</view> -->
<scroll-view class='tab_box' scroll-left="{{navScrollLeft}}" scroll-x='true' scroll-with-animation='true'>
<view class="tab_item {{selectindex==0?'active':''}}" data-current='0' bindtap='tabCharge' data-idx='-1' data-beau="0">全部</view>
<view class="tab_item zuiactive" data-idx='-2' data-current='0' bindtap='tabCharge' data-beau="1">
最美企业
<view class="iconfont icon-huangguan"></view>
企业风采
<view class="iconfont icon-huangguan"></view>
</view>
<block wx:for="{{typeList}}" wx:key=''>
<view class="tab_item {{selectindex == item.id?'active':''}}" data-idx="{{item.id}}" data-current='{{item.id}}' bindtap='tabCharge' data-index='{{index}}' data-beau="0">{{item.name}}</view>
... ... @@ -21,11 +19,9 @@
</scroll-view>
<view class='iconfont icon-gengduo1' bindtap='changeShow'></view>
</view>
<view class="scroll-content" hidden="{{!ifData}}"style="height:{{scrollHeight}}px;">
<view class="scroll-content" hidden="{{!ifData}}" style="height:{{scrollHeight}}px;">
<view class='content_box' wx:if='{{showType}}'>
<navigator class='item_list' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}"
open-type="navigate"
hover-class="other-navigator-hover">
<navigator class='item_list' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}" open-type="navigate" hover-class="other-navigator-hover">
<image class='label_img' hidden='{{!item.recommend_switch}}' src='/images/zuire@2x.png'></image>
<text class='label_info' hidden='{{!item.recommend_switch}}'>推荐</text>
<image class='list_img' src='{{item.logo_image}}'></image>
... ... @@ -40,18 +36,16 @@
</view>
<view class='content_box content_box2' wx:else>
<navigator class='list_item' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}"
open-type="navigate"
hover-class="other-navigator-hover">
<navigator class='list_item' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}" open-type="navigate" hover-class="other-navigator-hover">
<image class='label_img' hidden='{{!item.recommend_switch}}' src='/images/zuire@2x.png'></image>
<text class='label_info' hidden='{{!item.recommend_switch}}'>推荐</text>
<text class='label_info' hidden='{{!item.recommend_switch}}'>推荐</text>
<image src='{{item.logo_image}}' mode='aspectFill' class='top_logo' style="height:{{heigh}}"></image>
<view class='list_content_box'>
<view class='list_title_box'>
<!-- <image src='{{item.logo_image}}'></image> -->
... ... @@ -65,5 +59,5 @@
</view>
<view class="none-box" hidden="{{ifData}}">
<view>暂无相关企业</view>
<view>暂无相关企业</view>
</view>
\ No newline at end of file
... ...
... ... @@ -23,7 +23,6 @@ page {
line-height: 80rpx;
display:flex;
padding-left: 10rpx
}
.tab_item {
... ...