Commit af24302e by 高淑倩

active_tab

parent 24735c6e
...@@ -17,6 +17,10 @@ Component({ ...@@ -17,6 +17,10 @@ Component({
categoryType: { categoryType: {
type: Object, type: Object,
value: null value: null
},
currHomePageId: {
type: String,
value: ''
} }
}, },
attached() { attached() {
......
...@@ -7,19 +7,19 @@ ...@@ -7,19 +7,19 @@
wx:for-item="navItem" wx:for-item="navItem"
wx:key="idx" wx:key="idx"
> >
<view wx:if="{{navItem.needAuth}}" class="scroll-view-item {{currentTab == idx ?'active':''}}" style="width:{{navItemWidth}}%"> <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 {{currentTab == idx ?'active':''}}" style="width: {{navItemWidth}}%;height: 80rpx;display: flex;"> <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 <button
bindgetuserinfo="_getUserInfo" bindgetuserinfo="_getUserInfo"
data-jflag="false" data-jflag="false"
open-type='getUserInfo' 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" hover-class="btn-hover"
> >
{{navItem.title}} {{navItem.title}}
</button> </button>
</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 <view
data-current="{{idx}}" data-current="{{idx}}"
data-redirectId="{{navItem.redirectId}}" data-redirectId="{{navItem.redirectId}}"
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</view> </view>
</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 <view
data-current="{{idx}}" data-current="{{idx}}"
data-redirectId="{{navItem.redirectId}}" data-redirectId="{{navItem.redirectId}}"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<announcement notice="{{pItem.notice}}"/> <announcement notice="{{pItem.notice}}"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 7}}"> <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>
<view class="" wx:if="{{pItem.type == 8}}"> <view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" /> <attention focus-wx="{{pItem.focusWx}}" />
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<announcement notice="{{pItem.notice}}"/> <announcement notice="{{pItem.notice}}"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 7}}"> <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>
<view class="" wx:if="{{pItem.type == 8}}"> <view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" /> <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