restaurant.blade.php 13 KB

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