show.blade.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. @extends('mobile.module.layouts.content')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <link rel="stylesheet" href="{{theme_asset('mobile/css/swiper.min.css')}}">
  6. <link rel="stylesheet" href="{{theme_asset('mobile/css/recruit_show.css')}}">
  7. @endpush
  8. @push('js')
  9. <script src="{{theme_asset('mobile/js/swiper.min.js')}}"></script>
  10. @endpush
  11. @section('content')
  12. <h1 class="font18 padding5">{{ $info->name }}</h1>
  13. <div class="steps">
  14. <ul class="steps-box">
  15. @foreach($info->steps as $step)
  16. <li class="
  17. @if($step['step_id'] <= $info->current)
  18. active
  19. @endif">
  20. <p>{{ $step['name'] }}</p>
  21. <p>{{ $step['time'] }}</p>
  22. </li>
  23. @endforeach
  24. </ul>
  25. </div>
  26. @if(!$list->isEmpty())
  27. <div class="swiper-container">
  28. <div class="swiper-wrapper">
  29. @foreach($list as $recruit)
  30. <div class="swiper-slide"><a href="{{$recruit->url}}">{{$recruit->title}}</a></div>
  31. @endforeach
  32. </div>
  33. </div>
  34. @endif
  35. <div class="padding5">
  36. {!! $info->introduction !!}
  37. </div>
  38. <div class="refootnav" id="to_sign_up" data-id="{{$info->id}}">
  39. <div class="btns link_gray6">
  40. <div class="signup downbtn">报名/查看报名</div>
  41. </div>
  42. </div>
  43. @endsection
  44. @section('script')
  45. <script>
  46. //流程
  47. var active = $('.steps-box .active');
  48. var last_active = active[active.length - 1];
  49. var left = $(last_active).offset().left;
  50. $('.steps').scrollLeft(left);
  51. //公告
  52. var mySwiper = new Swiper('.swiper-container',{
  53. direction: 'vertical', // 垂直切换选项
  54. autoplay: 5000,
  55. });
  56. //检查基础信息
  57. function check_user_basic_info(recruit_id){
  58. $.ajax({
  59. url: "{{route('mobile.recruit.check_user_basic_info')}}",
  60. type: 'POST',
  61. dataType: 'json',
  62. success: function (data) {
  63. if (data.status != 200) {
  64. qsToast({type: 2, context: data.msg});
  65. if(data.hasOwnProperty('url')){
  66. setTimeout(function () {
  67. window.location.href = data.url + '?recruit_id='+recruit_id;
  68. }, 2000);
  69. }
  70. return false;
  71. } else {
  72. window.location.href = "{{route('mobile.recruit.sign_up')}}" + '?id=' + recruit_id;
  73. }
  74. }
  75. })
  76. }
  77. var isApply = parseInt({{ $info->isApply }});
  78. //点击报名
  79. $("#to_sign_up").click(function () {
  80. var isVisitor = "{{$uid}}";
  81. var id = $(this).data('id');
  82. var isVisitorutype = "{{$utype}}";
  83. var current = parseInt({{$info->current}});
  84. if ((isVisitor > 0)) {
  85. if (current != 1) {
  86. qsToast({type: 2, context: '当前非报名阶段'});
  87. return false;
  88. }
  89. if (isApply != 1) {
  90. qsToast({type: 2, context: '当前非报名时间!'});
  91. return false;
  92. }
  93. if (isVisitorutype == '1') {
  94. qsToast({type: 2, context: '只有登录个人会员才可报名!'});
  95. return false;
  96. } else {
  97. check_user_basic_info(id)
  98. }
  99. } else {
  100. location.href = "{{route('mobile.recruit.check_index_user',['id'=>$info->id])}}";
  101. }
  102. })
  103. </script>
  104. @endsection