Aucune description

login.html 6.3KB

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