123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <!DOCTYPE html>
- <html lang=zh-cn>
- <head>
- <meta charset=utf-8>
- <title>纵横计量支付系统</title>
- <meta name=description content=计量支付>
- <meta name=copyright content=smartcost.com.cn>
- <link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
- <link rel=stylesheet href={{rootUrl}}global/css/style.css>
- <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
- <script src={{rootUrl}}global/js/bootstrap.js></script>
- <script src={{rootUrl}}global/js/jl.js></script>
- <script src={{rootUrl}}global/js/jquery.cookie.min.js></script>
- </head>
- <body>
- <!-- include "top" -->
- <div class="wrapContent">
- <!-- include "left" -->
- <div class="mainContainer">
- <!--内容-->
- <div class="mainContent">
- <div class="title clearfix">
- <div class="fR">
- <a class="btn btn-link" href="http://smartcost.com.cn/product/19" target="_blank"><i class="icon-question-sign"></i> 帮助</a>
- </div>
- </div>
- <div class="form">
- <form class="form-horizontal">
- <legend>短信通知-修改手机</legend>
- <div class="form-group">
- <label class="col-sm-1 control-label">当前手机</label>
- <div class="col-sm-2">
- <input class="form-control" type="text" placeholder="{{uprofile.mobile}}" disabled="">
- </div>
- </div>
- <div id="input_error" class="form-group">
- <label class="col-sm-1 control-label">新手机</label>
- <div class="col-sm-2">
- <input class="form-control" id="mobile" name="mobile" type="text" placeholder="输入您的新手机号码"><span id="help-inline"
- class="help-block" style="display: none"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label">短信校验码</label>
- <div class="col-sm-2">
- <input class="form-control" type="text" id="verifycode" name="verifycode" placeholder="输入验证码" maxlength="11"
- class="span2">
- <!--<button class="btn">获取验证码</button>-->
- <!--<button class="btn" disabled>重新获取 60s</button>-->
- </div>
- <div class="col-sm-2">
- <input type="button" class="btn btn-default" id="getting" value="获取验证码">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label"></label>
- <div class="col-sm-2">
- <i class="icon-ok icon-white"></i><input type="button" id="addMobile"
- class="btn btn-primary" value="确定修改"/>
- </div>
- </div>
- </fieldset>
- </form>
- </div>
- </div>
- <!--内容-->
- </div>
- </div>
- <script type="text/javascript">autoFlashHeight();</script>
- <script type="text/javascript">
- $(document).ready(function () {
- $("#mobile").blur(function () {
- $.ajax({
- type: "POST",
- dataType: "json",
- cache: false,
- data: {"mobile": $(this).val()},
- url: "{{rootUrl}}user/profile/check/mobile"
- }).done(function (data) {
- if (data['mobile'] > 0) {
- $("#input_error").addClass('has-error');
- $("#help-inline").html('手机号码已被使用');
- $("#help-inline").show();
- } else {
- $("#input_error").removeClass('has-error');
- $("#help-inline").hide();
- }
- });
- });
- /*仿刷新:检测是否存在cookie*/
- if ($.cookie("sms")) {
- var count = $.cookie("sms");
- var btn = $('#getting');
- btn.val('重新获取 ' + count + 's').attr('disabled', true).css('cursor', 'not-allowed');
- var resend = setInterval(function () {
- count--;
- if (count > 0) {
- btn.val('重新获取 ' + count + 's').attr('disabled', true).css('cursor', 'not-allowed');
- $.cookie("sms", count, {path: '/', expires: (1 / 86400) * count});
- } else {
- clearInterval(resend);
- btn.val("获取验证码").removeClass('disabled').removeAttr('disabled style');
- }
- }, 1000);
- }
- /*点击改变按钮状态,已经简略掉ajax发送短信验证的代码*/
- $('#getting').click(function () {
- var btn = $(this);
- if ($("#mobile").val() == '') {
- $("#input_error").addClass('has-error');
- $("#help-inline").html('手机号码不能为空');
- $("#help-inline").show();
- return false;
- }
- $.ajax({
- type: "POST",
- dataType: "json",
- cache: false,
- data: {"mobile": $("#mobile").val()},
- url: "{{rootUrl}}user/profile/check/mobile"
- }).done(function (data) {
- if (data['mobile'] > 0) {
- $("#input_error").addClass('has-error');
- $("#help-inline").html('手机号码已被使用');
- $("#help-inline").show();
- return false;
- } else {
- $("#input_error").removeClass('has-error');
- $("#help-inline").hide();
- $.ajax({
- type: "POST",
- dataType: "json",
- cache: false,
- data: {"mobile": $("#mobile").val()},
- url: "{{rootUrl}}user/profile/sms/send/verify"
- }).done(function (data) {
- });
- var count = 60;
- var resend = setInterval(function () {
- count--;
- if (count > 0) {
- btn.val('重新获取 ' + count + 's');
- $.cookie("sms", count, {path: '/', expires: (1 / 86400) * count});
- } else {
- clearInterval(resend);
- btn.val("获取验证码").removeAttr('disabled style');
- }
- }, 1000);
- btn.attr('disabled', true).css('cursor', 'not-allowed');
- }
- });
- });
- /*点击改变按钮状态,已经简略掉ajax发送短信验证的代码*/
- $('#addMobile').click(function () {
- $.ajax({
- type: "POST",
- dataType: "json",
- cache: false,
- data: {"mobile": $("#mobile").val(), "verifycode": $("#verifycode").val()},
- url: "{{rootUrl}}user/profile/sms/edit"
- }).done(function (data) {
- window.location.reload(true);
- });
- });
- });
- </script>
- </body>
|