| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 | 
							- <!DOCTYPE html>
 
- <html>
 
- <head>
 
-     <meta charset="utf-8">
 
-     <meta http-equiv="X-UA-Compatible" content="IE=edge">
 
-     <title>kmall_pt</title>
 
-     <!-- Tell the browser to be responsive to screen width -->
 
-     <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
 
-     <link rel="stylesheet" href="statics/css/bootstrap.min.css">
 
-     <link rel="stylesheet" href="statics/css/font-awesome.min.css">
 
-     <link rel="stylesheet" href="statics/css/style.css">
 
-     <link rel="stylesheet" href="statics/css/userLogin.css">
 
-     <link rel="stylesheet" href="statics/css/main.css">
 
-     <link rel="stylesheet" href="statics/css/iview.css">
 
-     <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
 
-     <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
 
-     <!--[if lt IE 9]>
 
-     <script src="statics/libs/html5shiv.min.js"></script>
 
-     <script src="statics/libs/respond.min.js"></script>
 
-     <![endif]-->
 
- </head>
 
- <body class="signin hold-transition login-page"  >
 
- <div class="loginscreen animated fadeInDown signinpanel" id="loginBox" v-cloak>
 
-     <div class="row" style="background: rgba(109, 109, 109, 0.45);border-radius: 20px;border: 0px solid #6d6d6d;padding:13px 22px 35px 22px;">
 
-         <div class="row" style="border: 0px solid #6d6d6d">
 
-             <p style="font-size: 45px;font-family: 微软雅黑;color: #ffffff;text-shadow: 5px 5px 5px #000;margin-bottom: 10px" align="center"><b>珠 免 线 下 店</b></p>
 
-             <hr/>
 
-         </div>
 
-         <div class="col-md-7" >
 
-             <p style="font-size: 35px;font-family: 微软雅黑;color: #3bc8ff;text-shadow: 2px 2px 5px #000;padding-right: 10px;margin: 45px 0 0;" align="center">
 
-                 <br/>
 
-                 <span style="font-size: 45px">收 银 系 统</span>
 
-                 <br/>
 
-             </p>
 
-             <!--<p style="font-size: 20px;font-family: 微软雅黑;color: #3bc8ff;text-shadow: 2px 2px 5px #000;padding-right: 10px;margin: 30px 0 0;"></p>-->
 
-         </div>
 
-         <div class="col-md-5">
 
-             <div class="m-t text-center" style="border: 0px solid #dddee1;">
 
-                 <div class="form-group has-feedback">
 
-                     <i-input class="userinput" v-model="username" @on-enter="login" placeholder="账号" style="width: 250px;" autofocus/>
 
-                 </div>
 
-                 <div class="form-group has-feedback">
 
-                     <i-input class="userinput"  type="password" v-model="password" @on-enter="login" style="width: 250px;"
 
-                              placeholder="密码"/>
 
-                 </div>
 
-                 <!--<div class="form-group has-feedback" id="authcode">
 
-                     <div style="display: inline-block;width: 150px;height:45px;padding-left: 2px">
 
-                         <i-input v-model="captcha" @on-enter="login"
 
-                                  placeholder="验证码" class="authcode" />
 
-                     </div>
 
-                     <div style="display: inline-block;width: 100px;">
 
-                         <img style="height: 45px;width: 96px;border-radius: 4px;" alt="如果看不清楚,请单击图片刷新!" title="点击刷新"
 
-                              class="pointer" :src="src" @click="refreshCode">
 
-                     </div>
 
-                 </div>-->
 
-                 <div>
 
-                     <i-button type="warning" @click="login" style="width: 125px;height: 45px">登录</i-button>
 
-                     <i-button type="warning" @click="change" style="width: 125px;height: 45px">切换管理端</i-button>
 
-                 </div>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <!-- /.login-box -->
 
- <script src="statics/libs/jquery.min.js"></script>
 
- <script src="statics/libs/vue.min.js"></script>
 
- <script src="statics/libs/iview.min.js"></script>
 
- <script src="statics/libs/bootstrap.min.js"></script>
 
- <script src="statics/plugins/slimscroll/jquery.slimscroll.min.js"></script>
 
- <script src="statics/libs/fastclick.min.js"></script>
 
- <script type="text/javascript">
 
-     var vm = new Vue({
 
-         el: '#loginBox',
 
-         data: {
 
-             username: '',
 
-             password: '',
 
-             captcha: '',
 
-             machineCode: '' ,
 
-             src: 'captcha.jpg'
 
-         },
 
-         beforeCreate: function () {
 
-             if (self != top) {
 
-                 top.location.href = self.location.href;
 
-             }
 
-         },
 
-         beforeMount: function(){
 
-             // TODO 调用接口获取机器码
 
-                 $.ajax({
 
-                     url:"http://127.0.0.1:21600/api/reg/gen",
 
-                     success:function(r){
 
-                         if(r.code == "0"){
 
-                             vm.machineCode = r.rows[0].data.code;
 
-                             console.log(vm.machineCode);
 
-                             vm.machineCode = vm.machineCode.replace("+","%2B");
 
-                             sessionStorage.setItem("machineCode",vm.machineCode);
 
-                         }
 
-                     },
 
-                     error:function(XMLHttpRequest, textStatus, errorThrown){
 
-                         alert("获取机器码失败,请联系管理员");
 
-                     }
 
-                 })
 
-                 // 本地调试的时候打开下面的注释代码
 
-                 // vm.machineCode = "0z4kBPFEve0=";
 
-                 // sessionStorage.setItem("machineCode","0z4kBPFEve0=");
 
-                 // $.get("http://127.0.0.1:8000/api/reg/gen" , function (r) {
 
-                 //     console.log(r);
 
-                 //     if(r.code == "0"){
 
-                 //         vm.machineCode = r.rows[0].data.code;
 
-                 //         console.log(vm.machineCode);
 
-                 //         vm.machineCode = vm.machineCode.replace("+","%2B");
 
-                 //         sessionStorage.setItem("machineCode",vm.machineCode);
 
-                 //     }
 
-                 // });
 
-         },
 
-         methods: {
 
-             refreshCode: function () {
 
-                 this.src = "captcha.jpg?t=" + $.now();
 
-             },
 
-             login: function (event) {
 
-                 var data = "username=" + vm.username + "&password=" + vm.password + "&captcha=" + vm.captcha + "&machineCode=" + vm.machineCode+"&loginType=2"; //TODO  新增加一个机器码;
 
-                 // var data = "username=" + vm.username + "&password=" + vm.password + "&captcha=" + vm.captcha + "&machineCode=0z4kBPFEve0=&loginType=2"; //TODO  新增加一个机器码;
 
-                 sessionStorage.removeItem("permsSet");
 
-                 var code = sessionStorage.getItem("machineCode");
 
-                 // if(!code){
 
-                 //     alert("正在获取机器码,请稍后登录,大约5s");
 
-                 //     return;
 
-                 // }
 
-                 $.ajax({
 
-                     type: "POST",
 
-                     url: "sys/login",
 
-                     data: data,
 
-                     dataType: "json",
 
-                     success: function (result) {
 
-                         if (result.code == 0) {//登录成功
 
-                             sessionStorage.setItem("permsSet", JSON.stringify(result.permsSet))
 
-                             sessionStorage.setItem("storeId", result.storeId)
 
-                             // if(result.storeId != null){
 
-                                 parent.location.href = '/sale/sale.html';
 
-                             // }else{
 
-                             //     parent.location.href = 'index.html';
 
-                             // }
 
-                         } else {
 
-                             iview.Message.error(result.msg);
 
-                             vm.refreshCode();
 
-                         }
 
-                     }
 
-                 });
 
-             },
 
-             change:function(){
 
-                 parent.location.href = 'login.html';
 
-             },
 
-             mounted:function(){
 
-                 this.$Message.config({
 
-                     duration:3
 
-                 })
 
-             }
 
-         }
 
-     });
 
- </script>
 
- </body>
 
- </html>
 
 
  |