<!--packageE/TeamDistribution/TeamDistribution.wxml-->


    <view class="bg"><image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/team_distribution_bg.png" alt=""></image></view>

	<view class="header">
		<view class="part-top">
			<view class="left">
				<image src="{{member.avatar_image}}" alt=""></image>
			</view>
			<view class="right">
				<view class="member-top">
					<view class="name">{{member.nickname}}</view>
				</view>
				<view wx:if="{{member.has_one_agent && member.has_one_agent.agent_level}}" class="member-bottom">{{member.has_one_agent.agent_level.name}}</view>
			</view>
		</view>
		<view class="part-bottom">
			<view>分销商人数</view>
			<view>{{total}}人</view>
		</view>
	</view>

	<view class="content">
		<view class="search">
			<view class="search-box">
			
				<input
					type="search"
					ref="search_input"
					placeholder="搜索会员昵称"
					bindconfirm="enterSearch"
					model:value="{{inputs}}"
				/>
				
				<icon class="iconfont icon-sousuo1" style="color: #ccc;" bindtap="enterSearch"></icon>
			</view>
		</view>

		<view class="data-box">
			<view class="data-item" wx:for="{{recordsList}}" wx:key="index">
				<view class="data-top">
					<view class="left">
						<image src="{{item.member.avatar_image}}" alt=""></image>
					</view>
					<view class="right">
						<view class="member-top">
							<view class="name" wx:if="{{item.member}}">{{item.member.nickname}}</view>
						</view>
						<view class="member-bottom">
							<view class="title">{{item.agent_level ? item.agent_level.name: '默认等级'}}</view>
							<view class="time">{{item.created_at}}</view>
						</view>
					</view>
				</view>

				<view class="data-bottom">
					<view class="num">订单数量： <span class="red">{{item.order[0] ? item.order[0].count : 0}}</span>个</view>
					<view class="num">订单金额： <span class="red">{{item.order[0]? item.order[0].sumPrice : 0}}</span>元</view>
				</view>
			</view>
		</view>
	</view>

