spring.blade.php 16 KB

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