login.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable">
  6. <title>晋江市人才综合服务平台-登录</title>
  7. <link rel="shortcut icon" href="/static/favicon.ico">
  8. <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
  9. <link href="/static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
  10. <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
  11. <script>if (window.top !== window.self) {
  12. window.top.location = window.location;
  13. }
  14. </script>
  15. <script src="/static/js/jquery.min.js?v=2.1.4"></script>
  16. <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
  17. <script src="/static/js/plugins/layer/layer.js"></script>
  18. <script src="/static/js/common/Feng.js"></script>
  19. <script src="/static/js/common/ajax-object.js"></script>
  20. <style>
  21. .bg{
  22. background: url(/static/img/yjqx.png);
  23. }
  24. input:-webkit-autofill { box-shadow: 0 0 0px 1000px white inset;}
  25. #pwd-form .row{
  26. padding-top: 10px;
  27. }
  28. a,a:hover{color:#000;}
  29. .header,.footer{height:80px;width:100%;background:#fff;}
  30. .header .content{width:980px;height:100%;margin:0 auto;}
  31. .header .content .title{color:#000;font-size:24px;font-weight:bold;line-height:40px;padding:20px 10px;}
  32. .footer{line-height:60px;text-align:center;margin:0;}
  33. .body{background:url(/static/img/login_bg.jpg) no-repeat center;background-size:100% auto;min-height:500px;height:calc(100% - 160px);}
  34. .body .content{width:980px;margin:0 auto;height:100%;position:relative;}
  35. .loginForm{
  36. position:absolute;top:50%;right:20px;margin-top:-225px;width:360px;height:450px;background:#fff;padding:20px;border-radius:10px;
  37. }
  38. .loginForm .greeting{color:#33a1ff;font-size:24px;font-weight:bold;letter-spacing:5px;text-align:center;height:60px;line-height:60px;border-bottom:1px solid #ddd;margin:0 50px;}
  39. .bg1{background-size:auto 100%;}
  40. button[type=submit],button[type=submit]:hover{background:#3073d5;}
  41. button[type=submit]:active,button[type=submit]:focus{background:#5F9BEE !important;}
  42. .form-control,#captcha,button[type=submit]{height:36px;}
  43. @media screen and (max-width:480px){
  44. .header .content{width:400px;}
  45. .body .content{width:400px;}
  46. }
  47. @media screen and (max-width:400px){
  48. .header .content{width:360px;}
  49. .body .content{width:360px;}
  50. .loginForm{width:320px;left:50%;margin-left:-160px;}
  51. }
  52. @media screen and (min-width:768px) and (max-width:900px){
  53. .header .content{width:768px;}
  54. .body .content{width:768px;}
  55. }
  56. </style>
  57. </head>
  58. <body class="gray-bg">
  59. <div class="header">
  60. <div class="content">
  61. <div class="title">晋江市人才综合服务申报平台</div>
  62. </div>
  63. </div>
  64. <div class="body" id="body">
  65. <div class="content">
  66. <div class="loginForm">
  67. <div class="greeting">
  68. 欢迎登录
  69. </div>
  70. <form id="login_form" class="m-t" role="form" action="/index/auth/login" method="post">
  71. <div style="color:red;height:20px;margin-bottom:5px;text-align:center;">{$msg}</div>
  72. <div class="form-group bg" >
  73. <select name="usertype" id="userType" class="form-control" placeholder="用户类型" required="">
  74. <option value="">--- 请选择用户类型 ---</option>
  75. <option value="0">现代产业体系人才申报服务</option>
  76. <option value="1">管理员用户</option>
  77. <option value="2">机构用户</option>
  78. <option value="3">个人用户</option>
  79. </select>
  80. </div>
  81. <div class="form-group">
  82. <input type="text" name="username" class="form-control" placeholder="用户名" autocomplete="off" required="" style="background: url(/static/img/user.png) 6px 11px no-repeat;padding-left:25px;">
  83. </div>
  84. <div class="form-group">
  85. <input type="password" name="password" class="form-control" placeholder="密码" autocomplete="off" required="" style="background: url(/static/img/mm.png) 6px 11px no-repeat;padding-left:25px;">
  86. </div>
  87. {if condition="session('isCaptcha') == 1"}
  88. <div class="form-group" style="float: left;">
  89. <div class="col-sm-8" style="padding-left: 0px; padding-right: 0px;">
  90. <input class="form-control" type="text" name="captcha" placeholder="验证码" required="">
  91. </div>
  92. <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;">
  93. <img src="{:captcha_src()}" id="captcha" width="100%" height="100%"/>
  94. </div>
  95. </div>
  96. {/if}
  97. <button type="submit" class="btn btn-primary block full-width m-b" style="margin-top:20px;">登录</button>
  98. <div style="margin-top:20px;">
  99. <button onclick="Login.openEditPassword()" type="button" style="border:none;background: #fff;float:left;color: #008ef9;color:#888;">忘记密码?</button>
  100. <button onclick="Login.gotoRegisterPage('/common/auth/register')" type="button" style="border:none; background: #fff;color: #008ef9;float:right;">注册新用户</button>
  101. </div>
  102. <div style="margin-top: 60px; color: #ff0000;font-weight: bold;">
  103. 温馨提示:近期我市对人才综合服务申报平台进行优化升级,请申报“现代产业体系人才政策事项”的用人单位,在选择用户类型时点击“v”登录
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="footer">
  109. <a>Copyight@ 福建省晋江人力资本有限公司 All Rights Reserved </a>
  110. </div>
  111. <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
  112. <script>
  113. resize();
  114. window.onresize = function () {
  115. resize();
  116. }
  117. function resize() {
  118. var height = document.body.clientHeight - 160;
  119. var width = document.body.clientWidth;
  120. var ratio = height / width;
  121. var loginBgRatio = 862 / 1920;
  122. var oldClass = document.querySelector('#body').className;
  123. var classes = oldClass.split(" ");
  124. console.log(ratio, loginBgRatio)
  125. if (ratio > loginBgRatio) {
  126. if (classes.indexOf("bg1") == -1) {
  127. classes.push("bg1");
  128. }
  129. } else {
  130. var index = classes.indexOf("bg1");
  131. if (index > -1) {
  132. classes.splice(index, 1);
  133. }
  134. }
  135. document.querySelector('#body').className = classes.join(" ");
  136. }
  137. </script>
  138. <script>
  139. Feng.addCtx("");
  140. $(function () {
  141. $('#userType').change(function(){
  142. var selectedValue = $(this).val();
  143. if(selectedValue == 0){
  144. window.location.href = "https://12333.jinjiang.gov.cn/rencaiApply/";
  145. }
  146. });
  147. sessionStorage.removeItem('locked');
  148. $("#captcha").on('click', function () {
  149. $("#captcha").attr('src', '{:captcha_src()}?' + Math.floor(Math.random() * 100)).fadeIn();
  150. });
  151. //获取链接参数
  152. var param = window.location.search;
  153. var userType = Feng.getUrlValue("userType");
  154. var username = Feng.getUrlValue("username");
  155. var name = Feng.getUrlValue("name");
  156. var idCard = Feng.getUrlValue("idCard");
  157. var type = Feng.getUrlValue("type");
  158. if (param != null && param != '' && userType != null && userType != null && username != null && username != null
  159. && name != null && name != '' && idCard != null && idCard != '') {
  160. Login.gotoRegisterPage('/api/common/gotoRegisterPage' + param);
  161. }
  162. });
  163. var Login = {layerIndex: -1};
  164. Login.gotoRegisterPage = function (url) {
  165. var index = layer.open({
  166. type: 2,
  167. title: '注册新用户',
  168. area: ['950px', '700px'], //宽高
  169. fix: false, //不固定
  170. maxmin: true,
  171. content: Feng.ctxPath + url,
  172. btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
  173. yes: function (index, layero) {
  174. var iframeWin = window[layero.find('iframe')[0]['name']];
  175. //按钮【按钮一】的回调
  176. iframeWin.Register.addSubmit();
  177. }
  178. });
  179. layer.full(index);
  180. this.layerIndex = index;
  181. }
  182. Login.openEditPassword = function () {
  183. var index = layer.open({
  184. type: 1,
  185. title: '忘记密码',
  186. area: ['550px', '400px'], //宽高
  187. fix: false, //不固定
  188. maxmin: true,
  189. content: '<form id="pwd-form" class="form-horizontal" >\n' +
  190. '<div class="col-sm-12 form-group">\n' +
  191. '<div class="row">\n' +
  192. '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>账号类型</label>\n' +
  193. '<div class="col-sm-9 spacing">\n' +
  194. '<select type="text" class="form-control" id="type" name="type" >' +
  195. '<option value="">请选择</option>' +
  196. '<option value="1">企业账户</option>' +
  197. '<option value="2">个人账户</option>' +
  198. '</select>\n' +
  199. '</div>\n' +
  200. '</div>\n' +
  201. '<div class="row">\n' +
  202. '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>账号</label>\n' +
  203. '<div class="col-sm-9 spacing">\n' +
  204. '<input type="text" autocomplete="off" class="form-control" id="username" name="username" />\n' +
  205. '</div>\n' +
  206. '</div>\n' +
  207. '<div class="row">\n' +
  208. '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>新密码</label>\n' +
  209. '<div class="col-sm-9 spacing">\n' +
  210. '<input type="password" autocomplete="off" class="form-control" id="password" name="password" />\n' +
  211. '</div>\n' +
  212. '</div>\n' +
  213. '<div class="row">\n' +
  214. '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>重复新密码</label>\n' +
  215. '<div class="col-sm-9 spacing">\n' +
  216. '<input autocomplete="off" type="password" class="form-control" id="re_password" />\n' +
  217. '</div>\n' +
  218. '</div>\n' +
  219. '<div class="row">\n' +
  220. '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>手机号</label>\n' +
  221. '<div class="col-sm-9 spacing form-inline">\n' +
  222. '<input autocomplete="off" type="text" style="width: 250px;" class="form-control" id="phone" name="phone" placeholder="企业账号请填写人才联络员手机号码"/>\n' +
  223. '<button id="smsBtn" style="margin-bottom: 0px;" onclick="Login.sendSms()" type="button" class="btn btn-xs btn-info">获取验证码</button>\n' +
  224. '</div>\n' +
  225. '</div>\n' +
  226. '<div class="row">\n' +
  227. '<label class="col-sm-3 control-label spacing"><span class="text-danger">*</span>手机验证码</label>\n' +
  228. '<div class="col-sm-9 spacing">\n' +
  229. '<input autocomplete="off" type="text" class="form-control" id="verificationCode" name="verificationCode" />\n' +
  230. '</div>\n' +
  231. '</div>\n' +
  232. '</div>\n' +
  233. '</form>',
  234. btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
  235. btnAlign: 'c',
  236. yes: function (index, layero) {
  237. var type = $("#type").val();
  238. var username = $("#username").val();
  239. var password = $("#password").val();
  240. var rePassword = $("#re_password").val();
  241. var phone = $("#phone").val();
  242. var verificationCode = $("#verificationCode").val();
  243. if (type == null || type == "") {
  244. Feng.info("请选择账号类型!");
  245. return;
  246. }
  247. if (username == null || username == '') {
  248. Feng.info("请填写账号名!");
  249. return;
  250. }
  251. if (password == null || password == '') {
  252. Feng.info("请填写密码!");
  253. return;
  254. }
  255. if (rePassword == null || rePassword == '') {
  256. Feng.info("请填写重复密码!");
  257. return;
  258. }
  259. if (password != rePassword) {
  260. Feng.info("两次密码填写不一致!");
  261. return;
  262. }
  263. if (phone == null || phone == '') {
  264. Feng.info("请填写手机号!");
  265. return;
  266. }
  267. if (verificationCode == null || verificationCode == '') {
  268. Feng.info("请填写手机验证码!");
  269. return;
  270. }
  271. if (!/0?(13|14|15|16|17|18|19)[0-9]{9}/.test(phone)) {
  272. Feng.info("手机号格式不合法!");
  273. return;
  274. }
  275. var da = {"type": type, "username": username, "password": password, "rePassword": rePassword, "phone": phone, "verificationCode": verificationCode};
  276. var ajax = new $ax(Feng.ctxPath + "/common/auth/findBackPassword", function (data) {
  277. Feng.info(data.msg);
  278. if (data.code == 200) {
  279. layer.close(index);
  280. }
  281. }, function (data) {
  282. Feng.error("操作失败!" + data.responseJSON.message + "!");
  283. });
  284. ajax.set(da);
  285. ajax.start();
  286. }
  287. });
  288. }
  289. var countDown = 0;
  290. Login.sendSms = function () {
  291. var phone = $("#phone").val();
  292. if (phone == null || phone == "") {
  293. Feng.info("请填写手机号!");
  294. return;
  295. }
  296. phone = $.trim(phone);
  297. if (!Feng.checkMobilePhoneNum(phone)) {
  298. Feng.info("手机号格式有误,请填写正确的手机号码!");
  299. return;
  300. }
  301. Login.BtnCountDown();
  302. var ajax = new $ax(Feng.ctxPath + "/common/auth/verificationCode?phone=" + phone + "&type=1", function (data) {
  303. Feng.info(data.msg);
  304. }, function (data) {
  305. Feng.error("操作失败!" + data.responseJSON.message + "!");
  306. });
  307. ajax.set(null);
  308. ajax.start();
  309. }
  310. Login.BtnCountDown = function () {
  311. if (countDown == 0) {
  312. countDown = 60;
  313. } else if (countDown == 1) {
  314. $("#smsBtn").removeAttr("disabled");
  315. $("#smsBtn").html("获取验证码");
  316. countDown = 0;
  317. return;
  318. }
  319. $("#smsBtn").attr("disabled", true);
  320. $("#smsBtn").html(countDown + "秒");
  321. countDown--;
  322. setTimeout("Login.BtnCountDown()", 1000);
  323. }
  324. Login.callBack = function (data) {
  325. }
  326. </script>
  327. </body>
  328. </html>