<!--pages/member/editmobile/editmobile.wxml-->
<!-- <import src="../../../wxParse/wxParse.wxml" /> -->
<view class="topback" style="background-image:url({{top_img?top_img:'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/logindefault_bg@2x.png'}})">
	<view style="padding-top:{{statusBarHeight}}rpx" class="{{showBack?'showtop':'nonetop'}}">
		<van-icon name='arrow-left' size="45rpx" catchtap="back" ></van-icon>
	</view>
</view>
<view class="register" style="border-radius: 50rpx;background:#fff;overflow: hidden;width:100%;margin-top:-40rpx;">
		<view class="nikeName">{{nickName}}</view>
		<view class="content">
			<view class="ul area_number" wx:if="{{country_code==1}}">
				<view class="li">
					<view class="right">
						<van-field label="国家区号" type="number" value="{{form.country}}" placeholder="+86" border="{{false}}" bind:blur="countryinp" />
					</view>
				</view>
			</view>
			<view class="login_info ul">
				<view class="li captcha" wx:if='{{imgcode}}'>
					<view class="left">
						<van-field type="text" value="{{form.captcha}}" placeholder="请输入右侧图形验证码" border="{{false}}" bind:blur="captchainp" />
					</view>
					<view class="right">
						<image mode="widthFix" src="{{imgcode}}" catchtap="getimgdata" wx:if='{{imgcode}}' />
					</view>
				</view>
				<view class="li code">
					<view class="left">
						<van-field type="tel"  value="{{form.mobile}}" placeholder="请输入手机号" border="{{false}}" bind:inp="mobileinp" bind:inp='sjnz' />
					</view>
					<view class="right">
						<view class="codeBtn">选择授权手机号
							<button open-type='getPhoneNumber' bindgetphonenumber="getPhoneNumber"></button>
						</view>
					</view>
				</view>
				<view class="li code">
					<view class="left">
						<van-field type="text" value="{{form.code}}" placeholder="请输入验证码" border="{{false}}" bind:inp="codeinp" maxlength="4" type="number" />
					</view>
					<view class="right {{start1?'disabled':''}}">
						<view class="codeBtn" catchtap="sendCode">{{codetext}}</view>
					</view>
				</view>
				<view class="li code" wx:if="{{invite}}">
					<view class="left">
						<van-field type="text" value="{{form.invite_code}}" placeholder="请输入邀请码" border="{{false}}" bind:inp="inviteinp" />
					</view>
					<view class="right" wx:if="{{default_invite}}">
						<view class="codeBtn" catchtap="fillInCode" >默认邀请码</view>
					</view>
				</view>
				<view class="li" wx:if='{{is_password == "1"}}'>
					<van-field type="{{visibleSet?'text':'password'}}" style="width:100%" value="{{form.password}}" placeholder="设置密码" border="{{false}}" bind:inp="passwordinp" clearable>
						<icon slot="right-icon" class="iconfont {{visibleSet?'icon-onlineCar_f':'icon-onlineCar_g'}}" 
							style="font-size: 30px;" catchtap="SetPwdClick"
						></icon>
					</van-field>
				</view>
				<view class="li" wx:if='{{is_password == "1"}}'>
					<van-field type="{{visibleSure?'text':'password'}}" style="width:100%" value="{{form.confirm_password}}" placeholder="确认密码" border="{{false}}" bind:inp="conpasswordinp" clearable>
						<icon slot="right-icon" class="iconfont {{visibleSure?'icon-onlineCar_f':'icon-onlineCar_g'}}" 
							style="font-size: 30px;" catchtap="surePwdClick"
						></icon>
					</van-field>
				</view>
			</view>
			<!-- 会员资料所在地信息 -->
			<view wx:if="{{form_address && editType!='1'}}">
				<view style="padding: 5px 15px;background: #e3e3e3;margin-top: 10rpx;color: #666666;">所在地信息</view>
				<van-cell-group>
					<van-cell bind:click="showAddBtn_v1" title="所在地区" value="{{districtName}}" is-link />
					<view class="textcontent">
						<textarea wx:if="{{!show2}}" placeholder="请输入详细地址" value="{{form.address}}" bindblur="addressinp"></textarea>
					</view>
				</van-cell-group>
			</view>
			<!-- 会员资料其他信息 -->
			<!-- 会员资料姓名 -->
			<view wx:if="{{form_name && editType!='1'}}" style="padding:0 44rpx;" class="form_sex">
				<van-cell-group >
					<view class="realnameView">
						<van-cell title="姓名" required="{{name_must}}"/>
						<input type="text" placeholder="请输入您的姓名" bindinput="realnameInp" value="{{form.realname}}"/>
					</view>
				</van-cell-group>
			</view>
			<!-- 会员资料性别 -->
			<view wx:if="{{form_sex}}" style="padding:0 44rpx;" class="form_sex">
				<van-cell-group >
					<van-cell bind:click="showSexInfo" title="性别" value="{{sexName?sexName:'请选择性别'}}" is-link />
				</van-cell-group>
			</view>
			<!-- 会员资料生日 -->
			<view wx:if="{{form_birthday}}" style="padding:0 44rpx;" class="form_sex">
				<van-cell-group >
					<picker mode="date" value="{{date_v1}}" start="1900-01-01" end="{{date_v1}}" bindchange="bindDateChange_v1">
						<van-cell bind:click="openPicker_v1" title="生日" value="{{form.birthday?form.birthday:'请选择生日'}}" is-link />
					</picker>
				</van-cell-group >
			</view>
			<view class="rest" wx:if="{{editType!='1'&& isForm}}">
				<view style="padding: 5px 15px;background: #e3e3e3;margin-top: 10rpx;color: #666666;">其他信息</view>
				<van-cell-group>
					<view wx:for-item="cItem" wx:for-index="cItemidx" wx:key="{{cItemidx}}" wx:for="{{customDatas}}" class="inp_content">
						<view class="left {{formOpen ? 'required' : ''}}">{{cItem.name}}：</view>
						<view class="right">
							<van-field value="{{cItem.value}}" placeholder='{{"请输入"+cItem.name}}' border="{{ false }}" bind:blur="cItemInp" data-citemidx="{{cItemidx}}" />
						</view>
					</view>
				</van-cell-group>
			</view>
			<!-- 自定义字段 -->
			<view class="cell_box" wx:if="{{is_custom}}">
				<view class="title">{{custom_title+"信息"}}</view>
				<!-- <van-cell-group>
					<van-cell title="{{custom_title}}" bind:click="editCustom" value="{{custom_value}}"  />
				</van-cell-group> -->
				<van-cell-group>
					<view class="customBox" >
						<view style="color: #555;font-size: 28rpx;white-space: nowrap;display: flex;align-items: center;padding-left: 44rpx;">{{custom_title}}：</view>
						<input type="text" value="{{form.custom_value}}" bindinput="editCustom" style="padding: 10px 15px;flex: 1;"></input>
					</view>
				</van-cell-group>
			</view>

			<view style="padding:0 20rpx;" wx:if="{{form_id}}">
				<diyform datas="{{datas}}" modeType="single" wx:if="{{form_id}}" desThumb="{{false}}" memberBtn="{{false}}"
				 params="{{'returnData'}}" bindgofunarr="postDiy" class="dsfrom"></diyform>
			</view>
			<view class="agreement" wx:if="{{agreementStatus || PlatformAgreement}}">
				<view class="left">
					<van-checkbox value="{{agreementCB}}" bind:change="agreementCBinp" checked-color="#f15353" shape="{{true}}">
					</van-checkbox>
				</view>
				<view class="right">
					<view class="span">我已阅读、理解并接受<text catchtap="goAgreement" wx:if="{{agreementStatus}}">《{{protocol_title || '会员注册协议'}}》</text><text wx:if="{{PlatformAgreement}}" catchtap="openPlatformAgreement">《{{agreement_name}}》</text></view>
				</view>
			</view>
		</view>
		<view class="btn">
			<view class="button" catchtap="getPrepBind">确认授权开通并绑定会员</view>
		</view>

	
</view>

<van-action-sheet show="{{showSex}}" actions="{{sexItems}}" bind:close="sexClose" bind:select="sexSelectBtn" cancel-text="取消" bind:cancel="sexClose" />
<block wx:for="{{diydata}}" wx:key="index">
	<block wx:if="{{item.type == 'diyselect'}}">
		<van-action-sheet show="{{item.diysishow}}" data-index="{{index}}" actions="{{item.sitem}}" bind:close="sitemClose" bind:select="sitemSelectBtn" data-idex="{{index}}" cancel-text="取消" bind:cancel="sitemClose" />
	</block>
</block>
<van-popup custom-style="width:620rpx;overflow:auto;border-radius: 21rpx;" show="{{show2}}"  overlay="{{true}}">
<!-- style="padding-top:{{showBack?statusBarHeight+10:statusBarHeight}}rpx" -->
	<view class="resContent" >
		<van-nav-bar title="{{protocol_title || '协议'}}" fixed="{{true}}" left-text="" right-text=""  bind:click-left="popClose" />
		<view class="p">
			<view>
				<rich-text nodes="{{protocol_content}}"></rich-text>
			</view>
		</view>
		<view catchtap='popClose' style="width: 408rpx;height: 74rpx;background-color: #f04d4d;border-radius: 6rpx;font-size: 32rpx;color: #ffffff;margin:0 auto;margin-top:48rpx;margin-bottom:34rpx;text-align: center;line-height: 74rpx;">确定</view>
	</view>
</van-popup>

<van-popup custom-style="width:620rpx;overflow:auto;border-radius: 21rpx;" show="{{showPlatformAgreement}}"  overlay="{{true}}">
	<view class="resContent" >
		<van-nav-bar title="{{agreement_name}}" fixed="{{true}}" left-text="" right-text=""  bind:click-left="popClose" />
		<view class="p">
			<view>
				<rich-text nodes="{{PlatformAgreement}}"></rich-text>
			</view>
		</view>
		<view catchtap='closePlatformAgreement' style="width: 408rpx;height: 74rpx;background-color: #f04d4d;border-radius: 6rpx;font-size: 32rpx;color: #ffffff;margin:0 auto;margin-top:48rpx;margin-bottom:34rpx;text-align: center;line-height: 74rpx;">确定</view>
	</view>
</van-popup>

<block wx:for="{{diydata}}" wx:key="index">
	<block wx:if="{{item.type == 'diycity'}}">
		<view class="b-mask {{item.showAdd}}" data-idex="{{index}}" bindtap="_closeDateLw"></view>
		<view class="dateBe {{item.showAdd}}">
			<view class="head">
				<view class="ll" data-idex="{{index}}" bindtap="_closeDateLw">取消</view>
				<view class="rr" data-idex="{{index}}" bindtap="resultAdd">确定</view>
			</view>
			<view class="main">
				<picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{[pickerValue[0],pickerValue[1],pickerValue[2]]}}" bindchange="bindChange">
					<picker-view-column id="provinceData">
						<view wx:for="{{provinceData}}" wx:for-index="pidx" wx:key="{{pidx}}" style="line-height: 50px">{{item.areaname}}</view>
					</picker-view-column>
					<picker-view-column id="cityData">
						<view wx:for="{{cityData}}" wx:for-index="pidx" wx:key="{{pidx}}" style="line-height: 50px">{{item.areaname}}</view>
					</picker-view-column>
					<picker-view-column id="districtData">
						<view wx:for="{{districtData}}" wx:for-index="pidx" wx:key="{{pidx}}" style="line-height: 50px">{{item.areaname}}</view>
					</picker-view-column>
				</picker-view>
			</view>
		</view>
	</block>
</block>
<!-- <block wx:for="{{diydata}}" wx:key="index">
	<block wx:if="{{item.type == 'diydate'}}">
		<van-popup position="bottom" show="{{item.timeShow}}" data-idex="{{index}}" bind:close="PickerClose">
			<van-datetime-picker type="date" value="{{currentDate}}" data-idex="{{index}}" bind:cancel="PickerClose"
			 bind:confirm="birthdayconfirm" bind:input="PickerChange" />
		</van-popup>
	</block>
</block> -->
<van-popup show="{{showChangeID}}" round close-on-click-overlay="{{false}}">
	<view class="changeId_main">
		<icon class="iconfont icon-toast_warn"></icon>
		<view class="changeId_warnTitel">重要提示</view>
		<view class="changeId_warnText">
			当前绑定绑定操作会导致用户ID变更：原会员ID:{{ changidInfo.uid }}，变更后会员ID:{{ changidInfo.change_uid }}；绑定后所有数据记录以变更后会员ID{{ changidInfo.change_uid }}为准，<text style="color:#d53125;">原会员ID{{ changidInfo.uid }}数据将被删除，数据不会进行合并，且不可找回！</text>请谨慎操作！
			<view>绑定后请注意重新生成推广海报、重新发送推广链接！</view>
		</view>
		<view class="changeId_Btn" catchtap="register">确认合并</view>
		<view class="changeId_Btn changeId_Btn_other" catchtap="closeChangeId">取消</view>
	</view>
</van-popup>
<view class="b-mask {{showAdd_v1}}" bindtap="_closeDateLw_v1"></view>
<view class="dateBe {{showAdd_v1}}">
  <view class="head">
    <view class="ll" bindtap="_closeDateLw_v1">取消</view>
    <view class="rr" bindtap="resultAdd_v1">确定</view>
  </view>
  <view class="main">
    <picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{[pickerValue[0],pickerValue[1],pickerValue[2]]}}" bindchange="bindChange">
      <picker-view-column id="provinceData">
        <view wx:for="{{provinceData}}" wx:key="index" style="line-height: 50px">{{item.areaname}}</view>
      </picker-view-column>
      <picker-view-column id="cityData">
        <view wx:for="{{cityData}}" wx:key="index" style="line-height: 50px">{{item.areaname}}</view>
      </picker-view-column>
      <picker-view-column id="districtData">
        <view wx:for="{{districtData}}" wx:key="index" style="line-height: 50px">{{item.areaname}}</view>
      </picker-view-column>
    </picker-view>
  </view>
</view>
<!-- <shopfoot></shopfoot> -->