qc.ifish7.com/Application/Member/View/Index/change_mobile.html

132 lines
4.9 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>{$pagetitle}-{$Think.config.setting.sitename}</title>
<link href="__PUBLIC__/skin/css/animate.min.css" rel="stylesheet">
<link href="__PUBLIC__/skin/css/font-awesome.min.css" rel="stylesheet">
<link href="__PUBLIC__/skin/css/nav.css" rel="stylesheet">
<link href="__PUBLIC__/skin/css/nav2.css" rel="stylesheet">
<link href="__PUBLIC__/skin/css/slick-min.css" type="text/css" rel="stylesheet"/>
<link href="__PUBLIC__/skin/css/global.css" rel="stylesheet">
<style>
</style>
</head>
<body>
<include file="./Application/Data/templateFile/header.html"/>
<div class="hight"></div><!-- #EndLibraryItem --><div class="indexProduct UserCenter_nav">
<div class="indexProduct_content clear all">
<a href="{:U('Home/index/index')}">首页</a>
<span class="fa fa-angle-right"></span>
<a href="{:U('Member/index/index')}">用户中心</a>
<span class="fa fa-angle-right"></span>
<a href="javascript:void(0)" class="on">更换手机</a>
</div>
</div>
<div class="indexProduct UserCenter Safety phone">
<div class="indexProduct_content clear all">
<div class="UserCenter_left fl"><include file="./Application/Member/View/Inc/left.html"/></div>
<form action="" method="post" onsubmit="return save_form(this,callback)">
<div class="UserCenter_right fl">
<div class="Safety_title">更换手机</div>
<div class="phone_title"><img src="__PUBLIC__/skin/images/bn84.png" /></div>
<div class="phone_content">
<div class="phone_content_list clear">
<dd class="fl"><span>*</span>当前用户:</dd>
<dt class="fl">{$Think.session.member.mobile}<input type="hidden" id="phone" value="{$Think.session.member.mobile}" class="fl" /></dt>
</div>
<div class="phone_content_list clear SMS">
<dd class="fl"><span>*</span>短信验证码:</dd>
<dt class="fl clear">
<input type="tel" name="verifycode" class="sms_m" class="fl" />
<input id="btnSendCode" type="button" value="获取验证码" class="fr" />
</dt>
</div>
</div>
<div class="phone_next"><button type="submit">下一步</button></div>
</div>
</form>
</div>
</div>
<include file="./Application/Data/templateFile/footer.html"/>
<script type="text/javascript" src="__PUBLIC__/skin/js/jquery-1.8.3.min.js"></script>
<script src="__PUBLIC__/skin/js/global.js"></script>
<script src="__PUBLIC__/skin/js/nav.js"></script>
<script src="/Public/Admin/layer/layer.js"></script>
<script src="/Public/Admin/js/globals.js"></script>
<script type="text/javascript">
function callback(data) {
if(data.status == 0){
alert(data.info);
}else{
window.location.href = "{:U('change_mobile2')}";
}
}
// 发送验证码
function sendMobileCode(){
$.ajax({
'url' : "{:U('Index/sendMobileCode')}",
'data': {},
'type':'get',
'dataType':'json',
'success':function(data){
console.log(data);
}
});
}
var InterValObj; //timer变量控制时间
var count = 60; //间隔函数1秒执行
var curCount;//当前剩余秒数
function sendMessage() {
curCount = count;
//设置button效果开始计时
$("#btnSendCode").attr("disabled", "true");
$("#btnSendCode").css("cursor", "not-allowed");
$("#btnSendCode").css("color", "#b1b1b1");
$("#btnSendCode").val( + curCount + "秒再获取");
InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器1秒执行一次
sendMobileCode();
}
//timer处理函数
function SetRemainTime() {
if (curCount == 0) {
window.clearInterval(InterValObj);//停止计时器
$("#btnSendCode").removeAttr("disabled");//启用按钮
$("#btnSendCode").css("cursor", "pointer");
$("#btnSendCode").css("color", "#ce1042");
$("#btnSendCode").val("重新获取验证码");
code = ""; //清除验证码。如果不清除,过时间后,输入收到的验证码依然有效
}
else {
curCount--;
$("#btnSendCode").val( + curCount + "秒再获取");
}
}
</script>
<script type="text/javascript">
$("#btnSendCode").click(function(){
sendMessage();
});
</script>
</body>
</html>