online_recruit.blade.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. @extends('module.layouts.content')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
  6. <link href="{{theme_asset('app/css/jobfair/online_recruit.css')}}" rel="stylesheet"/>
  7. <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/company/company_ajax_dialog.css')}}"/>
  8. <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/common_ajax_dialog.css')}}"/>
  9. <link href="{{theme_asset('app/css/jobs/jobs.css')}}" rel="stylesheet"/>
  10. <style>
  11. .com-res-group {background:white;}
  12. .header{height: 400px;background: url({{theme_asset('app/images/jkq/index_search.jpg')}});width: 100%;}
  13. .header img {width: 1200px;margin: 0 auto;display:block;}
  14. .com-se-line {position:relative;z-index:100;}
  15. </style>
  16. @endpush
  17. @push('js')
  18. <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak={{ subsite_config('aix.system.map.map.map_ak') }}&s=1"></script>
  19. @endpush
  20. @section('content')
  21. <img src="{{theme_asset('app/images/jkq/header_online_recruit.png')}}" style="display:block;width:100%;">
  22. <div class="newjobfair">
  23. <div class="com-se-filter" style="margin-top:0;">
  24. <div class="com-se-line J_trade">
  25. <div class="csl-left">行业类别</div>
  26. <div class="csl-right">
  27. @if($categories['AIX_trade'])
  28. <div onclick="javascript:location.href='{{route("active.jobfair.online_recruit",array_merge($params, array("trade"=>"")))}}'" data-code="0" title="不限" class="csl-cell @if(array_get($params,'trade')=='') select @endif">不限</div>
  29. @foreach($categories['AIX_trade'] as $k=>$v)
  30. <div onclick="javascript:location.href='{{route("active.jobfair.online_recruit",array_merge($params, array("trade"=>$v["id"])))}}'" data-code="{{$v['id']}}" title="{{$v['demand']}}" class="csl-cell @if(array_get($params,'trade')==$v['id']) select @endif">
  31. {{$v['demand']}}
  32. </div>
  33. @endforeach
  34. @endif
  35. <div class="clear"></div>
  36. </div>
  37. <div class="more">
  38. <div class="J_showTrade mbtn close">展开</div>
  39. <script type="text/javascript">
  40. $('.J_trade .csl-cell').each(function(index, el) {
  41. if (index > 15) {
  42. $(this).addClass('for_up');
  43. }
  44. })
  45. var selectIndex = $('.J_trade .csl-cell').index($('.J_trade .csl-cell.select'));
  46. if (selectIndex > 15) {
  47. $('.J_showTrade').removeClass('close');
  48. $('.J_showTrade').text('收起');
  49. $('.for_up').show();
  50. }
  51. $('.J_showTrade').off().on('click', function(event) {
  52. if ($(this).hasClass('close')) {
  53. $(this).removeClass('close');
  54. $(this).text('收起');
  55. $('.for_up').show();
  56. } else {
  57. $(this).addClass('close');
  58. $(this).text('展开');
  59. $('.for_up').hide();
  60. }
  61. })
  62. </script>
  63. </div>
  64. <div class="clear"></div>
  65. </div>
  66. </div>
  67. <div class="com-res-group">
  68. {{--过滤条件--}}
  69. @if($params)
  70. <div class="selected J_selected">
  71. <div class="stit">已选条件</div>
  72. <div class="sc">
  73. {{--行业类别--}}
  74. @if(array_get($params, 'trade'))
  75. <div class="slist" onclick="javascript:location.href='{{route("active.jobfair.online_recruit",array_merge($params, array("trade"=>"")))}}'">
  76. <span>企业性质:</span>
  77. {{$categories['AIX_trade'][$params['trade']]['demand']}}
  78. </div>
  79. @endif
  80. </div>
  81. <div class="sr">
  82. <div class="empty" onclick="javascript:location.href='{{route("active.jobfair.online_recruit")}}'">清空</div>
  83. </div>
  84. <div class="clear"></div>
  85. </div>
  86. @endif
  87. </div>
  88. <div class="jobfair_detail_show">
  89. <div class="tabs_show">
  90. <div class="tabs_show_item" id="join_com" style="display: block">
  91. @if(count($res))
  92. <div class="load_more_body">
  93. @foreach($res as $key=>$val)
  94. <div class="online2021_content">
  95. <div class="content_box">
  96. <h3 class="substring">{{ $val['companyname'] or '' }}</h3>
  97. <p class="online2021_line">
  98. <span class="line_left line_title">招聘岗位</span>
  99. <span class="line_right more"><a href="{{route('jobs.company',['id'=>$val['id']])}}">更多>></a></span>
  100. </p>
  101. @for($i=0;$i<3;$i++)
  102. <p class="online2021_line">
  103. <span class="line_left">{{empty($val['jobs'][$i]) ? '' : $val['jobs'][$i]['jobs_name']}}</span>
  104. <span class="line_right">
  105. @if(!empty($val['jobs'][$i]))
  106. @if($val['jobs'][$i]['wage'] == '-1')
  107. 面议
  108. @else
  109. ¥{{$val['jobs'][$i]['wage_min']}}-{{$val['jobs'][$i]['wage_max']}}
  110. @endif
  111. @endif
  112. </span>
  113. </p>
  114. @endfor
  115. <p class="online2021_line end">
  116. @foreach($val['tag_arr'] as $tag)
  117. <span class="tag">{{$tag->demand}}</span>
  118. @endforeach
  119. </p>
  120. <a href="{{route('jobs.company',['id'=>$val['id']])}}" class="button-a">
  121. <div class="btn">
  122. <img src="{{theme_asset('mobile/images/online2021/bg_btn.png')}}" />
  123. 投递简历
  124. </div>
  125. </a>
  126. </div>
  127. </div>
  128. @endforeach
  129. </div>
  130. @endif
  131. @if($more)
  132. <div class="load_more_footer">
  133. <span page="1" >加载更多</span>
  134. </div>
  135. @else
  136. <div class="load_more_footer">
  137. <span page="1" >-----没有更多了-----</span>
  138. </div>
  139. @endif
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. @endsection
  145. @section('script')
  146. <script type="text/javascript" src="{{theme_asset('app/js/jquery.jobslist.js')}}"></script>
  147. <script type="text/javascript" src="{{theme_asset('app/js/jquery.highlight-3.js')}}"></script>
  148. <script type="text/javascript" src="{{theme_asset('app/js/jquery.autocomplete.js')}}"></script>
  149. <script>
  150. $(function(){
  151. // 搜索类型切换
  152. $('.J_sli_jc').click(function() {
  153. $(this).addClass('select').siblings().removeClass('select');
  154. var indexValue = $('.J_sli_jc').index(this);
  155. var typeValue = $.trim($(this).data('type'));
  156. if (typeValue == 'company') {
  157. $('#ajax_search_location').attr('action', "{{route('jobs.companyList', array('list_type'=>'AIX_companylist'))}}");
  158. $('#company_hotword').show();
  159. $('#job_hotword').hide();
  160. $.getJSON("{{route('list.type')}}",{action:'hotword',type:2});
  161. } else {
  162. $('#ajax_search_location').attr('action', "{{route('jobs', array('list_type'=>'AIX_jobslist'))}}");
  163. $('#job_hotword').show();
  164. $('#company_hotword').hide();
  165. $.getJSON("{{route('list.type')}}",{action:'hotword',type:1});
  166. }
  167. $('input[name="search_type"]').val(typeValue);
  168. });
  169. $('.com-sel-line').eq($('.com-sel-line').length-1).addClass('last');
  170. if ($('.J_selected .slist').length) {
  171. $('.J_selected').show();
  172. }
  173. });
  174. var filter = {
  175. expr: function(o){
  176. var cls = this.replace(o.item || ".wf_element"),
  177. leftCls = this.replace(o.leftItem || ".wf_temp"),
  178. rightCls = this.replace(o.rightItem || ".wf_rank");
  179. $.extend($.expr[':'],{
  180. node:function(a){
  181. return $(a).hasClass(cls);
  182. },
  183. leftNode: function(a){
  184. return $(a).hasClass(leftCls);
  185. },
  186. rightNode: function(a){
  187. return $(a).hasClass(rightCls);
  188. }
  189. });
  190. },
  191. replace: function(cls){
  192. var regExp = /[.#]/g,
  193. whitespace = /\s/g;
  194. if(whitespace.test(cls)){
  195. cls = cls.split(' ')[0];
  196. }
  197. return cls.replace(regExp, '');
  198. }
  199. }
  200. function Waterfall(o){
  201. this.target = o.target || $('#waterfall_main');
  202. this.targetItem = o.targetItem || '.wf_box';
  203. this.colWidth = o.colWidth || 0;
  204. this.colCount = o.colCount || 4;
  205. filter.expr(o);
  206. this.init();
  207. }
  208. Waterfall.prototype = {
  209. init:function(){
  210. var self = this,
  211. col = [],
  212. nodes = self.target.find(":node"),
  213. leftNodes = self.target.find(":leftNode"),
  214. rightNodes = self.target.find(":rightNode"),
  215. nodeLen = nodes.length,
  216. leftLen = leftNodes.length,
  217. rightLen = rightNodes.length;
  218. for(var i = 0; i < self.colCount; i++){
  219. col[i] = 0;
  220. if(i == 0 && leftLen){
  221. for(var j = 0; j < leftLen; j++){
  222. col[i] += leftNodes.eq(j).outerHeight(true);
  223. }
  224. }
  225. if(i == self.colCount - 1 && rightLen){
  226. for(var j = 0; j < rightLen; j++){
  227. col[i] += rightNodes.eq(j).outerHeight(true);
  228. }
  229. }
  230. }
  231. nodes.each(function(){
  232. this.h = $(this).outerHeight(true);
  233. if($(this).hasClass(filter.replace(self.targetItem))){
  234. var ming = self.getMinCol(col);
  235. $(this).css({"left": ming * self.colWidth, "top": col[ming]});
  236. col[ming] += this.h;
  237. }
  238. });
  239. self.target.css('height', self.maxHeight(col));
  240. },
  241. setColWidth:function(wid){
  242. this.colWidth = wid;
  243. },
  244. setColCount:function(col){
  245. this.colCount = col;
  246. },
  247. maxHeight:function(arr){
  248. var len = arr.length,temp = arr[0];
  249. for(var i= 1; i < len; i++){
  250. if(temp < arr[i]){
  251. temp = arr[i];
  252. }
  253. }
  254. return temp;
  255. },
  256. getMinCol:function(arr){
  257. var ca = arr,cl = ca.length,temp = ca[0],minc = 0;
  258. for(var ci = 0; ci < cl; ci++){
  259. if(temp > ca[ci]){
  260. temp = ca[ci];
  261. minc = ci;
  262. }
  263. }
  264. return minc;
  265. }
  266. };
  267. var content = $('#waterfall_main');
  268. var item = content.find('.wf_element'),
  269. itemWidth = item.outerWidth(),/*取瀑布流元素宽*/
  270. contentWidth = 1162, /*取容器宽*/
  271. list_sum = parseInt(contentWidth / itemWidth),
  272. list_sum_margin = list_sum - 1, /*取元素间距的值*/
  273. left = (contentWidth - itemWidth * list_sum) / list_sum_margin;
  274. if(itemWidth * list_sum > contentWidth){
  275. list_sum -= 1;
  276. left = contentWidth - itemWidth * list_sum;
  277. }
  278. var colWidth = itemWidth + left;
  279. var waterfall = new Waterfall({
  280. //设定列宽度
  281. "colWidth": colWidth,
  282. //设定显示列数
  283. "colCount": 2
  284. });
  285. content.on('mouseenter', '.wf_box', function(){
  286. $(this).addClass('wf_hov');
  287. }).on('mouseleave', '.wf_box', function(){
  288. $(this).removeClass('wf_hov');
  289. });
  290. @if($more)
  291. /**
  292. * 监听网页滚动事件
  293. */
  294. var f = true;
  295. $(window).on("scroll",function () {
  296. var isShow = $("#join_com").is(":visible");
  297. if($(".load_more_footer span").hasClass("end")){
  298. return false;
  299. }
  300. var h = document.documentElement.clientHeight || document.body.clientHeight;
  301. var sh = document.documentElement.scrollTop || document.body.scrollTop;
  302. var t1 = document.querySelector(".load_more_footer").offsetTop- sh;
  303. //可视区域
  304. if (t1 < h && isShow && f ) {
  305. s();
  306. }
  307. });
  308. var s = function () {
  309. var page = $(".load_more_footer span").attr('page');
  310. @if (array_has($params, 'citycategory'))
  311. var city = '{{array_get($params, 'citycategory')}}';
  312. @else
  313. var city = ''
  314. @endif
  315. @if (array_has($params, 'trade'))
  316. var trade = '{{array_get($params, 'trade')}}';
  317. @else
  318. var trade = ''
  319. @endif
  320. $.ajax({
  321. type:"get",
  322. url:"{{ route('active.jobfair.online_recruit') }}",
  323. data:{
  324. page:page,
  325. citycategory:city,
  326. trade:trade
  327. },
  328. beforeSend:function () {
  329. f = false;
  330. $(".load_more_footer span").html('正在加载').addClass("loading");
  331. },
  332. success:function (result) {
  333. if(result.status==1){
  334. $(".load_more_body").append(result.data);
  335. $(".load_more_footer span").attr('page',parseInt(page)+1);
  336. $(".load_more_footer span").html('加载更多').removeClass("loading");
  337. waterfall.init();
  338. }else {
  339. $(".load_more_footer span").html('-----没有更多了-----').removeClass("loading").addClass("end");
  340. }
  341. },
  342. complete:function () {
  343. f = true;
  344. }
  345. })
  346. }
  347. @endif
  348. </script>
  349. @endsection