index.blade.php 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. @extends('mobile.module.layouts.content')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <link href="{{ theme_asset('mobile/css/common.css') }}" rel="stylesheet">
  6. <link href="{{ theme_asset('mobile/css/news.css') }}" rel="stylesheet">
  7. <style>
  8. .drop_content{padding-bottom: 1rem;}
  9. .fixed_btn{width: 90%;position: fixed;bottom: 0;left: 50%; -webkit-transform: translate(-50%,0);transform: translate(-50%,0);}
  10. </style>
  11. @endpush
  12. @push('js')
  13. <script src="{{ theme_asset('mobile/js/dropload.min.js') }}"></script>
  14. @endpush
  15. @section('content')
  16. <div class="drop_content">
  17. <div class="add_data">
  18. @include('mobile.app.recruit.ajax_recruit_list')
  19. </div>
  20. </div>
  21. @endsection
  22. @section('script')
  23. <script>
  24. $(function(){
  25. // 页数
  26. var page = 1;
  27. // dropload
  28. $('.drop_content').dropload({
  29. scrollArea : window,
  30. domUp : {
  31. domClass : 'dropload-up',
  32. domRefresh : '<div class="dropload-refresh">加载中...</div>',
  33. domUpdate : '<div class="dropload-update">加载中...</div>',
  34. domLoad : '<div class="dropload-load"><span class="loading"></span>加载中...</div>'
  35. },
  36. domDown : {
  37. domClass : 'dropload-down',
  38. domRefresh : '<div class="dropload-refresh">加载中...</div>',
  39. domLoad : '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
  40. domNoData : '<div class="dropload-noData">没有更多数据~~</div>'
  41. },
  42. //autoLoad : '{{--{{$mobile_dropload}}--}}',
  43. /*autoLoad : false,*/
  44. loadUpFn : function(me){
  45. page = 1;
  46. $.ajax({
  47. type: 'GET',
  48. url: '{{ url($current_url) }}?page='+page,
  49. dataType: 'json',
  50. success: function(result){
  51. if (result.status ==1) {
  52. $('.add_data').html(result.data);
  53. } else {
  54. me.lock();
  55. me.noData();
  56. }
  57. me.resetload();
  58. },
  59. error: function(xhr, type){
  60. me.resetload();
  61. }
  62. });
  63. },
  64. @if($mobile_dropload)
  65. loadDownFn : function(me){
  66. page++;
  67. $.ajax({
  68. type: 'GET',
  69. url: '{{ url($current_url) }}?page='+page,
  70. dataType: 'json',
  71. success: function(result){
  72. if (result.status ==1) {
  73. $('.add_data').append(result.data);
  74. } else {
  75. me.lock();
  76. me.noData();
  77. }
  78. me.resetload();
  79. },
  80. error: function(xhr, type){
  81. me.resetload();
  82. }
  83. });
  84. },
  85. @endif
  86. threshold : 50
  87. });
  88. });
  89. </script>
  90. @endsection