You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

410 lines
20 KiB
HTML

5 years ago
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<style>.notice_tip {padding-left:20px;color:#999;font-size:12px;}
.formtxt{display:inline-block;width:232px;}
.trunk-list .table2 .r .qrcodeboxwrap {padding-left:0;padding-right:20px;padding-bottom:20px;}
.qrcodebox img {width:100px;height:100px;}
.qrcodebox p {font-size:12px;margin:0;color:#666;}
.qrcodebox p span{color:red;}
.qrcodeboxwrap~.notice_tip{vertical-align:top;display:inline-block;margin-top:20px;}
.mail_suffix {position: absolute;
top: 43px;
border: 1px solid rgb(229,229,229);
border-radius: 2px;
color: #666;
font-size: 11px;
width: 230px;
padding: 0 10px;
line-height: 1.4;
z-index: 1;
background: #FFF;
height: 200px;
overflow: hidden;
overflow-y: auto;}
.mail_suffix li {
padding: 2px 0;
cursor: pointer;
}
.mail_suffix li:first-child {padding-top:4px;}
.mail_suffix li:last-child{padding-bottom:4px;}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js" ></script>
<div class="page-list normal_list promote-base_info-form">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>管理中心></span><span>账户信息</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_zhanghu.png">
<span class="title_main">账户信息</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<table class="tab jstab">
<tr>
<td class="<eq name='Think.get.type' value='0'>current<else /><empty name='Think.get.type'>current</empty></eq> first_border" ><a href="javascript:;" >基本信息</a></td>
<!-- <td class="<eq name='Think.get.type' value='1'>current</eq>"><a href="javascript:;" >结算账户信息</a></td> -->
<td class="<eq name='Think.get.type' value='2'>current</eq>" ><a href="javascript:;" >修改密码</a></td>
<td class="<eq name='Think.get.type' value='3'>current</eq> last_border" ><a href="javascript:;" >修改二级密码</a></td>
</tr>
</table>
</div>
<div class="trunk-list baseInfo">
<div class="tabpan <eq name='Think.get.type' value='0'>current<else /><empty name='Think.get.type'>current</empty></eq>">
<form action="{:U('Promote/base_info?type=0')}" novalidate="novalidate" method="post" class="base_info">
<table class="table2">
<tr style="height: 32px;">
<td class="l">用户名:</td>
<td class="r"><span class="formtxt">{$data.account}</span></td>
</tr>
<tr>
<td class="l">昵称:</td>
<td class="r">
<input type="text" class="input txt" name="nickname" id="nickname" value="{$data.nickname}" placeholder="请输入昵称">
<span id="nickname_tip"></span>
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>联系人:</td>
<td class="r">
<input type="text" class="input txt" name="real_name" id="name" value="{$data.real_name}" placeholder="请输入联系人"><span id="name_tip"></span>
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>电子邮箱:</td>
<td class="r" style="position: relative;">
<input type="email" class="input txt" name="email" data-suffix="" data-mail="" id="email" value="{$data.email}" placeholder="请输入电子邮箱">
<span id="email_tip"></span>
</td>
</tr>
<!-- <tr>-->
<!-- <td class="l"><span class="req">*</span>支付宝账号:</td>-->
<!-- <td class="r">-->
<!-- <input type="text" class="input txt" name="alipay_account" id="alipay_account" value="{$data.alipay_account}" placeholder="请输入支付宝账号">-->
<!-- <span class="notice_tip">用于自动打款</span>-->
<!-- </td>-->
<!-- </tr>-->
5 years ago
<!-- <tr>
<td class="l"><span class="req">*</span>微信账号:</td>
<td class="r">
<span class="formtxt qrcodeboxwrap">
<div class="qrcodebox">
<img src="<notempty name='wxQrcodeUrl'>{:U('qrcode',array('url'=>base64_encode(base64_encode($wxQrcodeUrl))))}<else /></notempty>">
<notempty name="data.weixin_openid">
<p class="">已绑定微信号:<span>{:rawurldecode($data['weixin_account'])}</span></p>
<else />
<p class="">扫码绑定微信账号</p>
</notempty>
</div>
</span>
<span class="notice_tip">用于自动打款</span>
</td>
</tr> -->
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="确认修改" title="" target-form="base_info">
</td>
</tr>
</table>
</form>
</div>
<!-- <div class="tabpan <eq name='Think.get.type' value='1'>current</eq>">
<form action="{:U('Promote/base_info?type=1')}" novalidate="novalidate" method="post" class="sett_info">
<table class="table2">
<tr>
<td class="l"><span class="req">*</span>结算手机号:</td>
<td class="r"><input type="text" class="input txt" name="mobile_phone" id="mobile_phone" value="{$data.mobile_phone}" placeholder="请输入结算手机号"><span id="balance_tel_tip"></span></td>
</tr>
<tr>
<td class="l"><span class="req">*</span>开户城市:</td>
<td class="r r1">
<div class="info areainfo">
<div>
<select id="s_province" name="s_province" class="areaselect1 select_gallery" style="width: 90px;"></select>  
<select id="s_city" name="s_city" class="areaselect2 select_gallery" style="width: 120px;"></select>  
<select id="s_county" name="s_county" class="areaselect3 select_gallery" style="width: 90px;"></select>
<script type="text/javascript" >
var pro="{:$data['bank_area']['0']}";
var city="{:$data['bank_area']['1']}";
var are="{:end($data['bank_area'])}";
_init_area(pro,city,are);</script>
</div>
<div id="show"></div>
</div>
<script type="text/javascript">
var Gid = document.getElementById ;
var showArea = function(){
Gid('show').innerHTML = "<h3>省" + Gid('s_province').value + " - 市" +
Gid('s_city').value + " - 县/区" +
Gid('s_county').value + "</h3>"
}
Gid('s_county').setAttribute('onchange','showArea()');
</script>
<span id="bank_area_tip"></span>
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>开户网点:</td>
<td class="r">
<input type="text" class="input txt" name="account_openin" id="account_openin" value="{$data.account_openin}" placeholder="请输入开户网点">
<span id="account_openin_tip"></span>
</td>
</tr>
<td class="l"><span class="req">*</span>收款银行:</td>
<td class="r">
<select id="bank_name" name="bank_name" style="width:252px">
<option value="">请输入收款银行</option>
</select>
<span id="bank_name_tip"></span>
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>银行卡号:</td>
<td class="r">
<input type="text" class="input txt" name="bank_card" id="bank_card" value="{$data.bank_card}" placeholder="请输入银行卡号">
<span id="bank_card_tip"></span>
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>银行户名:</td>
<td class="r">
<input type="text" class="input txt" name="bank_account" id="bank_account" value="{$data.bank_account}" placeholder="请输入银行户名">
<span id="bank_account_tip"></span>
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>身份证号:</td>
<td class="r">
<input type="text" class="input txt" name="idcard" id="idcard" value="{$data.idcard}" placeholder="请输入身份证号">
<span id="idcard_tip"></span>
</td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="submit" class="tj btn ajax-post" value="确认修改" title="" target-form="sett_info">
<input type="hidden" name="id" value="{$data.id}">
<input type="hidden" name="town" id="town" value="">
</td>
</tr>
</table>
</form>
</div> -->
<div class="tabpan <eq name='Think.get.type' value='2'>current</eq>">
<form action="{:U('Promote/base_info?type=2')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2">
<tr style="height: 32px;">
<td class="l">用户名:</td>
<td class="r"><span class="formtxt">{$data.account}</span></td>
</tr>
<tr>
<td class="l"><span class="req">*</span>旧密码:</td>
<td class="r"><input type="password" class="input txt" name="old_password" id="old_password" placeholder="请输入旧密码">
<span id="old_password_tip"></span></td>
</tr>
<tr>
<td class="l"><span class="req">*</span>新密码:</td>
<td class="r"><input type="password" class="input txt" name="password" id="password" placeholder="请输入新密码">
<span id="password_tip"></span></td>
</tr>
<tr>
<td class="l"><span class="req">*</span>确认密码:</td>
<td class="r"><input type="password" class="input txt" name="confirm_password" id="confirm_password" placeholder="请再次输入确认密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="确认修改" title="" target-form="paw_info">
</td>
</tr>
</table>
</form>
</div>
<div class="tabpan <eq name='Think.get.type' value='3'>current</eq>">
<form action="{:U('Promote/base_info?type=3')}" novalidate="novalidate" method="post" class="paw_er_info">
<table class="table2">
<tr style="height: 32px;">
<td class="l">用户名:</td>
<td class="r"><span class="formtxt">{$data.account}</span></td>
</tr>
<tr <if condition="$data.second_pwd eq ''">style="display:none"</if>>
<td class="l"><span class="req">*</span>旧二级密码:</td>
<td class="r"><input type="password" class="input txt" name="old_second_pwd" id="old_second_pwd" placeholder="请输入旧二级密码">
<span id="old_password_tip" class="noticetxt">(忘记请联系管理员)</span></td>
</tr>
<tr>
<td class="l"><span class="req">*</span>新二级密码:</td>
<td class="r"><input type="password" class="input txt" name="second_pwd" id="second_pwd" placeholder="请输入二级新密码">
<span id="password_tip"></span></td>
</tr>
<tr>
<td class="l"><span class="req">*</span>确认密码:</td>
<td class="r"><input type="password" class="input txt" name="confirm_second_pwd" id="confirm_second_pwd" placeholder="请再次输入确认密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="确认修改" title="" target-form="paw_er_info">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/mail_suffix.js"></script>
<script type="text/javascript" src="__STATIC__/bank.js"></script>
<script type="text/javascript">
var ajaxurl="{:U('Account/getArea')}";
function loadArea(areaId,areaType) {
$.post(ajaxurl,{'areaId':areaId},function(data){
if(areaType=='city'){
$('#'+areaType).html('<option value="-1">市/县</option>');
$('#district').html('<option value="-1">镇/区</option>');
}else if(areaType=='district'){
$('#'+areaType).html('<option value="-1">镇/区</option>');
}
if(areaType!='null'){
$.each(data,function(no,items){
$('#'+areaType).append('<option value="'+items.area_id+'">'+items.area_name+'</option>');
});
}
});
}
var tot="";
$("#province").change(function() {
tot+=$("#province").val();
});
$("#city").change(function() {
tot+=","+$("#city").val()
});
$("#district").change(function() {
tot+=","+$("#district").val()
});
$(".btn").click(function() {
$("#town").val(tot);
});
function add_mail_suffix(that) {
var suffix = $(that).data('suffix');
var input = $(that).closest('.mail_suffix').prev();
if(input.attr('data-mail').length>0) {
input.val(input.attr('data-mail')+suffix);
}
}
$(function() {
$('.tab td').on('click',function() {
var that = $(this);
$('.tabpan').removeClass('current');
that.siblings().removeClass('current');
that.addClass('current');
$('.tabpan').eq(that.index()).addClass('current');
return false;
});
$(".select_gallery").select2();
$('#email').focus(function () {
var val = $.trim($(this).val());
if(val) {
var index = val.indexOf('@');
if(index>-1){
var suffix = val.substring(index);
val = val.substring(0,index);
$(this).val(val).attr('data-suffix',suffix).attr('data-mail',val);
}
}
var html = '<ul class="mail_suffix">';
for(var item in mail_suffix) {
html += '<li onclick="add_mail_suffix(this)" data-suffix="'+mail_suffix[item]+'">'+mail_suffix[item]+'</li>';
}
html += '</ul>';
$(this).after(html);
$('body').click(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
if($(target).attr('id') != 'email' && $(target).attr('class') != 'mail_suffix') {
$('.mail_suffix').remove();
}
return false;
});
return false;
}).blur(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
var that = $(this);
if($(target).attr('id') == 'email' && $(target).attr('class') == 'mail_suffix') {
$('.mail_suffix').remove();
}
if(that.attr('data-mail')) {
var data_mail_index = that.attr('data-mail').indexOf('@');
if(data_mail_index>-1){
var data_mail = that.attr('data-mail');
that.val(data_mail);
that.attr('data-mail',data_mail.substring(0,data_mail_index));
that.attr('data-suffix',data_mail.substring(data_mail_index));
} else {
that.val(that.attr('data-mail')+that.attr('data-suffix'));
}
}
return false;
}).keyup(function () {
var val = $.trim($(this).val());
if(val.length>64) {val = val.substr(0,64);$(this).val(val);}
$(this).attr('data-mail',val);
return false;
});
var data_bank_name = '{$data.bank_name}';
var bank_name = '<option value="">请选择收款银行</option>';console.log(bank);
for(var bn in bank) {
if(data_bank_name == bank[bn]) {
bank_name += '<option value="'+bank[bn]+'" selected>'+bank[bn]+'</option>';
} else {
bank_name += '<option value="'+bank[bn]+'">'+bank[bn]+'</option>';
}
}
$('#bank_name').html(bank_name).select2();
AF.users.account_edit(1429);
AF.users.account_content_edit(1429);
_init_area();
_reset_area('','','');
});
</script>
</block>