restaurant.blade.php 13 KB

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