chengkun
2025-05-26 8f3df543230cd4403368b39b9bbe5726d11a0284
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
 
    function oncesubmit() {
        var name = $.trim(document.getElementById('username').value),
            id = $.trim(document.getElementById('id').value),
            sex = $.trim(document.getElementById('sex').value),
            exp = $.trim(document.getElementById('exp').value),
            job = $.trim(document.getElementById('job').value),
            provinceid = $.trim(document.getElementById('provinceid').value),
            cityid = $.trim(document.getElementById('cityid').value),
            three_cityid = $.trim(document.getElementById('three_cityid').value),
            production = $.trim(document.getElementById('production').value),
            mobile = $.trim(document.getElementById('mobile').value),
            password = $.trim(document.getElementById('password').value),
            checkcode,
            
            verify_token;
        if(name == '') {
            return showToast('请填写姓名!');
        }
        if(sex == '') {
            return showToast('请选择性别!');
        }
        if(exp == '') {
            return showToast('请选择工作年限!');
        }
        var cionly ='';
        if(ct.length<=0 || ct=='new Array()'){
            cionly = '1';
        }
        if(cionly == '1'){
            if(provinceid == '') {
                return showToast('请选择工作地区!');
            }
        }else{
            if(cityid == '') {
                return showToast('请选择工作地区!');
            }
        }
        
        if(production == '') {
            return showToast('请介绍自己!');
        }
        if(job == '') {
            return showToast('请填写工作!');
        }
        if(mobile == '') {
            return showToast('请填写联系手机!');
        }
        if(isjsMobile(mobile) == false) {
            return showToast('请注意联系手机格式!');
        }
        if(exitsid("moblie_code")){
            var moblie_code = $("#moblie_code").val();
            if(moblie_code == ''){
                return showToast('请填写短信验证码!');            
            }            
        }
        if(password == '') {
            return showToast('请填写密码!');
        }
        if(code_web.indexOf("店铺招聘") >= 0) {
            if(code_kind == 1) {
                var checkcode = $("#checkcode").val();
                if(checkcode == '') {
                    return showToast('请填写验证码!');
                }
            } else if(code_kind >2) {
                $("#bind-captcha").attr('data-id','oncesubmit');
                $("#bind-captcha").attr('data-type','click');
                verify_token = $('input[name="verify_token"]').val();
                
                if(verify_token == '') {
                    $("#bind-submit").trigger("click");
                    return false; 
                }
            }
        }
    
        $.post(wapurl + "/index.php?c=tiny&a=add", {
            id: id,
            name: name,
            sex: sex,
            exp: exp,
            job: job,
            provinceid: provinceid,
            cityid: cityid,
            three_cityid: three_cityid,
            production: production,
            mobile: mobile,
            password: password,
            authcode: checkcode,
            moblie_code:moblie_code,
            verify_token:verify_token,
            submit: 'submit'
        }, function(data) {
            if(data.url) {
                showToast(data.msg, 2, function() {
                    location.href = data.url;
                });
            } else {
                checkCode('vcode_img');
                showToast(data.msg, 2);
                return false;
            }
    
        }, 'json');
}