<!-- pages/member/myRelationship/myRelationship.wxml -->
<!-- <shopfoot></shopfoot> -->
<view class="myrelationship">
		<view class="userTop">
				<view class="left">
						<image src="{{self_info.avatar}}" mode='aspectFill' />
				</view>
				<view class="right">
						<view class="name">{{self_info.nickname}}</view>
						<view class="userId">{{self_info.uid}}</view>
				</view>
				<div class="goMarket" data-marketid="0" bindtap="goMarket" wx:if="{{my_achievement}}">我的市场</div>
		</view>
		<view class="referee">
				<block wx:if="{{show_parents == 0}}">
					<view class="h1" wx:if="{{isShowClient}}">推荐人</view>
					<view class="referee_message" wx:if="{{isShowClient}}">
							<view class="left">
									<image src="{{myReferral.avatar?myReferral.avatar:'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/photo-mr.jpg'}}" mode='aspectFill' />
							</view>
							<view class="right" style="flex:1;">
									<view class="top">
											<view class="top_left">昵称:{{myReferral.nickname}}</view>
											<view class="top_right" wx:if="{{myReferral.uid}}">{{myReferral.uid}}</view>
									</view>
									<view class="bottom" wx:if="{{is_recommend_wechat==1}}">
											<view class="cellphone" wx:if="{{myReferral.referrer_phone}}">
													<view class="iconfont icon-bc_tel"></view>
													<view class="number">{{myReferral.referrer_phone}}</view>
											</view>
											<view class="wechat" wx:if="{{myReferral.referrer_wechat}}">
													<view class="iconfont icon-bc_tel"></view>
													<view class="number">{{myReferral.referrer_wechat}}</view>
											</view>
									</view>
							</view>
							<view class="go-btn" wx:if="{{my_referral_parents.is_show == '1'}}" catchtap="changeSuperior">></view>
					</view>
				</block>
				<block wx:if="{{my_referral_parents.is_show == '1'&&show_parents == 1}}">
					<view class="h1">推荐人的上级</view>
					<view class="referee_message">
							<view class="left">
									<image src="{{my_referral_parents.avatar ? my_referral_parents.avatar : 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/photo-mr.jpg'}}" mode='aspectFill' />
							</view>
							<view class="right" style="flex:1;">
									<view class="top">
											<view class="top_left">昵称:{{my_referral_parents.nickname}}</view>
											<view class="top_right" wx:if="{{my_referral_parents.uid}}">
													{{my_referral_parents.uid}}
											</view>
									</view>
									<view class="bottom" wx:if="{{is_recommend_wechat == 1}}">
											<view class="cellphone" wx:if="{{my_referral_parents.referrer_phone}}">
													<view class="iconfont icon-bc_tel"></view>
													<view class="number">{{ my_referral_parents.referrer_phone }}</view>
											</view>
											<view class="wechat" wx:if="{{ my_referral_parents.referrer_wechat }}">
													<view class="iconfont icon-bc_tel"></view>
													<view class="number">{{ my_referral_parents.referrer_wechat }}</view>
											</view>
									</view>
							</view>
							<view class="go-btn" catchtap="changeSuperior"><text decode='true'>&lt;</text></view>
					</view>
				</block>
				<view class="referee_list">
						<view class="li li_1" bind:tap="viewAmount" >
								<view class="top">{{agent.agent_num?agent.agent_num:'客户数量'}}(人）</view>
								<view class="bottom">{{myReferral.child_total}}</view>
						</view>
						<view class="li li_2" bind:tap="viewAmount" data-total="{{ true }}">
								<view class="top">{{agent.agent_count?agent.agent_count:'总客户数'}}(人)</view>
								<view class="bottom">{{myReferral.team_total}}</view>
						</view>
						<view class="li li_3">
								<view class="top">{{agent.agent_order?agent.agent_order:'客户订单'}}(元)</view>
								<view class="bottom">{{myReferral.child_order_money}}</view>
						</view>
						<view class="li li_4">
								<view class="top">
										{{agent.agent_order_count?agent.agent_order_count:'客户总订单'}}（{{language['元']}}）
								</view>
								<view class="bottom">{{myReferral.team_order_money}}</view>
						</view>
						<view class="li li_5">
								<view class="top">{{agent.agent_goods_num?agent.agent_goods_num:'客户总支付商品数量'}}</view>
								<view class="bottom">{{myReferral.team_goods_total}}</view>
						</view>
				</view>
				<view class="referee_tips">
						<view class="li">注:所有数据为截至到昨天汇总数据！</view>
						<view class="li">订单数、订单总额统计已完成的订单数据</view>
				</view>
		</view>
		<view class="info_list">
				<van-tabs active="{{activeNameidx}}" bind:click="handleClick">
						<van-tab wx:if="{{level1&&level1.is_show}}" title="{{(title1?title1:level1.level)+'('+level1.total+'人)'}}">
								<view class="content">
										<view class="search">
												<view class="iconfont icon-sousuo1"></view>
												<view class="right">
														<input type="text" value="{{keyword1}}" placeholder="搜索会员姓名/昵称/手机号" bindinput="searchbtn" bindconfirm="search" />
												</view>
										</view>
										<view class="ul">
												<view class="li" wx:for="{{new_content}}" wx:for-index="idx_1" wx:for-item="itemName_1" wx:key="idx_1" bind:tap="viewMemberOverride" data-id="{{ itemName_1.id }}">
														<view class="top">
																<view class="left">
																		<view class="pic">
																				<image src="{{itemName_1.avatar}}" bindtap="goMarket" data-marketid="{{itemName_1.id}}" mode='aspectFill' />
																				<view class="invitershow" wx:if="{{itemName_1.inviter==1}}">
																						<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/temporary@2x.png" mode='aspectFill' />
																				</view>
																		</view>
																		<view class="name_message">
																				<view class="name_message_top">
																						<view class="name">{{itemName_1.nickname}}</view>
																						<view class="member_id">{{itemName_1.id}}</view>
																				</view>
																				<view class="realname" wx:if="{{itemName_3.realname !== 0 && realname}}">
																						{{itemName_1.realname}}
																				</view>
																				<view class="date">{{itemName_1.createtime}}</view>
																		</view>
																</view>
																<view class="Wechat" data-item="{{itemName_1}}" catchtap="handleToggle" wx:if="{{itemName_1.wechat!==0&&WeChat}}">
																		<view class="fa fa-wechat" style="font-size: 40rpx;"></view>
																</view>
																<view class="right" wx:if="{{itemName_1.mobile!==0&&phone}}" data-mobile="{{itemName_1.mobile}}" catchtap="mobilebtn">
																		拨号
																</view>
														</view>
														<view class="order_info">
																<view class="order_ul order_number">
																		<view class="order_li">订单数：{{itemName_1.child_order_total}}个</view>
																		<view class="order_li">{{name}}数量：{{itemName_1.team_total}}个</view>
																</view>
																<view class="order_ul order_sum">
																		<view class="order_li">
																				订单总额：{{itemName_1.child_order_money}}{{language['元']}}
																		</view>
																		<view class="order_li">
																				{{name}}订单：{{itemName_1.team_order_money}}{{language['元']}}
																		</view>
																</view>
														</view>
												</view>
										</view>
								</view>
						</van-tab>
						<van-tab wx:if="{{level2&&level2.is_show}}" title="{{(title2?title2:level2.level)+'('+level2.total+'人)'}}">
								<view class="content">
										<view class="search">
												<view class="iconfont icon-sousuo1"></view>
												<view class="right">
														<input type="text" value="{{keyword2}}" placeholder="搜索会员姓名/昵称/手机号" bindinput="searchbtn" bindconfirm="search" />
												</view>
										</view>
										<view class="ul">
												<view class="li" wx:for="{{new_content}}" wx:for-index="idx_2" wx:for-item="itemName_2" wx:key="idx_2" bind:tap="viewMemberOverride" data-id="{{ itemName_2.id }}">
														<view class="top">
																<view class="left">
																		<view class="pic">
																				<image src="{{itemName_2.avatar}}" bindtap="goMarket" data-marketid="{{itemName_2.id}}" mode='aspectFill' />
																				<view class="invitershow" wx:if="{{itemName_2.inviter==1}}">
																						<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/temporary@2x.png" mode='aspectFill' />
																				</view>
																		</view>
																		<view class="name_message">
																				<view class="name_message_top">
																						<view class="name">{{itemName_2.nickname}}</view>
																						<view class="member_id">{{itemName_2.id}}</view>
																				</view>
																				<view class="realname" wx:if="{{itemName_3.realname !== 0 && realname}}">
																						{{itemName_1.realname}}
																				</view>
																				<view class="date">{{itemName_2.createtime}}</view>
																		</view>
																</view>
																<view class="Wechat" data-item="{{itemName_2}}" catchtap="handleToggle" wx:if="{{itemName_2.wechat!==0&&WeChat}}">
																		<view class="fa fa-wechat" style="font-size: 40rpx;"></view>
																</view>
																<view class="right" wx:if="{{itemName_2.mobile!==0&&phone}}" data-mobile="{{itemName_2.mobile}}" catchtap="mobilebtn">
																		拨号
																</view>
														</view>
														<view class="order_info">
																<view class="order_ul order_number">
																		<view class="order_li">订单数：{{itemName_2.child_order_total}}个</view>
																		<view class="order_li">{{name}}数量：{{itemName_2.team_total}}个</view>
																</view>
																<view class="order_ul order_sum">
																		<view class="order_li">
																				订单总额：{{itemName_2.child_order_money}}{{language['元']}}
																		</view>
																		<view class="order_li">
																				{{name}}订单：{{itemName_2.team_order_money}}{{language['元']}}
																		</view>
																</view>
														</view>
												</view>
										</view>
								</view>
						</van-tab>
						<van-tab wx:if="{{level3&&level3.is_show}}" title="{{(title3?title3:level3.level)+'('+level3.total+'人)'}}">
								<view class="content">
										<view class="search">
												<view class="iconfont icon-sousuo1"></view>
												<view class="right">
														<input type="text" value="{{keyword3}}" placeholder="搜索会员姓名/昵称/手机号" bindinput="searchbtn" bindconfirm="search" />
												</view>
										</view>
										<view class="ul">
												<view class="li" wx:for="{{new_content}}" wx:for-index="idx_3" wx:for-item="itemName_3" wx:key="idx_3">
														<view class="top">
																<view class="left">
																		<view class="pic">
																				<image src="{{itemName_3.avatar}}" bindtap="goMarket" data-marketid="{{itemName_3.id}}" mode='aspectFill' />
																				<view class="invitershow" wx:if="{{itemName_3.inviter==1}}">
																						<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/temporary@2x.png" mode='aspectFill' />
																				</view>
																		</view>
																		<view class="name_message">
																				<view class="name_message_top">
																						<view class="name">{{itemName_3.nickname}}</view>
																						<view class="member_id">{{itemName_3.id}}</view>
																				</view>
																				<view class="realname" wx:if="{{itemName_3.realname !== 0 && realname}}">
																						{{itemName_1.realname}}
																				</view>
																				<view class="date">{{itemName_3.createtime}}</view>
																		</view>
																</view>
																<view class="Wechat" data-item="{{itemName_3}}" catchtap="handleToggle" wx:if="{{itemName_3.wechat!==0&&WeChat}}">
																		<view class="fa fa-wechat" style="font-size: 40rpx;"></view>
																</view>
																<view class="right" wx:if="{{itemName_3.mobile!==0&&phone}}" data-mobile="{{itemName_3.mobile}}" catchtap="mobilebtn">
																		拨号
																</view>
														</view>
														<view class="order_info">
																<view class="order_ul order_number">
																		<view class="order_li">订单数：{{itemName_3.child_order_total}}个</view>
																		<view class="order_li">{{name}}数量：{{itemName_3.team_total}}个</view>
																</view>
																<view class="order_ul order_sum">
																		<view class="order_li">
																				订单总额：{{itemName_3.child_order_money}}{{language['元']}}
																		</view>
																		<view class="order_li">
																				{{name}}订单：{{itemName_3.team_order_money}}{{language['元']}}
																		</view>
																</view>
														</view>
												</view>
										</view>
								</view>
						</van-tab>
				</van-tabs>
		</view>
</view>