cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>手机绑定</title>
<!--(start) public flies-->
[#include "/business/pages/include/static.html" /]
<script type="text/javascript">
    function yanzhengPhone(){
        var phone = $.trim($("#phone").val());
        if(phone==""){
            window.top.popupTips("手机号码不能为空");
            return;
        }
        if(!$.util.isMobile(phone)){
            window.top.popupTips("手机格式不正确");
            return;
        }
        $.post("${base}/business/pages/loginuser/sendValid.html",{"phone":phone},function(data,textStatus) {
            if(data==0) {
                window.top.popupTips("发送成功");
                $("#phoneConfirm").css("display","block");
                $("#yzmJzbtn").show();
                $("#yzm").hide();
                caluTime();
            } else {
                window.top.popupTips("发送失败");
                $("#yzmJzbtn").hide();
                  $("#yzm").show();
            }
        })
            
        
    }
    
    function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
        var phone = $.trim($("#phone").val());
        var randomPhone = $.trim($("#phoneRandom").val());
        if(phone==""){
            window.top.popupTips("手机号码不能为空");
            return;
        }
        if(!$.util.isMobile(phone)){
            window.top.popupTips("手机格式不正确");
            return;
        }
        if(randomPhone==""||randomPhone=="6位数字"){
            window.top.popupTips("验证码不能为空");
            return;
        }
            $.post("${base}/business/pages/loginuser/compareMobileRandom.html",{"phone":phone,"yzm":randomPhone},
                function(data){
                    if(data=="1"){
                        window.top.popupTips("绑定成功");
                        window.top.queryBindMsg();
                        window.top.hideDialog(dialogID);
                    }else{
                        window.top.popupTips(data);
                    }
                }
            );
        }
    }
    
    var intervalId;
var i = 120;
function reduceTime() {
  if(i>=0) {
      $("#timestr").text(i);
  }
  if(i<=0) {
        $("#yzmJzbtn").hide();
      $("#yzm").show();
      clearInterval(intervalId);
      $("#timestr").text("120");
      i = 120;
  }
  i = i-1;
}
 
function caluTime() {
    intervalId = setInterval("reduceTime()",1000);
}
function clearNum(){
    $("#phoneRandom").val('');
}
</script>
</head>
 
<body class="bind_account_popup">
<h3>您正在使用“<span>验证短信</span>”对手机进行验证</h3>
<form method="post" action="" id="myform" name="myform">
<table width="400px;">
    <tr><td width="50">手机号:</td><td colspan="3"><input class="general" type="text" name="phone" id="phone" value="${phone}"/></td></tr>
    <tr><td>验证码:</td><td width="187"><input class="general" type="text" value="6位数字" id="phoneRandom" onclick="clearNum();"/></td>
    <td width="138">
    <a class="common" id="yzm" onclick="return yanzhengPhone();">点击此免费获取</a>
      <a class="common" style="display:none;" id="yzmJzbtn"><font id="timestr">120</font>秒后重新获取</a>
    </td><td width="5"></td></tr>
  
    <tr><td></td><td colspan="3"><p id="phoneConfirm" style="display: none;">校验码已发送到您的手机,请勿泄露。</p></td></tr>
</table>
<input name="btOk" id="btOk" type="submit" style="display: none;"/>
</form>
</body>
</html>