setting.wxml 3 KB
<!--pages/me/setting.wxml-->
<nav hasHome>{{user.id ? '编辑联系人' : '新建联系人'}}</nav>
<view class="page padding-top">
	<view class="padding-lr-lg">
		<view class="view flex align-center justify-between " style="height: 100rpx;">
			<image src="http://nosqn.colorcun.com/detail/x%20%2816%29.png" style="width: 40rpx;height: 40rpx;"></image>
			<view class="view flex-treble flex align-center margin-left-sm solid-bottom" style="height: 100rpx;">
				<input class="name flex-treble" placeholder="请填写预订人姓名"
					   bindinput="changeInput"
					   data-key="name"
					   value="{{user.name}}"
					   bindkeyboardheightchange="keyboardheightchange"
					   adjust-position="{{false}}"
					   placeholder-class="input-pl" maxlength="10"/>
				<view class="flex text-30 sex">
					<view bindtap="changeInput"
						  data-key="sex"
						  data-val="1"
						  class="switch-item text-bold {{user.sex==1?'checked':''}}">先生</view>
					<view bindtap="changeInput"
						  data-key="sex"
						  data-val="2"
						  class="text-bold margin-left-sm {{user.sex==2?'checked':''}}">女士</view>
					<view bindtap="changeInput"
						  data-key="sex"
						  data-val="3"
						  class="text-bold margin-left-sm {{user.sex==3?'checked':''}}">公司</view>
				</view>
			</view>
		</view>
		<view class="view flex align-center justify-between " style="height: 100rpx;">
			<image src="http://nosqn.colorcun.com/detail/x%20%2817%29.png" style="width: 40rpx;height: 40rpx;"></image>
			<view class="view flex-treble flex align-center margin-left-sm solid-bottom" style="height: 100rpx;">
				<input class="phone flex-treble" placeholder="请填写联系方式"
					   bindinput="changeInput"
					   data-key="phone"
					   type="number"
					   value="{{user.phone}}"
					   adjust-position="{{false}}"
					   placeholder-class="input-pl" maxlength="11"/>
				<phone bindgetphone="getphone">
					<view class="txt-28-h text-blue">一键录入</view>
				</phone>
			</view>
		</view>
		<view class="flex align-center justify-between" style="height: 108rpx;">
			<view class="txt-34-h text-bold">设置默认联系人</view>
			<switch color="#42A5FF"
					checked="{{user.is_default==1 ? true : false}}"
					data-key="is_default"
					data-val="{{user.is_default==1 ? 0 : 1}}"
					bindchange="changeInput"/>
		</view>
		<view class="gray-font font28r margin-bottom" style="line-height:40rpx;">提醒:每次预订时,自动将默认联系人作为预订联系人,如有需要,商家将联系预订联系人</view>
		<view class="txt-30-h text-red padding-top"
			  wx:if="{{user.id}}" bindtap="confirm">删除联系人</view>
	</view>
	<view class="save-button round bg-blue-blue" bindtap="saved">
		<view class="share-but text-bold">保存</view>
	</view>
</view>
<confirm id="confirm" cancelText="取消" cancelColor="#42A5FF"
		 confirmText="删除" confirmColor="#FFFFFF"
		 body="确定要删除该常用预订信息吗?" header=""
		 cla="deletuser"
		 bindevent="deletuser"></confirm>
		 
<menu></menu>	
<service></service>