|
- <!DOCTYPE html>
- <html class="ui-page-login">
-
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <title></title>
- <link href="css/mui.min.css" rel="stylesheet" />
- <link href="css/style.css" rel="stylesheet" />
- <style>
- .area {
- margin: 20px auto 0px auto;
- }
- .mui-input-group:first-child {
- margin-top: 20px;
- }
- .mui-input-group label {
- width:30%;
-
- }
- .mui-input-row label~input,
- .mui-input-row label~select,
- .mui-input-row label~textarea {
- width: 70%;
- }
- .mui-checkbox input[type=checkbox],
- .mui-radio input[type=radio] {
- top: 6px;
- }
- .mui-content-padded {
- margin-top: 25px;
- }
- .mui-btn {
- padding: 10px;
- }
- .mui-input-row label~input, .mui-input-row label~select, .mui-input-row label~textarea{
- margin-top: 1px;
- }
- </style>
- </head>
-
- <body>
- <header class="mui-bar mui-bar-nav">
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
- <h1 class="mui-title">找回密码</h1>
- </header>
- <div class="mui-content">
- <form class="mui-input-group">
- <div class="mui-input-row">
- <label>手机号</label>
- <input id='mobile' type="number" class="mui-input-clear mui-input-numbox" placeholder="请输入手机号">
- </div>
-
- <div class="mui-input-row">
- <label>身份证号</label>
- <input id='idnumber' type="number" class="mui-input-clear mui-input-numbox" >
- </div>
- </form>
- <div class="mui-content-padded">
- <button id='sendMail' class="mui-btn mui-btn-block mui-btn-primary">提交</button>
- </div>
- </div>
- <script src="js/mui.min.js"></script>
- <script type="text/javascript" src="js/serverurl.js" ></script>
- <script>
- (function($, doc) {
- $.plusReady(function() {
- var sendButton = doc.getElementById('sendMail');
- sendButton.addEventListener('tap', function() {
- if(document.getElementById("mobile").value==""||document.getElementById("idnumber").value=="")
- {
- plus.nativeUI.toast('请输入手机号和身份证号。');
- return;
- }
- var xhr = new plus.net.XMLHttpRequest();
- xhr.responseType = "json";
- xhr.onreadystatechange = function() {
- switch(xhr.readyState) {
- case 4:
- if(xhr.status == 200) {
- console.log(JSON.stringify(xhr.response));
- if(xhr.response.result == "ok") {
- plus.nativeUI.closeWaiting();
- console.log(JSON.stringify(xhr.response));
- alert("您的密码是:"+xhr.response.pwd);
- } else {
- plus.nativeUI.closeWaiting();
- plus.nativeUI.toast('操作失败!您输入的手机号或身份证号不正确。');
- }
-
- } else {
- plus.nativeUI.closeWaiting();
- plus.nativeUI.toast('您的网络不给力');
- }
- break;
- default:
- break;
- }
- }
- xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=forgetPwd&content={'logname':'" + document.getElementById("mobile").value + "','ids':'" + document.getElementById("idnumber").value + "'}"));
- xhr.send();
- plus.nativeUI.showWaiting("请稍候...");
- },false);
- });
- }(mui, document));
- </script>
- </body>
-
- </html>
|