Commit af24302e by 高淑倩

active_tab

parent 24735c6e
......@@ -17,6 +17,10 @@ Component({
categoryType: {
type: Object,
value: null
},
currHomePageId: {
type: String,
value: ''
}
},
attached() {
......
......@@ -7,19 +7,19 @@
wx:for-item="navItem"
wx:key="idx"
>
<view wx:if="{{navItem.needAuth}}" class="scroll-view-item {{currentTab == idx ?'active':''}}" style="width:{{navItemWidth}}%">
<view wx:if="{{!currentHasUserInfo}}" class="scroll-view-item {{currentTab == idx ?'active':''}}" style="width: {{navItemWidth}}%;height: 80rpx;display: flex;">
<view wx:if="{{navItem.needAuth}}" class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width:{{navItemWidth}}%">
<view wx:if="{{!currentHasUserInfo}}" class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width: {{navItemWidth}}%;height: 80rpx;display: flex;">
<button
bindgetuserinfo="_getUserInfo"
data-jflag="false"
open-type='getUserInfo'
class="scroll-view-item {{currentTab == idx ?'active':''}}"
class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}"
hover-class="btn-hover"
>
{{navItem.title}}
</button>
</view>
<view wx:else class="scroll-view-item {{currentTab == idx ?'active':''}}" style="width:{{navItemWidth}}%">
<view wx:else class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width:{{navItemWidth}}%">
<view
data-current="{{idx}}"
data-redirectId="{{navItem.redirectId}}"
......@@ -30,7 +30,7 @@
</view>
</view>
<view wx:else class="scroll-view-item {{currentTab == idx ?'active':''}}" style="width:{{navItemWidth}}%">
<view wx:else class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" style="width:{{navItemWidth}}%">
<view
data-current="{{idx}}"
data-redirectId="{{navItem.redirectId}}"
......
......@@ -21,7 +21,7 @@
<announcement notice="{{pItem.notice}}"/>
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<tab-sort category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
<tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" />
......
......@@ -21,7 +21,7 @@
<announcement notice="{{pItem.notice}}"/>
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<tab-sort category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
<tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment