| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <!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.css" rel="stylesheet" />
- <link href="css/iconfont.css" rel="stylesheet" />
- <link href="css/login.css" rel="stylesheet" />
- <script src="js/jquery.min.js"></script>
- <script src="Script/Common/huayi.http.js"></script>
- <script>
- var UserCode = helper.cookies.get("usercode");
- var UserType = helper.cookies.get("usertype");
- var UserName = helper.cookies.get("UserName");
- var rolename = helper.cookies.get("rolename");
- var State = helper.cookies.get("state");
- // alert(UserType)
- // 判断
- if(UserType){
- if(UserType == "0") { //分公司经理
- window.location.href = "client-side/client_index.html";
- } else if(UserType == "2") { //高层
- window.location.href = "client-side/high_list.html";
- } else if(UserType == "3") { //办理人员
- window.location.href = "client-side/Waiting_list.html";
- } else if(UserType == "4") { //业务员
- window.location.href = "client-side/Have_list.html";
- }
- }
- if(UserCode) {
-
- if(UserType == "0") { //分公司经理
- window.location.href = "client-side/client_index.html";
- } else if(UserType == "2") { //高层
- window.location.href = "client-side/high_list.html";
- } else if(UserType == "3") { //办理人员
- window.location.href = "client-side/Waiting_list.html";
- } else if(UserType == "4") { //业务员
- window.location.href = "client-side/Have_list.html";
- }
- }
- </script>
- </head>
- <body>
- <div class="mui-content">
- <form id='login-form' class="mui-input-group">
- <!--logo-->
- <div class="mui-logo-box">
- <div>
- <img src="img/logo.png" />
- </div>
- </div>
- <div class="mui-input-row">
- <label><span class="mui-icon iconfont icon-yonghu"></span></label>
- <input id='account' type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
- </div>
- <div class="mui-input-row mui-password">
- <label><span class="mui-icon iconfont icon-suo"></span></label>
- <input id='password' type="password" class=" mui-input-password mui-input" placeholder="请输入密码">
- </div>
- </form>
- <div class="mui-content-padded">
- <button id='login' class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">登录</button>
- </div>
- <div class="mui-content-padded oauth-area">
- <a class="reg_href" style="">心连心化学工业集团</a>
- </div>
- </div>
- <script src="js/mui.min.js"></script>
- <script src="Script/Common/huayi.config.js"></script>
- <script>
- var openid = helper.cookies.get("openid");
- var UserType = helper.cookies.get("usertype");
- // var type = helper.request.queryString("type");
- var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
- //登陆验证
- $("#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(),
- UserType:1,
- State:1,
- openid: openid,
- //openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid 测试用
- },
- success: function(data) {
- // debugger
- if(data.state == "success") {
- debugger
- var UserType = data.data.usertype;
- var UserCode = data.data.usercode;
- var UserName = data.data.UserName;
- var rolename = data.data.rolename;
- var UserCode = data.data.usercode;
- helper.cookies.set("usercode", data.data.usercode, 7);
- helper.cookies.set("usertype", data.data.usertype, 7);
- helper.cookies.set("userword", $("#password").val(), 7);
- helper.cookies.set("UserName", data.data.UserName, 7);
- helper.cookies.set("rolename", data.data.rolename, 7);
- helper.cookies.set("area", data.data.area, 7);
- helper.cookies.set("offic", data.data.offic, 7);
- helper.cookies.set("region", data.data.region, 7);
- helper.cookies.set("openid", 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', 7);//微信openid 测试用
-
- if(UserType == "0") { //分公司经理,大区经理
- window.location.href = "client-side/client_index.html";
- } else if(UserType == "2") { //高层
- window.location.href = "client-side/high_list.html";
- } else if(UserType == "3") { //办理人员
- window.location.href = "client-side/Waiting_list.html";
- } else if(UserType == "4") { //业务员
- window.location.href = "client-side/Have_list.html?v=0.1";
- } else {
- window.location.href = "client-side/client_index.html";
- }
-
- } else {
- mui.alert(data.message);
- }
- }
- })
- })
- </script>
- </body>
- </html>
|