<!--pages/switchAccount/switchAccount.wxml-->
<view class="tabBar shadow">
	<view bindtap="switchTab" data-index="{{0}}" class="tabItem {{tabIndex===0?'active':''}}">企业切换
	</view>
	<view bindtap="switchTab" data-index="{{1}}" class="tabItem {{tabIndex===1?'active':''}}">设备切换
	</view>
</view>
<block wx:if="{{tabIndex===0}}">
	<view class="list" style="margin-top: 88rpx">
	<view bindtap="switchCompany" data-id="{{item.entTaxId}}" wx:for="{{list}}" wx:key="entInfoId" class="item">
		<image wx:if="{{!item.avatar}}" src="../../images/default-avatar.png" class="avatar"></image>
		<image wx:if="{{item.avatar}}" src="{{globalUrl+user.avatar}}" class="avatar"></image>
		<view class="right">
			<view class="name">{{item.entName}}</view>
			<view class="mobile">联系电话：{{item.entPhone}}</view>
		</view>
		<i wx:if="{{item.selected}}" class="iconfont icon-right selected"></i>
	</view>
</view>
<loadmore loadmore="{{pages>0&&finish===false}}" finish="{{pages>0&&finish===true}}" nodata="{{pages===0}}"></loadmore>
</block>
<block wx:if="{{tabIndex===1}}">
	<view class="list" style="margin-top: 88rpx">	  
	<view bindtap="switchDevice" data-id="{{item}}" wx:for="{{deviceList}}" wx:key="deviceKey" class="item">
		<view class="right">
			<view class="name">{{item.deviceLabel}}</view>
		</view>
		<i wx:if="{{item.selected}}" class="iconfont icon-right selected"></i>
	</view>
</view>
<loadmore loadmore="{{deviceNumber>0&&deviceFinish===false}}" finish="{{deviceNumber>0&&deviceFinish===true}}" nodata="{{deviceNumber===0}}"></loadmore>
</block>
