| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <!DOCTYPE html>
- <html lang="zh-CN" 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/login.css" rel="stylesheet" />
- </head>
- <body>
- <div class="mui-content">
- <div class="mui-box">
- <div class="img_box">
- </div>
- <form class="mui-input-group">
- <div class="mui-input-row" style="text-align: center; font-size: 20px;">
- <span>管理员登录</span>
- </div>
- <div class="mui-input-row">
- <label>账号</label>
- <input id='account' type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
- </div>
- <div class="mui-input-row">
- <label>密码</label>
- <input id='password' type="password" class="mui-input-clear mui-input" placeholder="请输入密码">
- </div>
- </form>
- <div class="mui-content-padded ">
- <button id='login' class="mui-btn mui-btn-block mui-btn-primary">登录</button>
- </div>
- </div>
- </div>
- <script src="js/zepto.js"></script>
- <script src="js/mui.min.js"></script>
- <script src="Script/Common/huayi.config.js"></script>
- <script src="Script/Common/huayi.http.js"></script>
- <script>
- var openid = helper.cookies.get("openid");
- var type = helper.request.queryString("type");
- //登陆验证
- $("#login").on('tap', function() {
- if(!$("#account").val()) {
- mui.alert("请输入账号");
- return;
- }
- if(!$("#password").val()) {
- mui.alert("密码不能为空")
- return;
- }
- //请求
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + 'WxLogin/Login',
- async: true,
- dataType: 'json',
- data: {
- UserCode: $("#account").val(),
- Password: $("#password").val(),
- openid: openid,
- //openid: 'oKOqcvw24ZMtsRKlpjBFKHAWuDmI', //微信openid 测试用
- //API地址: http://117.158.196.116:4000/zentao/doc-view-79.html
- },
- success: function(data) {
- if(data.state == "success") {
- helper.cookies.set("usercode", $("#account").val(), 7);
- //helper.cookies.set("openid", 'oKOqcvw24ZMtsRKlpjBFKHAWuDmI', 7);//微信openid 测试用
- if(type === "1") {//高级管理》》数据统计
- window.location.href = "index.html?menuCode=SJTJ";
- } else if(type === "3") {//个人中心
- window.location.href = "index.html?menuCode=GRZX";
- }else{//高级管理》》信息处理
- window.location.href = "index.html?menuCode=XXCL";
- }
- } else {
- mui.alert(data.message);
- }
- }
- })
- })
- </script>
- </body>
- </html>
|