作者 朱振飞

修改

@@ -99,29 +99,19 @@ Page({ @@ -99,29 +99,19 @@ Page({
99 }) 99 })
100 }, 100 },
101 tabCharge(e) { 101 tabCharge(e) {
102 -  
103 - let s = this, singleWidth = s.data.windowWidth / 7, cur = e.currentTarget.dataset.index+1;  
104 -  
105 - if (e.currentTarget.dataset.idx == -1) {  
106 - s.setData({  
107 - selectindex:0  
108 - })  
109 - } else{  
110 - s.setData({  
111 - selectindex: e.currentTarget.dataset.idx  
112 - })  
113 - } 102 + let s = this, singleWidth = s.data.windowWidth / 3, cur = e.currentTarget.dataset.index + 1;
114 s.setData({ 103 s.setData({
115 - beautiful_switch: e.currentTarget.dataset.beau,  
116 - companyList:[],  
117 - page:1, 104 + companyList: [],
  105 + page: 1,
118 current: e.currentTarget.dataset.current, 106 current: e.currentTarget.dataset.current,
119 category_id: e.currentTarget.dataset.current, 107 category_id: e.currentTarget.dataset.current,
120 - navScrollLeft:(cur-2)*singleWidth 108 + navScrollLeft: (cur - 2) * singleWidth
121 }) 109 })
122 - s.getCompanyList(e.currentTarget.dataset.beau,e.currentTarget.dataset.current, s.data.park) 110 + s.getCompanyList(e.currentTarget.dataset.current, s.data.park)
123 }, 111 },
124 112
  113 +
  114 +
125 /** 115 /**
126 * 生命周期函数--监听页面加载 116 * 生命周期函数--监听页面加载
127 */ 117 */
@@ -9,10 +9,8 @@ @@ -9,10 +9,8 @@
9 </view> --> 9 </view> -->
10 <scroll-view class='tab_box' scroll-left="{{navScrollLeft}}" scroll-x='true' scroll-with-animation='true'> 10 <scroll-view class='tab_box' scroll-left="{{navScrollLeft}}" scroll-x='true' scroll-with-animation='true'>
11 <view class="tab_item {{selectindex==0?'active':''}}" data-current='0' bindtap='tabCharge' data-idx='-1' data-beau="0">全部</view> 11 <view class="tab_item {{selectindex==0?'active':''}}" data-current='0' bindtap='tabCharge' data-idx='-1' data-beau="0">全部</view>
12 -  
13 <view class="tab_item zuiactive" data-idx='-2' data-current='0' bindtap='tabCharge' data-beau="1"> 12 <view class="tab_item zuiactive" data-idx='-2' data-current='0' bindtap='tabCharge' data-beau="1">
14 - 最美企业  
15 - 13 + 企业风采
16 <view class="iconfont icon-huangguan"></view> 14 <view class="iconfont icon-huangguan"></view>
17 </view> 15 </view>
18 <block wx:for="{{typeList}}" wx:key=''> 16 <block wx:for="{{typeList}}" wx:key=''>
@@ -21,11 +19,9 @@ @@ -21,11 +19,9 @@
21 </scroll-view> 19 </scroll-view>
22 <view class='iconfont icon-gengduo1' bindtap='changeShow'></view> 20 <view class='iconfont icon-gengduo1' bindtap='changeShow'></view>
23 </view> 21 </view>
24 -<view class="scroll-content" hidden="{{!ifData}}"style="height:{{scrollHeight}}px;"> 22 +<view class="scroll-content" hidden="{{!ifData}}" style="height:{{scrollHeight}}px;">
25 <view class='content_box' wx:if='{{showType}}'> 23 <view class='content_box' wx:if='{{showType}}'>
26 - <navigator class='item_list' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}"  
27 - open-type="navigate"  
28 - hover-class="other-navigator-hover"> 24 + <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">
29 <image class='label_img' hidden='{{!item.recommend_switch}}' src='/images/zuire@2x.png'></image> 25 <image class='label_img' hidden='{{!item.recommend_switch}}' src='/images/zuire@2x.png'></image>
30 <text class='label_info' hidden='{{!item.recommend_switch}}'>推荐</text> 26 <text class='label_info' hidden='{{!item.recommend_switch}}'>推荐</text>
31 <image class='list_img' src='{{item.logo_image}}'></image> 27 <image class='list_img' src='{{item.logo_image}}'></image>
@@ -40,9 +36,7 @@ @@ -40,9 +36,7 @@
40 </view> 36 </view>
41 37
42 <view class='content_box content_box2' wx:else> 38 <view class='content_box content_box2' wx:else>
43 - <navigator class='list_item' wx:for='{{companyList}}' wx:key='' url="/pages/matrix/company/company?id={{item.id}}"  
44 - open-type="navigate"  
45 - hover-class="other-navigator-hover"> 39 + <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">
46 40
47 41
48 42
@@ -23,7 +23,6 @@ page { @@ -23,7 +23,6 @@ page {
23 line-height: 80rpx; 23 line-height: 80rpx;
24 display:flex; 24 display:flex;
25 padding-left: 10rpx 25 padding-left: 10rpx
26 -  
27 } 26 }
28 27
29 .tab_item { 28 .tab_item {