Aucune description

login.html 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!DOCTYPE html>
  2. <html class="ui-page-login">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title></title>
  7. <link href="css/mui.css" rel="stylesheet" />
  8. <link href="css/iconfont.css" rel="stylesheet" />
  9. <link href="css/login.css" rel="stylesheet" />
  10. <script src="js/jquery.min.js"></script>
  11. <script src="Script/Common/huayi.http.js"></script>
  12. <script>
  13. var UserCode = helper.cookies.get("usercode");
  14. var UserType = helper.cookies.get("usertype");
  15. var State = helper.cookies.get("state");
  16. // alert(UserType)
  17. // 判断
  18. if(UserType){
  19. if(UserType == "-1") { //系统管理员
  20. window.location.href = "client-side/client_index.html";
  21. } else if(UserType == "0") { //大区经理/分公司经理
  22. window.location.href = "client-side/client_index.html";
  23. } else if(UserType == "1") { //办理人员
  24. window.location.href = "client-side/client_index.html";
  25. } else if(UserType == "2") { //区域客服
  26. window.location.href = "client-side/client_index.html";
  27. } else if(UserType == "3") { //办理人员
  28. window.location.href = "client-side/press_list.html";
  29. } else if(UserType == "4") { //业务员
  30. window.location.href = "client-side/Have_list.html";
  31. } else if(UserType == "5") { //游客
  32. window.location.href = "client-side/establish.html";
  33. }
  34. }
  35. if(UserCode) {
  36. if(UserType == "-1") { //系统管理员
  37. window.location.href = "client-side/client_index.html";
  38. } else if(UserType == "0") { //接待部
  39. window.location.href = "client-side/client_index.html";
  40. } else if(UserType == "1") { //办理人员
  41. window.location.href = "client-side/client_index.html";
  42. } else if(UserType == "2") { //区域客服
  43. window.location.href = "client-side/client_index.html";
  44. } else if(UserType == "3") { //监管
  45. window.location.href = "client-side/press_list.html";
  46. } else if(UserType == "4") { //业务员
  47. window.location.href = "client-side/Have_list.html";
  48. } else if(UserType == "5") { //游客
  49. window.location.href = "client-side/establish.html";
  50. }
  51. // else if(UserType == "5") { //业主
  52. // helper.cookies.set("usercode", "", -1);
  53. // window.location.href = "login.html";
  54. // }
  55. }
  56. </script>
  57. </head>
  58. <body>
  59. <div class="mui-content">
  60. <form id='login-form' class="mui-input-group">
  61. <!--logo-->
  62. <div class="mui-logo-box">
  63. <div>
  64. <img src="img/logo.png" />
  65. </div>
  66. </div>
  67. <div class="mui-input-row">
  68. <label><span class="mui-icon iconfont icon-yonghu"></span></label>
  69. <input id='account' type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
  70. </div>
  71. <div class="mui-input-row mui-password">
  72. <label><span class="mui-icon iconfont icon-suo"></span></label>
  73. <input id='password' type="password" class=" mui-input-password mui-input" placeholder="请输入密码">
  74. </div>
  75. </form>
  76. <div class="mui-content-padded">
  77. <button id='login' class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">登录</button>
  78. </div>
  79. <div class="mui-content-padded oauth-area">
  80. <a class="reg_href" style="">心连心化学工业集团</a>
  81. </div>
  82. </div>
  83. <script src="js/mui.min.js"></script>
  84. <script src="Script/Common/huayi.config.js"></script>
  85. <script>
  86. var openid = helper.cookies.get("openid");
  87. var UserType = helper.cookies.get("usertype");
  88. // var type = helper.request.queryString("type");
  89. var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
  90. //登陆验证
  91. $("#login").on('tap', function() {
  92. if(!$("#account").val()) {
  93. mui.alert("请输入账号");
  94. return;
  95. }
  96. if(!$("#password").val()) {
  97. mui.alert("密码不能为空")
  98. return;
  99. }
  100. //请求
  101. $.ajax({
  102. type: "post",
  103. url: huayi.config.callcenter_url + 'WxLogin/Login',
  104. async: true,
  105. dataType: 'json',
  106. data: {
  107. UserCode: $("#account").val(),
  108. Password: $("#password").val(),
  109. UserType:1,
  110. State:1,
  111. openid: openid,
  112. //openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid 测试用
  113. },
  114. success: function(data) {
  115. // debugger
  116. if(data.state == "success") {
  117. debugger
  118. var UserType = data.data.usertype;
  119. var UserCode = data.data.usercode;
  120. UserWord = $("#password").val();
  121. var UserCode = data.data.usercode;
  122. helper.cookies.set("usercode", UserCode, 7);
  123. helper.cookies.set("usertype", UserType, 7);
  124. helper.cookies.set("userword", UserWord, 7);
  125. // window.location.href = "client-side/client_index.html";
  126. //helper.cookies.set("openid", 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', 7);//微信openid 测试用
  127. //window.location.href = "client-side/client_index.html?menuCode=LDDL";
  128. //window.location.href = "client-side/client_index.html";
  129. if(UserType == "-1") { //系统管理员
  130. window.location.href = "client-side/client_index.html";
  131. } else if(UserType == "0") { //接待部
  132. window.location.href = "client-side/client_index.html";
  133. } else if(UserType == "1") { //办理人员
  134. window.location.href = "client-side/client_index.html";
  135. } else if(UserType == "2") { //区域客服
  136. window.location.href = "client-side/high_list.html";
  137. } else if(UserType == "3") { //监管
  138. window.location.href = "client-side/Waiting_list.html";
  139. } else if(UserType == "4") { //监管
  140. window.location.href = "client-side/Have_list.html";
  141. }
  142. // else if(UserType == "5") { //业主
  143. // window.location.href = "user/client_index.html";
  144. // }
  145. } else {
  146. mui.alert(data.message);
  147. }
  148. }
  149. })
  150. })
  151. </script>
  152. </body>
  153. </html>