123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>忘记密码</title>
- <meta name="format-detection" content="telephone=no"/>
- <meta name="viewport"
- content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
- <meta name="apple-mobile-web-app-capable" content="yes"/>
- <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
- <link rel="stylesheet" href="../../../css/cross.css" type="text/css"/>
- <link rel="stylesheet" href="../../../css/cross.ui.css" type="text/css"/>
- <link rel="stylesheet" type="text/css" href="../../../css/ss-style.css">
- <link rel="stylesheet" type="text/css" href="../../../iconfont/iconfont.css"/>
- <style>
- .n-list-info {
- position: relative;
- }
- .searchbar-clear {
- position: absolute;
- width: 28px;
- height: 28px;
- right: 0;
- top: 8px;
- opacity: 0;
- pointer-events: none;
- background-position: center;
- background-repeat: no-repeat;
- background-image: url(../../../images/delete01_pre.png);
- -webkit-background-size: 20px 20px;
- background-size: 20px 20px;
- -webkit-transition-duration: 300ms;
- transition-duration: 300ms;
- cursor: pointer;
- }
- #div-yzm {
- width: 80px;
- height: 29px;
- border: 1px solid #4DCD70;
- color: #4DCD70;
- font-size: 14px;
- line-height: 29px;
- text-align: center;
- border-radius: 10px;
- margin-top: 7px;
- }
- .c-btn-dcdcdc {
- background: #DCDCDC;
- }
- .c-btn.active {
- background: #4DCD70;
- }
- .mui-content-pad{
- margin-top: 0px;
- }
- .btn-lt {
- position: absolute;
- left: 10px;
- }
- .btn-rt{
- position: absolute;
- right: 10px;
- }
- a {
- text-decoration: none;
- color: #17b3ec;
- font-size: 14px;
- }
- .display{display: none}
- .iconImg{width:26px}
- </style>
- </head>
- <body>
- <!--<div class="h45">
- <div class="demo-comtop">
- <a class="mui-action-back"></a>
- <h1>登录</h1>
- </div>
- </div>-->
- <div class="main">
- <div id="idcardBox">
- <ul class="n-list edit-info registered c-border-tb mt15 c-f15 form-register">
- <li>
- <div class="n-list-key" style="width: 2.3em;">
- <img src="../images/zhanghao_icon.png"
- style="width: 20px; height: 26px;padding-left: 3px;padding-top: 10px;">
- <!--<i class="iconfont icon-shouji1"></i>-->
- </div>
- <div class="n-list-info">
- <input id="idcardTxt" maxlength="18" minlength="11" type="text" class="width-100 c-f16 c-5b5b5b"
- placeholder="身份证号" value="">
- <a href="#" class="searchbar-clear"></a>
- </div>
- <div id="checkIdCard" class="n-list-key pl15 c-17b3ec" >
- <span>身份验证</span>
- </div>
- <div id="checkIdCardmes" class="n-list-key pl15 display" style="color: #4dcd70">
- <span>验证通过</span>
- </div>
- </li>
- <li>
- <div class="n-list-key" style="width: 2.3em;">
- <i class="iconfont icon-shouji1"></i>
- </div>
- <div class="n-list-info">
- <input id="txtMobile" type="tel" class="width-100 c-f16 c-5b5b5b" maxlength="11" placeholder="手机号" disabled/>
- <a href="#" class="searchbar-clear"></a>
- </div>
- </li>
- </ul>
- </div>
- <div id="phoneBox" >
- <ul class="n-list edit-info registered c-border-tb mt15 c-f15 form-register">
- <li>
- <div class="n-list-key" style="width: 2.3em;">
- <i class="iconfont icon-yanzhengma01"></i>
- </div>
- <div class="n-list-info">
- <input id="txtCode" type="text" class="width-100 c-f16 c-5b5b5b" placeholder="请输入验证码"/>
- <a href="#" class="searchbar-clear"></a>
- </div>
- <div id="messageCode1" class="n-list-key pl15 c-17b3ec" onclick="sendCode()">
- <span>获取短信验证码</span>
- </div>
- <div id="messageCode2" class="n-list-key pl15 c-999999" style="display: none;">
- <span id="message" ></span>
- </div>
- </li>
- <li>
- <div class="n-list-key">
- <span class="f-fs16 c-323232">设置密码</span>
- </div>
- <div class="n-list-info">
- <input type="password" class="width-100 c-f16 c-5b5b5b reg-pwd" placeholder="请输入密码"/>
- <a href="#" class="searchbar-clear"></a>
- </div>
- </li>
- <li>
- <div class="n-list-key">
- <span class="f-fs16 c-323232">确认密码</span>
- </div>
- <div class="n-list-info">
- <input id="apwd" type="password" class="width-100 c-f16 c-5b5b5b" placeholder="请再次输入密码"/>
- <a href="#" class="searchbar-clear"></a>
- </div>
- </li>
- </ul>
- <div class="mb15 mlr15 mt20">
- <a id="phoneBtn" href="javascript:;" style="font-size: 18px;"
- class="c-btn c-btn-dcdcdc c-btn-full c-btn-radius c-f16">完成</a>
- </div>
- </div>
- <p style="font-size: 16px;text-align: center;color: #323232;" class="mr15 c-t-right">返回<span style="font-size: 17px;font-style: italic;color: #17b3ec;" onclick="accountShenshu()">账号申诉</span></p>
-
- </div>
- </body>
- <script type="text/javascript" src="../../../js/jquery/2.1.3/jquery.js"></script>
- <script type="text/javascript" src="../../../js/common_http.js"></script>
- <script type="text/javascript" src="../../../js/weixin_common.js"></script>
- <link rel="stylesheet" type="text/css" href="../../../widget/artDialog/6.0.5/css/ui-dialog.min.css">
- <script src="../../../widget/artDialog/6.0.5/js/dialog-plus.js"></script>
- <script type="text/javascript" src="../../../js/commit_validate.js"></script>
- <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
- <script src="../../../js/mui.min.js"></script>
- <script type="text/javascript">
- var dd = dialog({contentType: 'load', skin: 'bk-popup', content: '验证中...'});
- var Request = new Object();
- Request = GetRequest();
- var openid = Request["openid"];
- var type = Number(Request["type"]);
- var mobile1 = Request["mobile"];
- var clock = "";
- var nums = 60;
- var loginParams = Request["loginParams"];
- var $phoneBox = $('#phoneBox');
- var $idcardBox = $('#idcardBox');
- bindEvents();
- if (loginParams) {
- loginParams = JSON.parse(decodeURIComponent(Request["loginParams"]));
- }
- $(function () {
- var userAgent = window.localStorage.getItem(agentName);
- if (userAgent) {
- var paurl = "";
- if (type == 0) {
- paurl = "wx/html/home/html/login.html?type=0&openid=" + openid;
- }
- else {
- if (mobile1) {
- paurl = "wx/html/home/html/login.html?type=" + type + "&openid=" + openid + "&mobile=" + mobile1;
- }
- else {
- paurl = "wx/html/home/html/login.html?type=" + type + "&openid=" + openid;
- }
- }
- //从后台那边获取签名等信息
- var params = {};
- params.pageUrl = window.location.href;
- $.ajax(server + "weixin/getSign", {
- data: params,
- dataType: "json",
- type: "post",
- success: function (res) {
- if (res.status == 200) {
- var t = res.data.timestamp;
- var noncestr = res.data.noncestr;
- var signature = res.data.signature;
- wx.config({
- //debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- appId: appId, // 必填,公众号的唯一标识
- timestamp: t, // 必填,生成签名的时间戳
- nonceStr: noncestr, // 必填,生成签名的随机串
- signature: signature,// 必填,签名,见附录1
- jsApiList: [
- 'closeWindow'
- ] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
- });
- }
- }
- });
- wx.ready(function () {
- wx.closeWindow();
- });
- }
- else {
- if (!openid) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: 'openid获取失败'}).show();
- }
- if (mobile1) {
- $("#txtMobile").val(mobile1);
- }
- }
- })
- function bindEvents() {
- $("#checkIdCard").on("click", function () {
- var idcard = $('#idcardTxt').val();
- var data = {}
- if (idcard == "") {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '身份证不能为空'}).show();
- return;
- }
- if (!isIdcard(idcard)) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '请输入正确的身份证号'}).show();
- return;
- }
- data.idCard = idcard;
- sendPost("weixin/getMobile", data, "json", "post", operateFailed, operateSuccesss);
- function operateSuccesss(res) {
- if (res.status == -1) {
- dd.close();
- if (res && res.msg) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: res.msg}).show();
- setTimeout(function () {
- mui.openWindow({
- url: "regist-info.html",
- waiting: {
- autoShow: false, //自动显示等待框,默认为true
- title: '正在加载...'
- }
- });
- },1500)
- return;
- }
- } else if (res.status == -2) {
- dd.close();
- if (res && res.msg) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '您还未绑定手机,无法重置密码,请尝试使用默认密码登录。'}).show();
- setTimeout(function () {
- mui.openWindow({
- url: "zhmm-login.html",
- waiting: {
- autoShow: false, //自动显示等待框,默认为true
- title: '正在加载...'
- }
- });
- },1500)
- }
- } else if (res.status == 200) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: res.msg}).show();
- var mobile = res.data.mobile;
- var phoneNum = mobile.substring(0, 3) + "*****" + mobile.substring(8, 11);
- $('#txtMobile').val(mobile);
- $('#checkIdCard').hide().next().show();
- }
- };
- function operateFailed(res) {
- dd.close();
- if (res && res.msg) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: res.msg}).show();
- } else {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '校验失败'}).show();
- }
- };
- })
- $("#phoneBtn").on("click", function () {
- if ($(this).hasClass("active")) {
- commit();
- }
- else{
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content:'请将相关信息补充完毕'}).show();
- }
- })
- $("input").on("focus", function () {
- $(".searchbar-clear").css("pointer-events", "none").css("opacity", 0);
- if ($(this).val()) {
- $(this).next().css("pointer-events", "auto").css("opacity", 1);
- }
- }).on("input", function () {
- $(this).next().css("pointer-events", "auto").css("opacity", 1);
- });
- $("input").on('keyup',function(){
- var allHaveValue = true,
- a = $('input');
- $('input').each(function(){
- if(!$(this).val()) {
- allHaveValue = false;
- }
- });
-
- if(allHaveValue){
- $("#phoneBtn").addClass("active");
- }
- else{
- $("#phoneBtn").removeClass("active");
- }
- })
- $(".n-list-info").on("click", ".searchbar-clear", function () {
- $(this).prev().val("");
- $(this).css("pointer-events", "none").css("opacity", 0);
- $(this).prev().focus();
- return false;
- });
- }
-
- function sendCode() {
- var mobile = document.getElementById("txtMobile").value;
- if (!mobile) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '请先校验身份证'}).show();
- return;
- }
- if (!isphone(mobile)) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '手机号格式不正确'}).show();
- return;
- }
- $("#messageCode1").hide();
- document.getElementById("message").innerHTML = nums + '秒后可重新获取';
- $("#messageCode2").show();
- clock = setInterval(doLoop, 1000); //一秒执行一次
- var data = {};
- data.mobile = mobile;
- data.type = 2;
- sendPost("common/captcha", data, "json", "post", sendFailed, sendSuccesss);
- }
- //失败
- function sendFailed(res) {
- clearInterval(clock); //清除js定时器
- $("#messageCode1").show();
- $("#messageCode2").hide();
- nums = 60; //重置时间
- if (res && res.msg) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: res.msg}).show();
- } else {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '获取失败'}).show();
- }
- }
- function sendSuccesss(res) {
- if (res.status == 200) {
- }
- else {
- sendFailed(res);
- }
- }
- function doLoop() {
- nums--;
- if (nums > 0) {
- document.getElementById("message").innerHTML = nums + '秒后可重新获取';
- } else {
- clearInterval(clock); //清除js定时器
- $("#messageCode1").show();
- $("#messageCode2").hide();
- nums = 60; //重置时间
- }
- }
- var mobile;
- function commit() {
- mobile = document.getElementById("txtMobile").value;
- var captcha = document.getElementById("txtCode").value;
- if (!mobile || !captcha) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '手机号和验证码不能为空'}).show();
- return;
- }
- if (!isphone(mobile)) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '手机号格式不正确'}).show();
- return;
- }
- dd.showModal();
- //拼请求内容
- var data = {};
- data.mobile = mobile;
- data.captcha = captcha;
- data.type = 2;
- sendPost("common/check_captcha", data, "json", "post", operateFailed, operateSuccesss);
- }
- //失败
- function operateFailed(res) {
- dd.close();
- if (res && res.msg) {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: res.msg}).show();
- } else {
- dialog({contentType: 'tipsbox', bottom: true, skin: 'bk-popup', content: '验证码验证失败'}).show();
- }
- }
- //成功调用登录接口
- function operateSuccesss(res) {
- var idcard = $('#idcardTxt').val();
- if (res.status == 200) {
- window.location.href = "login.html?type=" + type + "&openid=" + openid + "&mobile=" + mobile + '&idcard=' + idcard;
- dd.close();
- } else {
- //非200则为失败
- operateFailed(res);
- }
- }
-
- $('#accounts').on('tap',function(){
- mui.openWindow({
- id: "account_back",
- url: "../../yjfk/html/account_back.html",
- extras: {
-
- }
- });
- })
- function accountShenshu(){
- window.location.href = "../../yjfk/html/account_back.html?type=" + type + "&openid=" + openid;
- }
- </script>
- </html>
|