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.
128 lines
4.1 KiB
HTML
128 lines
4.1 KiB
HTML
<extend name="Public/base"/>
|
|
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
|
|
|
<block name="body">
|
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
<h3 class="page_title">{$meta_title}</h3>
|
|
<p class="description_text"></p>
|
|
</div>
|
|
|
|
<div class="tab-wrap">
|
|
<div class="tab-content tabcon1711 tabcon17112">
|
|
<div id="tab1" class="tab-pane in tab1">
|
|
<form class="form-horizontal OSS form_info_ml">
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
|
|
<tr>
|
|
<td class="l noticeinfo">打款验证手机号</td>
|
|
<td class="r table_radio">
|
|
<input name="mobile" type="text" data-mobile="{$mobile}" value="{$mobile}" class="">
|
|
<span class="notice-text"></span>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="l noticeinfo">当前账号余额</td>
|
|
<td class="r table_radio">
|
|
<div>{$money}元</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
<input type="hidden" name="name" value="transfer_set">
|
|
</form>
|
|
<div class="form-item cf">
|
|
<button class="submit_btn mlspacing" id="submit">
|
|
保存
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</block>
|
|
|
|
<block name="script">
|
|
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
|
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
|
|
<script type="text/javascript">
|
|
//导航高亮
|
|
highlight_subnav("{:U('Payment/transfer_set')}");
|
|
var saveurl = "{:U('saveTransferSet')}";
|
|
$(function(){
|
|
//支持tab
|
|
$("#submit").on("click",function(){
|
|
var mobile = $.trim($("input[name='mobile']").val());
|
|
var ym = $("input[name='mobile']").data("mobile");
|
|
if(mobile == ym){
|
|
layer.msg("新旧账号一致,无需修改");
|
|
return false;
|
|
}
|
|
//请求验证码
|
|
if (mobile == '') {
|
|
alert("手机号不能为空");
|
|
return false;
|
|
}
|
|
if (mobile.length !== 11 || !(/^[1][3456789][0-9]{9}$/.test(mobile))) {
|
|
layer.msg("格式不正确");
|
|
return false;
|
|
}
|
|
$.ajax({
|
|
type:'post',
|
|
dataType:'json',
|
|
data:'phone='+mobile,
|
|
url:'{:U("Public/telsafecode")}',
|
|
success:function(data) {
|
|
if (data.status ==1) {
|
|
//弹框
|
|
checkcode(mobile);
|
|
} else {
|
|
alert(data.msg);
|
|
}
|
|
},
|
|
error:function() {
|
|
alert('服务器开小差了,请稍后再试。');
|
|
// checkcode(mobile);
|
|
}
|
|
});
|
|
})
|
|
function checkcode(mobile){
|
|
layer.prompt({
|
|
formType: 0,
|
|
value: '',
|
|
title: '验证码已发生到原手机,请输入原手机',
|
|
area: ['380px', '190px'] //自定义文本域宽高
|
|
}, function(value, index, elem){
|
|
if(value != ''){
|
|
saveTransferSet(value,mobile)
|
|
}else{
|
|
layer.closeAll();
|
|
}
|
|
});
|
|
}
|
|
|
|
function saveTransferSet(value,mobile){
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "{:U('saveTransferSet')}",
|
|
dataType: 'json',
|
|
async: false,
|
|
data: {verify:value,mobile:mobile},
|
|
success:function(data){
|
|
if(data.status==1){
|
|
layer.msg("<font style='color:white'>" + data.msg + "</font>");
|
|
setTimeout(function(){
|
|
window.location.href = data.url;
|
|
},1000);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
})
|
|
</script>
|
|
</block>
|