123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
-
- <?php
-
- ?>
- <script src="/template/pc/js/botstrap-step/bootstrap.min.js"></script>
- <script src="/template/pc/js/botstrap-step/jquery.backstretch.min.js"></script>
- <script src="/template/pc/js/botstrap-step/retina-1.1.0.min.js"></script>
- <script src="/template/pc/js/botstrap-step/scripts.js"></script>
-
-
-
-
- <script type="text/javascript" src="/template/pc/js/botstrap-step/moment.min.js"></script>
- <script type="text/javascript" src="/template/pc/js/botstrap-step/daterangepicker.js"></script>
- <script>
- $(function() {
- $(".daterange input").each(function() {
- var $this = $(this);
-
- $this.daterangepicker({
- locale : {
- "format" : "YYYY-MM-DD",
- "separator" : " / ",
-
- "applyLabel" : "确定",
- "cancelLabel" : "取消",
- "fromLabel" : "开始",
- "toLabel" : "结束",
- "daysOfWeek" : [ "日", "一", "二", "三", "四", "五", "六" ],
- "monthNames" : [ "一月", "二月", "三月", "四月", "五月", "六", "七月", "八月", "九月", "十月", "十一月", "十二月" ],
- "firstDay" : 1,
- "defaultDate": new Date(),
- },
- showDropdowns: true,
- singleDatePicker: true,
- opens: 'right',
- }, function(start, end, label) {
-
-
- if ($this.parents("form.required-validate").length > 0) {
- var $form = $this.parents("form.required-validate");
-
- var name = $this.attr("name");
- if ($form.length > 0) {
- var data = $form.data('bootstrapValidator');
- data.updateStatus(name, 'NOT_VALIDATED', null)
-
- .validateField(name);
- }
- }
-
- }).css("min-width", "210px").next("i").click(function() {
-
- $(this).parent().find('input').click();
- });
- });
- });
- </script>
-
- <script>
-
-
-
-
- $(function(){
-
-
- function setTime(obj, countdown) {
- if (countdown == 0) {
- obj.prop('disabled',false);
- obj.addClass('get-code-hover');
- obj.html("获取验证码");
- return;
- } else {
- obj.prop('disabled', 'disabled');
- obj.removeClass('get-code-hover');
- obj.html("重新发送(" + countdown + ")");
- countdown--;
- }
- setTimeout(function() {
- setTime(obj, countdown);
- }, 1000)
- };
-
-
- function isValidPhoneNumber(phoneNumber) {
- var regex = /^1[3-9]\d{9}$/;
- return regex.test(phoneNumber);
- }
-
-
- $(document).on('click','#retrieve-code',function (){
-
-
-
- var phoneNumber = $('#per-phone').val();
- if (isValidPhoneNumber(phoneNumber)) {
- console.log("手机号码有效");
- } else {
- console.log("手机号码无效");
- $('#myModal .modal-body p').html('手机号码无效');
- $('#myModal').modal('show');
- return false;
- }
-
-
- $('#loadingModal .visually-hidden').html('发送中...');
- $('#loadingModal').modal('show');
-
-
- setTime($('#retrieve-code'),120);
-
-
-
- $.ajax({
- url: '/api/Diyajax/getCode',
- data: {
- 'mobile' : phoneNumber,
- },
- method: 'GET',
- success: function(data) {
-
- $('#loadingModal').modal('hide');
-
- console.log('Ajax response:', data);
-
- $('#loadingModal .visually-hidden').html(data.msg);
- $('#loadingModal').modal('show');
- setTimeout(function() {
- $('#loadingModal').modal('hide');
- }, 3000);
-
- },
- error: function(xhr, status, error) {
-
- $('#loadingModal').modal('hide');
-
- console.error('Ajax error:', status, error);
- }
- });
- });
-
-
- $("#choose1").change(function (){
-
- var id = $(this).val();
- if(id > 0) {
-
- $('#loadingModal').modal('show');
- $.ajax({
- url: '/api/Diyajax/getZcList',
- method: 'POST',
- dataType: 'json',
- data: {
- id : id
- },
- success: function(data) {
-
- $('#loadingModal').modal('hide');
-
- console.log('Ajax response:', data);
- console.log(data.data);
- var html = '<option value="0">选择申报专业</option>';
- $.each(data.data,function (i,e){
- console.log(e);
- html += '<option value="'+e.id+'">'+e.title+'</option>';
- });
- $('#choose2').empty();
- $('#choose2').append(html);
- },
- error: function(xhr, status, error) {
-
- $('#loadingModal').modal('hide');
-
- console.error('Ajax error:', status, error);
- }
- });
- }
-
- });
-
-
- $("#choose2").change(function (){
-
- var id = $(this).val();
- if(id > 0) {
-
- $('#loadingModal').modal('show');
- $.ajax({
- url: '/api/Diyajax/getZcDjList',
- method: 'POST',
- dataType: 'json',
- data: {
- id : id
- },
- success: function(data) {
-
- $('#loadingModal').modal('hide');
-
- console.log('Ajax response:', data);
- console.log(data.data);
- var html = '<option value="0">选择申报等级</option>';
- $.each(data.data,function (i,e){
- console.log(e);
- html += '<option value="'+e.id+'">'+e.title+'</option>';
- });
- $('#choose3').empty();
- $('#choose3').append(html);
- },
- error: function(xhr, status, error) {
-
- $('#loadingModal').modal('hide');
-
- console.error('Ajax error:', status, error);
- }
- });
- }
-
- });
-
-
-
-
-
-
-
- });
- </script>
|