| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
- <title>FrozenUI Demo</title>
- <link rel="stylesheet" href="../css/mui.min.css">
- <link rel="stylesheet" type="text/css" href="../css/reset.css" />
- <link rel="stylesheet" href="../css/iconfont.css" />
- <style type="text/css">
- html {
- height: 100%;
- }
-
- body {
- height: 100%;
- background: #fff;
- }
-
- .page {
- height: 100%;
- overflow: hidden;
- }
-
- .logo {
- text-align: center;
- margin: 7rem 0 4.5rem;
- }
- .logo >img{
- width: 40%;
- }
-
- .logoCover {
- width: 80%;
- margin: 0 auto;
- }
-
- .logoItem {
- border-bottom: 1px solid #bbb;
- position: relative;
- height: 40px;
- margin-bottom: 15px;
- }
-
- .logoItem i {
- font-size: 22px;
- color: #22ace1;
- vertical-align: middle;
- position: absolute;
- left: 0;
- bottom: 8px;
- }
- #recordPwdIcon{
- color: #22ace1;
- }
- .logoItem input {
- background: transparent;
- border: none;
- padding: 0 0 4px 35px;
- position: absolute;
- left: 0;
- bottom: 0;
- margin: 0;
- }
-
- .logoItem .unlock {
- font-size: 29px;
- }
-
- input::-webkit-input-placeholder {
- color: #969696;
- }
-
- input::-moz-placeholder {
- /* Mozilla Firefox 19+ */
- color: #969696;
- }
-
- input:-moz-placeholder {
- /* Mozilla Firefox 4 to 18 */
- color: #969696;
- }
-
- input:-ms-input-placeholder {
- /* Internet Explorer 10-11 */
- color: #969696;
- }
-
- #forgetPwd,
- #registerBtn,
- .recordPwdLabel,
- .logoItem input {
- color: #bbb;
- }
-
- #loginBtn,#registerBtn {
- width: 100%;
- /*line-height: 30px;*/
- font-size: 18px;
- letter-spacing: 6px;
- border-radius: 6px;
- margin: 20px 0 13px;
- color: #bbb;
- }
- #loginBtn:enabled:active{
- color: #fff;
- border: 1px solid #39c7fc;
- background-color: #39c7fc !important;
- }
-
- #loginBtn.btn-primary{
- background-color: #05a0db;
- border: 1px solid #12a5dc;
- color: #fff;
- }
- /*记住密码*/
-
- .checkbox {
- display: none;
- }
-
- #addUser {
- position: fixed;
- left: 0;
- right: 0;
- bottom: 10px;
- text-align: center;
- }
-
- #sendnum{
- position:absolute;
- top: 0;
- right: 0;
- font-size: 14px;
- padding: 5px;
- min-width: 80px;
- }
- #sendnum.active{
- background: transparent;
- border: 1px solid #b1b1b1;
- color: #bbb;
- }
- </style>
- </head>
- <body>
- <div class="page">
- <div class="logo">
- <img src="../images/logoTxt.png" alt="云飞智能科技" />
- </div>
- <div class="logoCover">
- <div class="logoInner">
- <form action="" method="post">
- <ul>
- <li class="logoItem">
- <i class="iconfont"></i>
- <input type="tel" maxlength="11" id="user_phone" placeholder="请输入手机号" />
- </li>
- <li class="logoItem">
- <i class="iconfont"></i>
- <input type="number" maxlength="4" id="codenum" placeholder="请输入验证码" />
- <button type="button" class="active" onclick="settime(this)" id="sendnum">获取验证码</button>
- </li>
- <li class="logoItem">
- <i class="iconfont"></i>
- <input type="password" id="password" placeholder="密码" />
- </li>
- </ul>
- <input type="button" id="registerBtn" value="注册" />
- <input type="button" id="loginBtn" value="登录" />
- </form>
- </div>
- </div>
- </div>
- </body>
- <script src="../js/jquery-2.1.0.js"></script>
- <script src="../js/mui.min.js"></script>
- <script>
- mui.init();
- var telRegExp = /^[1][3,4,5,7,8,9][0-9]{9}$/;
- var countdown=60;
- function settime(obj) {
- var telnum = $('#user_phone').val()
- if(telRegExp.test(telnum)){
- if (countdown == 0) {
- obj.removeAttribute("disabled");
- obj.innerHTML="获取验证码";
- countdown = 60;
- return;
- } else {
- obj.setAttribute("disabled", true);
- obj.innerHTML="重新发送(" + countdown + ")";
- countdown--;
- }
- setTimeout(function() {
- settime(obj)
- },1000)
- }else{
- mui.toast('请输入正确手机号');
- }
- }
-
- $('#password').on('keyup',function(){
- var telnum = $('#user_phone').val()
- var codenum = $('#codenum').val()
- var password = $('#password').val()
- if(telRegExp.test(telnum) && codenum && (password.length>6)){
- $('#logonBtn').addClass('active');
- }else{
- $('#logonBtn').removeClass('active');
- }
- })
-
- $('.logoInner').on('tap','#logonBtn.active',function(){
- alert(1)
- })
-
- $('#loginBtn').on('tap',function(){
- mui.openWindow({
- url:'login.html',
- id:'login'
- })
- })
-
- //退出应用
- mui.oldback = mui.back;
- var clickNum = 0;
- mui.back = function(event) {
- clickNum++;
- if(clickNum > 1) {
- plus.runtime.quit();
- } else {
- mui.toast("再按一次退出应用");
- }
- setTimeout(function() {
- clickNum = 0
- }, 1000);
- return false;
- }
- //测试网络
- function networkinfo() {
- if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
- mui.toast("网络异常,请检查网络设置!");
- }
- }
- </script>
- </html>
|