123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- $(function () {
- settime();
- });
- //验证码类型
- var sms_type;
- var smstype;
- var countdown=100;
- $("#countdown").css("backgroundColor","#fff");
- var indexRoute = $("#indexRoute").val();
- function settime() {
- if (countdown == 0) {
- $("#btn").hide();
- window.location.href=indexRoute;
- } else {
- countdown--;
- if(document.getElementById('countdown')){
- document.getElementById('countdown').innerHTML = countdown;
- }
- }
- setTimeout(function() {
- settime();
- },1000)
- }
- //注册获取验证码
- $("#getverificode").click(function () {
- var is_reg = $("#is_reg").val();
- var is_status = $("#is_status").val();
- var mobileValue = $.trim($('#mobile').val());
- if (mobileValue == '') {
- dialogDiv('请输入手机号码','确定','Display');
- $('#mobile').focus();
- return false;
- };
- if (mobileValue != "" && !regularMobile.test(mobileValue)) {
- dialogDiv('请输入正确的手机号码','确定','Display');
- $('#mobile').focus();
- return false;
- }
- if(is_status==1){
- if(is_reg==0)
- {
- $.ajax({
- headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
- url: $("#form3").attr('action'),
- type: 'POST',
- dataType: 'json',
- data: {
- mobile:mobileValue,
- type:2,
- },
- success: function (result) {
- // 开始倒计时
- var countdownZZ = 60;
- function settime() {
- if (countdownZZ == 0) {
- $('#getverificode').prop("disabled", 0);
- $('#getverificode').removeClass('btn_disabled');
- $('#getverificode').html('获取验证码');
- $("#is_status").val(1);
- countdownZZ = 100;
- return;
- } else {
- $("#is_status").val(0);
- $('#getverificode').prop("disabled", !0);
- $('#getverificode').addClass('btn_disabled');
- $("#getverificode").css('font-size','18px')
- $('#getverificode').html('重新发送' + countdownZZ + '秒');
- countdownZZ--;
- }
- setTimeout(function() {
- settime()
- },1000)
- }
- settime();
- },
- error: function (errorData) {
- if (errorData.status==422) {//验证错误
- $.each(JSON.parse(errorData.responseText).errors,function (key,val) {
- dialogDiv(val[0],'确定','Display');
- return false;
- });
- }
- else if(errorData.status==400) {//业务错误
- dialogDiv(JSON.parse(errorData.responseText).message,'确定','Display');
- }
- }
- })
- }
- }
- });
- $('#btnsubmit').click(function() {
- var reg_mobile = $.trim($("#mobile").val());
- var reg_verifiy = $.trim($("#verifiy").val());
- var id_card = $.trim($("#id_card").val());
- var name = $.trim($("#name").val());
- var nation = $.trim($("#nation").val());
- var sex = $.trim($("#sex").val());
- if(reg_mobile=="")
- {
- dialogDiv('手机号不能空','确定','Display');
- $("#mobile").focus();
- return false;
- }
- if(reg_verifiy == "")
- {
- dialogDiv('验证码不能空','确定','Display');
- $("#verifiy").focus();
- return false;
- }
- $.ajax({
- headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
- url: $("#form3").attr('action_to'),
- type: 'POST',
- dataType: 'json',
- data: {
- mobile:reg_mobile,
- mobile_code:reg_verifiy,
- id_card:id_card,
- name:name,
- nation:nation,
- sex:sex,
- },
- success: function (result) {
- location.href=result.data.redirect_url;
- },
- error: function (errorData) {
- if (errorData.status==422) {//验证错误
- $.each(JSON.parse(errorData.responseText).errors,function (key,val) {
- dialogDiv(val[0],'确定','Display');
- return false;
- });
- }
- else if(errorData.status==400) {//业务错误
- dialogDiv(JSON.parse(errorData.responseText).message,'确定','Display');
- }
- }
- })
- });
- function reg() {
- window.location.href= root + "?m=Aio&c=Members&a=createresume";
- return false;
- }
- function Display() {
- $("#MyDiv").remove();
- $("#fade").remove();
- }
- function savelocation() {
- window.location.href = qscms.root +"?m=Aio&c=Job&a=joblist&flag=1"
- }
- function toback() {
- window.history.go(-1);
- }
- function refresh() {
- window.location.reload();
- }
- /*底部导航选中事件 by zmy 2018 02 06*/
- window.onload=function(){
- urlinfo=window.location.href; //获取当前页面的url
- len=urlinfo.length;//获取url的长度
- offset=urlinfo.indexOf("?");//设置参数字符串开始的位置
- newsidinfo_first=urlinfo.substr(offset,len)//取出参数字符串
- newsidinfo = newsidinfo_first.replace('?','')
- newsidinfoarray = newsidinfo.split("&");//以&分隔形成参数数组
- var newsid;
- for(var i=0; i<newsidinfoarray.length; i++){
- if(newsidinfoarray[i].substring(0,2)=='c='){
- newsids=newsidinfoarray[i].split("=");//对获得的参数字符串按照“=”进行分割
- newsid=newsids[1];//得到参数值
- }
- }
- if((newsid=="Job")||(newsid=="job")){
- if(newsidinfo.indexOf("flag")!=-1){
- $(".foot-child").css('background','none');
- $('#zyjs').css('background','url(/Application/Aio/View/default/public/images/footer/footer-zyjs-hover.png) no-repeat');
- }else if(newsidinfo.indexOf("advice")!=-1){
- $(".foot-child").css('background','none');
- } else{
- $(".foot-child").css('background','none');
- $('#zxzw').css('background','url(/Application/Aio/View/default/public/images/footer/footer-zxzw-hover.png) no-repeat');
- }
- }else if((newsid=="Company")||(newsid=="company")){
- $(".foot-child").css('background','none');
- $('#mqzp').css('background','url(/Application/Aio/View/default/public/images/footer/footer-mqzp-hover.png) no-repeat');
- }else if((newsid=="News")||(newsid=="news")){
- $(".foot-child").css('background','none');
- $('#gkxx').css('background','url(/Application/Aio/View/default/public/images/footer/footer-gkxx-hover.png) no-repeat');
- }else if((newsid=="Qianren")||(newsid=="qianren")){
- $(".foot-child").css('background','none');
- $('#sbcx').css('background','url(/Application/Aio/View/default/public/images/footer/footer-sbcx-hover.png) no-repeat');
- }else if(newsid=="members"){
- if(newsidinfo.indexOf("index")!=-1){
- $(".foot-child").css('background','none');
- }else if(newsidinfo.indexOf("login")!=-1){
- $(".foot-child").css('background','none');
- }else if(newsidinfo.indexOf("personal")!=-1){
- $(".foot-child").css('background','none');
- }else if(newsidinfo.indexOf("register")!=-1){
- $(".foot-child").css('background','none');
- }else{
- $(".foot-child").css('background','none');
- $('#jldy').css('background','url(/Application/Aio/View/default/public/images/footer/footer-jldy-hover.png) no-repeat');
- }
- }
- }
|