<!--packageE/Rankings/Rankings.wxml-->
<view class="ranking">
	<view>
		<van-tabs active="{{panelIndex}}" bind:change="chooseTabData" class='asdaa'>
			<block wx:for="{{mock}}" wx:key="index">
				<van-tab title="{{item}}" wx:if="{{item}}"></van-tab>
			</block>
		</van-tabs>
		<view class="tabBox">
			<!-- 头部 -->
			<view class="userpto">
				<!-- 招商 -->
				<view class="btnzs" wx:if="{{title == 'staffLevel' || title == 'merchantLevel'}}">
					<view class="{{zhaosCut == 1?'tapIn':''}}" catchtap="tapCut" data-ind="1">招商员</view>
					<view class="{{zhaosCut == 2?'tapIn':''}}" catchtap="tapCut" data-ind="2">招商中心</view>
				</view>
				<view wx:if="{{status}}" style="margin-top:50rpx;">
					<text>{{errText}}</text>
					<view class="sqbtn" catchtap="apply">去申请</view>
				</view>
				<block wx:if="{{!status}}">
					<!-- 用户信息 -->
					<view class="ptoEm">
						<view>
							<image src="{{list.information.avatar_image}}"></image>
							<view
								style="display: flex;align-items: center;justify-content: center;margin-top: -26rpx;box-sizing: border-box;">
								<view class="noM" style="">
									NO.{{list.countNO}}
									<icon class="noMicon" class="iconfont icon-rank_rankframe"
										style="position: absolute;left: -17px;top: -28rpx;font-size: 40rpx;color: #ffb43e;"></icon>
								</view>
							</view>
						</view>
						<view class="userName">
							{{list.information.nickname}}
						</view>
					</view>
					<!-- 收益 -->
					<view class="earnings">
						<view class="earningsLis">
							<text style="font-size: 32rpx;">{{list.grand_total}}</text>
							<text style="font-size: 28rpx;">累计收益(元)</text>
						</view>
						<view class="earningsLis">
							<text style="font-size: 32rpx;">{{list.usable_total}}</text>
							<text style="font-size: 28rpx;">可以提现(元)</text>
						</view>
						<view class="Withdraw" catchtap="goTx">
							提现
						</view>
					</view>
				</block>
			</view>

			<view class="member">
				<!-- 查看详情 -->
				<!--  除了微店 -->
				<view class="checkDetails" wx:if="{{title !='micro' && !status}}">
					<view class="check_top" catchtap="goDetail">
						<text>查看详情</text>
						<icon class="iconfont icon-advertise-next"></icon>
					</view>
					<view class="check_btn" wx:if="{{title == 'commission'}}">
						<view class="check_left"><text>{{list.countNum}}</text><text>我的客户</text></view>
						<view class="check_right"><text>{{list.countOrder}}</text><text>{{commission_name ? commission_name : '分销订单'}}</text></view>
					</view>
					<view class="check_btn" wx:if="{{title == 'teamDividend'}}">
						<view class="check_left"><text>{{list.countNum}}</text><text>我的客户</text></view>
						<view class="check_right"><text>{{list.countOrder}}</text><text>团队业绩</text></view>
					</view>
					<view class="check_btn" wx:if="{{title == 'staffLevel' || title == 'merchantLevel'}}">
						<view class="check_left"><text>{{list.countNum}}</text><text>我的供应商</text></view>
						<view class="check_right"><text>{{list.countOrder}}</text><text>我的门店</text></view>
					</view>
				</view>
				<!-- 微店 -->
				<view class="checkDetails" wx:if="{{title =='micro' && !status}}">
					<view class="storeBtn">
						<text>店长中心</text>
						<view class="storeTap" catchtap="goWd">进入</view>
					</view>
				</view>
				<!-- 排行 -->
				<view class="rankList">
					<view class="rankTop">
						<text class="title">收益排行榜</text>
						<view class="rankTab">
							<view class="rankTable" style="flex:0.5;padding-left: 15rpx;">排名</view>
							<view class="rankTable">会员</view>
							<view class="rankTable">累计收益</view>
						</view>
						<view class="rankLis" wx:for="{{list.rankingCommission.data}}" wx:key="index" wx:for-item="val">
							<view class="rankTables" style="font-size:40rpx;flex:0.6;">{{index+1 < 10 ? ('0' + (index+1)) : index+1}}
							</view>
							<view class="rankTabUser">
								<image src="{{val.has_one_member?val.has_one_member.avatar_image:val.has_one_members.avatar_image}}">
								</image>
								<text>{{val.has_one_member?val.has_one_member.nickname:val.has_one_members.nickname}}</text>
							</view>
							<view class="rankTables">{{val.total_amount}}</view>
						</view>
						<view style="text-align: center;color: #999;" wx:if="{{current_page >= last_page}}">没有更多了</view>
						<view style="text-align: center;color: #999;" wx:else>加载更多</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</view>
<view class="fiexdBtn">
	<view class="shouye" catchtap="goHome">
		<icon class="iconfont icon-home-page"></icon>
		<view>首页</view>
	</view>
	<view class="syBtn" catchtap="Earnings">{{txTitle}}</view>
	<view class="shareBtn" catchtap="showTap">分享</view>
</view>












<!-- 分享 -->
<van-popup bind:click-overlay="couponclose" show="{{shareShow}}" overlay="{{true}}" round
	closeable close-on-click-overlay="true" bind:close="couponclose">
	<view class="shareBox">
		<!-- <view class="shareTop">
			<icon class="iconfont icon-guanbi" catchtap="couponclose"></icon>
		</view> -->
		<!-- <view class="shartConten">
			<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(49).png"></image>
		</view>
		<view class="shareBottom">
			<view class="shareLeft">
				<view class="leftUser">
					<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(49).png"></image>
					<view class="leftName">会员昵称会员昵会员昵称会员昵</view>
				</view>
				<view class="leftTit">
					邀您参与经销商排行榜排行榜字数最多两行
				</view>
			</view>
			<view class="shareRight">
				<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(49).png"></image>
			</view>
		</view> -->
		<image src="{{image_url}}?{{dataNows}}" bindlongtap="saveImg" mode="aspectFit"></image>
	</view>
</van-popup>
<!-- 收益 -->
<van-popup bind:click-overlay="couponclose" show="{{showEarnings}}" overlay="{{true}}"
	custom-style="border-radius: 27rpx;">
	<view class="Earnings">
		<icon class="iconfont icon-guanbi" catchtap="couponclose"></icon>
		<view class="code">
			<image src="{{thumb}}"></image>
		</view>
		<text>{{txTitle}}</text>
	</view>
</van-popup>