BaoFengSZCG_Web 宝丰县数字城管

login.html 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  6. <title>登录</title>
  7. <meta name="keywords">
  8. <meta name="description">
  9. <meta name="renderer" content="webkit|ie-comp|ie-stand" />
  10. <script src="Script/Common/huayi.load.js"></script>
  11. <script src="Script/Common/huayi.config.js"></script>
  12. <link rel="shortcut icon" href="img/32.ico" />
  13. <link href="./css/bootstrap.min.css" rel="stylesheet">
  14. <link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
  15. <link href="./css/animate.min.css" rel="stylesheet">
  16. <link href="./css/style.min.css" rel="stylesheet">
  17. <!--<link href="./css/login.min.css" rel="stylesheet">-->
  18. <link rel="stylesheet" href="css/initialize.css" />
  19. <script src="./js/jquery.md5.js"></script>
  20. <style>
  21. body{
  22. height: 100%;
  23. }
  24. .head,.foot{
  25. background: #fff;
  26. width: 100%;
  27. height: 10%;
  28. box-sizing: border-box;
  29. }
  30. .foot{
  31. text-align: center;
  32. }
  33. .headCon,.mainCon,.footCon{
  34. width: 1200px;
  35. margin: 0 auto;
  36. }
  37. .headCon{
  38. /*padding: 20px 0 15px 0;*/
  39. box-sizing: border-box;
  40. /*padding-top: 25px;*/
  41. height: 100%;
  42. }
  43. .wrap{
  44. height: 500px;
  45. background: #030819;
  46. width: 100%;
  47. height: 80%;
  48. }
  49. .footCon{
  50. /*padding: 54px 0 32px 0;*/
  51. }
  52. .footCon ul li{
  53. float: left;
  54. text-align: center;
  55. color: #243747;
  56. padding: 0 5px;
  57. }
  58. .footCon ul li a{
  59. display: block;
  60. color: #243747;
  61. }
  62. .Copy{
  63. color: #243747;
  64. text-align: center;
  65. }
  66. .center{
  67. display: inline-block;
  68. height: 100%;
  69. vertical-align: middle;
  70. }
  71. .mainCon,.mainCon_left,.mainCon_right,.img_box{
  72. height: 100%;
  73. }
  74. .mainCon_right{
  75. text-align: center;
  76. }
  77. .tab_box{
  78. background: #fff;
  79. height: 346px;
  80. display: inline-block;
  81. width: 375px;
  82. vertical-align: middle;
  83. }
  84. .tab_box ul li {
  85. width: 50%;
  86. float: left;
  87. width: 50%;
  88. float: left;
  89. padding: 20px 0;
  90. text-align: center;
  91. color: #243747;
  92. font-size: 16px;
  93. }
  94. .tab_box ul{
  95. border-bottom: 1px solid #cdcdcd;
  96. }
  97. .tab_content div p {
  98. width: 300px;
  99. margin: 0 auto;
  100. height: 36px;
  101. border: 1px solid #ebebed;
  102. border-radius: 5px;
  103. margin-bottom: 25px;
  104. line-height: 36px;
  105. padding-left: 10px;
  106. text-align: initial;
  107. }
  108. .tab_content div p input {
  109. width: 200px;
  110. border: 0;
  111. font-size: 14px;
  112. outline: none;
  113. color: #323232;
  114. }
  115. .login_icon {
  116. display: inline-block;
  117. width: 25px;
  118. height: 19px;
  119. vertical-align: sub;
  120. margin-right: 15px;
  121. border-right: 1px solid #cdcdcd;
  122. }
  123. .tab_content .login_go {
  124. text-align: center;
  125. padding: 0!important;
  126. font-size: 16px!important;
  127. letter-spacing: 16px;
  128. color: #fff;
  129. background: #1ab394;
  130. height: 49px!important;
  131. line-height: 49px!important;
  132. cursor: pointer;
  133. }
  134. .login_icon_user {
  135. background: url(img/user-icon.png) no-repeat;
  136. }
  137. .login_icon_hua {
  138. background: url(img/fj-icon.png) no-repeat;
  139. }
  140. .login_icon_lock {
  141. background: url(img/psw-icon.png) no-repeat;
  142. }
  143. .error {
  144. width: 16px;
  145. height: 16px;
  146. background: url(img/xx-error.png) no-repeat;
  147. display: none;
  148. border: 0;
  149. }
  150. .errorShow {
  151. display: inline-block;
  152. }
  153. .active{
  154. position: relative;
  155. }
  156. .active:after{
  157. display: block;
  158. content: "";
  159. position: absolute;
  160. height: 2px;
  161. width: 45%;
  162. background: #00b194;
  163. margin: 0 auto;
  164. bottom: -1px;
  165. right: 0;
  166. left: 0;
  167. top: auto;
  168. }
  169. .tab_content>div{
  170. padding-top: 24px;
  171. }
  172. .tab_content{
  173. border: 1px solid transparent
  174. }
  175. </style>
  176. </head>
  177. <body class="signin">
  178. <div class="head">
  179. <div class="headCon">
  180. <img src="img/logo.png" alt="" style="vertical-align: middle;" />
  181. <span class="center"></span>
  182. </div>
  183. </div>
  184. <div class="wrap">
  185. <div class="mainCon row">
  186. <div class="mainCon_left col-sm-7">
  187. <div class="img_box">
  188. <img src="img/xx_bg_03.png" alt="" style="vertical-align: middle;display: inline-block; width: 95%;" />
  189. <span class="center"></span>
  190. </div>
  191. </div>
  192. <div class="mainCon_right col-sm-5">
  193. <div class="tab_box">
  194. <ul class="clearfix tab_ul">
  195. <li class="active">坐席登录</li>
  196. <li>用户登录</li>
  197. </ul>
  198. <div class="tab_content">
  199. <div class="tab_one">
  200. <p>
  201. <i class="login_icon login_icon_user "></i>
  202. <input class="zx_user" type="text" placeholder="请输入您的管理账号" />
  203. <i class="login_icon error error_zx error_zx_user"></i>
  204. </p>
  205. <p>
  206. <i class="login_icon login_icon_hua "></i>
  207. <input class="zx_fj" type="text" placeholder="请输入分机号" />
  208. <i class="login_icon error error_zx error_zx_fj"></i>
  209. </p>
  210. <p>
  211. <i class="login_icon login_icon_lock "></i>
  212. <input class="zx_psw" type="password" placeholder="请输入您的密码" />
  213. <i class="login_icon error error_zx error_zx_psw"></i>
  214. </p>
  215. <p class="login_go login_zx">登录</p>
  216. </div>
  217. <div class="tab_two" style="display: none;">
  218. <p>
  219. <i class="login_icon login_icon_user "></i>
  220. <input class="gl_user" type="text" placeholder="请输入您的管理账号" />
  221. <i class="login_icon error error_gl error_gl_user"></i>
  222. </p>
  223. <p>
  224. <i class="login_icon login_icon_lock"></i>
  225. <input class="gl_psw" type="password" placeholder="请输入您的密码" />
  226. <i class="login_icon error error_gl error_gl_psw"></i>
  227. </p>
  228. <p class="login_go login_gl">登录</p>
  229. </div>
  230. </div>
  231. </div>
  232. <span class="center"></span>
  233. </div>
  234. </div>
  235. </div>
  236. <div class="foot">
  237. <div class="footCon" style="display: inline-block; vertical-align: middle;">
  238. <!--<ul class="clearFix" style=" text-align:center; margin: 0 auto;">
  239. <li><a href="ExeWork/LeCallCenterSetup.exe">下载客户端</a></li>
  240. <li>|</li>
  241. <li><a href="ExeWork/Microsoft.NET4.0.exe">下载安装环境</a></li>
  242. <li>|</li>
  243. <li><a href="ExeWork/vcredist_x86.exe">安装异常补充包</a></li>
  244. <li>|</li>
  245. <li>技术服务热线:400-637-1311</li>
  246. </ul>-->
  247. <div style="vertical-align: middle;">
  248. <a href="ExeWork/LeCallCenterSetup.exe">下载客户端</a> |
  249. <a href="ExeWork/Microsoft.NET4.0.exe">下载安装环境</a> |
  250. <a href="ExeWork/vcredist_x86.exe">安装异常补充包</a> |
  251. 技术服务热线:400-637-1311</div>
  252. <p class="Copy" style="margin-top: 13px;">Copyright©2010-2020 华谊科技 版权所有</p>
  253. </div>
  254. <span class="center"></span>
  255. </div>
  256. <script>
  257. $(function() {
  258. var a=0;
  259. $('.tab_ul li').click(function() {
  260. $(this).addClass("active").siblings().removeClass("active");
  261. var index = $(this).index();
  262. a=index;
  263. $('.tab_content').children('div').eq(index).show().siblings().hide();
  264. })
  265. /*cook存储数据*/
  266. if($.cookie("username")) {
  267. //取值如果存在则赋值
  268. console.log($.cookie("username"))
  269. $(".gl_user").val($.cookie("user")); //用户名
  270. $("zx_fj").val($.cookie("fj"));
  271. $(".zx_user").val($.cookie("user"));
  272. }
  273. //键盘登录事件
  274. $('input').bind('keypress', function(event) {
  275. if(event.keyCode == "13") {
  276. console.log(a);
  277. if(a == 0) {
  278. $('.login_zx').trigger("click");
  279. } else {
  280. $(".login_gl").trigger("click");
  281. }
  282. }
  283. });
  284. //坐席登录
  285. $('.login_zx').click(function(){
  286. console.log("坐席")
  287. var zx_user = $(".zx_user").val();
  288. var zx_fj = $(".zx_fj").val();
  289. var zx_psw = $(".zx_psw").val();
  290. if(zx_user == "" || zx_fj == "" || zx_psw == "") {
  291. $(".error_zx").addClass('errorShow');
  292. if($(".zx_user").val() == "") {
  293. $(".zx_user").focus(function() {
  294. $(".error_zx").removeClass('errorShow');
  295. });
  296. } else {
  297. $(".error_zx_user").removeClass('errorShow');
  298. }
  299. }else {
  300. /*请求后台*/
  301. $.cookie("extno",zx_fj);
  302. $.cookie("zx_user",zx_user);
  303. $.ajax({
  304. type: "post",
  305. url: huayi.config.callcenter_url + "/Login/login",
  306. dataType: 'json',
  307. async: true,
  308. data: {
  309. username: zx_user,
  310. extensionphone: zx_fj,
  311. password: zx_psw //$.md5
  312. },
  313. success: function(data) {
  314. /*验证请求*/
  315. if(data.state == "success") {
  316. $.cookie("token", data.data.token, {
  317. expires: 7
  318. });
  319. $.cookie("extno", zx_fj, {
  320. expires: 7
  321. });
  322. $.cookie("zx_user", zx_user, {
  323. expires: 7
  324. });
  325. window.location.href = "index.html";
  326. }else{
  327. $(".zx_user").val('');
  328. $(".zx_fj").val('');
  329. $(".zx_psw").val('');
  330. console.log(data);
  331. }
  332. }
  333. });
  334. }
  335. })
  336. //用户登录
  337. $('.login_gl').click(function() {
  338. console.log("用户")
  339. var gl_user = $(".gl_user").val();
  340. var gl_psw = $(".gl_psw").val();
  341. if(gl_user == "" || gl_psw == "") {
  342. $(".error_gl").addClass('errorShow');
  343. if($(".gl_user").val() == "") {
  344. $(".gl_user").focus(function() {
  345. $(".error_gl").removeClass('errorShow');
  346. });
  347. } else {
  348. $(".error_gl_user").removeClass('errorShow');
  349. }
  350. } else {
  351. /*请求后台*/
  352. $.ajax({
  353. type: "post",
  354. url: huayi.config.callcenter_url + "/Login/login",
  355. dataType: 'json',
  356. async: true,
  357. data: {
  358. username: gl_user,
  359. password: gl_psw //$.md5
  360. },
  361. success: function(data) {
  362. /*验证请求*/
  363. if(data.state == "success") {
  364. $.cookie("token", data.data.token, {
  365. expires: 7
  366. });
  367. window.location.href = "index.html";
  368. }else{
  369. $(".gl_user").val('');
  370. $(".gl_psw").val('');
  371. console.log(data.state);
  372. }
  373. }
  374. });
  375. }
  376. })
  377. })
  378. </script>
  379. </body>
  380. </html>