<!--component/tabSort/tabSort.wxml-->
<view class="tab-sort" wx:if="{{categoryList}}">
	<scroll-view scroll-x class="scroll-view_H" scroll-with-animation="{{true}}">
		<block
		 wx:for="{{categoryList}}"
		 wx:for-index="idx"
		 wx:for-item="navItem"
		 wx:key="idx"
		>
			<view wx:if="{{navItem.needAuth}}" 
      style="width:{{navItemWidth}}%"
      class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}"            >
				<view wx:if="{{!currentHasUserInfo}}" 
        style="width: {{navItemWidth}}%;height: 80rpx;display: flex;"
        class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
					<button
					 bindgetuserinfo="_getUserInfo"
					 data-jflag="false"
					 open-type='getUserInfo'
					 class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}"
					 hover-class="btn-hover"
					>
					{{navItem.title}}
					</button>
				</view>
				<view wx:else 
        style="width:{{navItemWidth}}%"
        class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
					<view
					 data-current="{{idx}}"
					 data-redirectId="{{navItem.redirectId}}"
					 data-item="{{navItem}}"
					 bindtap="switchNav"
					>{{navItem.title}}
					</view>
				</view>
			</view>
			<view wx:else 
      style="width:{{navItemWidth}}%"
      class="scroll-view-item {{currHomePageId == (navItem.link.type == '2' ? navItem.link.url : '')? 'active' : ''}}" >
				<view
				 data-current="{{idx}}"
				 data-redirectId="{{navItem.redirectId}}"
				 data-item="{{navItem}}"
				 bindtap="switchNav"
				>{{navItem.title}}
				</view>
			</view>
		</block>
	</scroll-view>
	<!-- showQrcode  2 购物车 1 会员码 0 隐藏 -->
	<view class="scroll-view-right" wx:if="{{categoryType.showQrcode == 1}}">
		<button
		 wx:if="{{!currentHasUserInfo}}"
		 bindgetuserinfo="_getUserInfo"
		 data-jflag="false"
		 open-type='getUserInfo'
		 class='btn btn-primary btn-vip-code'
		 hover-class="btn-hover"
		 style="height:100%"
		>
			<image
			 class="right-img"
			 src="/assets/imgs/7_1_0/scancode.png"
			 mode="widthFix"
			 lazy-load="false"
			/>
			<view
			 class="active vip-text"
			 selectable="false"
			 space="false"
			 decode="false"
			>会员码
			</view>
		</button>
		<button
		 wx:if="{{currentHasUserInfo}}"
		 class='btn btn-primary btn-vip-code'
		 hover-class="btn-hover"
		 style="height:100%"
		 bindtap="handelToVipCode"
		>
			<image
			 class="right-img"
			 src="/assets/imgs/7_1_0/scancode.png"
			 mode="widthFix"
			 lazy-load="false"
			/>
			<view
			 class="active vip-text"
			 selectable="false"
			 space="false"
			 decode="false"
			>会员码
			</view>
		</button>
	</view>
	<view class="scroll-view-right" wx:if="{{categoryType.showQrcode == 2}}">
		<button
		 wx:if="{{!currentHasUserInfo}}"
		 bindgetuserinfo="_getUserInfo"
		 data-jflag="false"
		 open-type='getUserInfo'
		 class='btn btn-primary df'
		 hover-class="btn-hover"
		 style="height:100%"
		>
			<image
			 class="right-img"
			 src="/assets/imgs/7_1_0/08_22/cart_point.png"
			 mode="widthFix"
			 lazy-load="false"
			/>
		</button>
		<button
		 wx:if="{{currentHasUserInfo}}"
		 class='btn btn-primary df'
		 hover-class="btn-hover"
		 style="height:100%"
		 bindtap="handelToCart"
		>
			<image
			 class="right-img"
			 src="/assets/imgs/7_1_0/08_22/cart_point.png"
			 mode="widthFix"
			 lazy-load="false"
			/>
		</button>
	</view>
</view>

