mainFooter.blade.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {{--<footer class="main-footer">--}}
  2. {{--<div class="pull-right hidden-xs">--}}
  3. {{--Yun Shop--}}
  4. {{--</div>--}}
  5. {{--<strong>Copyright &copy; 2017 {{\Config::get('module.name')}}.</strong> All rights reserved.--}}
  6. {{--</footer>--}}
  7. <!-- Core JS Files -->
  8. {{--<script src="{{static_url('yunshop/dist/js/common.js')}}../assets/js/jquery-3.2.1.min.js" type="text/javascript"></script>--}}
  9. <!-- Material Dashboard DEMO methods, don't include it in your project! -->
  10. <!--<script src="{{static_url('assets/js/demo.js')}}"></script>
  11. <script type="text/javascript">
  12. $(document).ready(function() {
  13. // Javascript method's body can be found in assets/js/demos.js
  14. demo.initDashboardPageCharts();
  15. });
  16. </script>-->
  17. <script type="text/javascript">
  18. require(['bootstrap'],function(){
  19. });
  20. </script>
  21. @if(YunShop::app()->role == 'founder' && config('app.env') == 'production')
  22. <script type="text/javascript">
  23. var checkUrl = "{!! yzWebUrl('update.check') !!}";
  24. var todoUrl = "{!! yzWebUrl('update.index') !!}";
  25. var pirateUrl = "{!! yzWebFullUrl('update.pirate') !!}";
  26. function check_yun_shop_upgrade() {
  27. require(['util'], function (util) {
  28. if (util.cookie.get('check_yun_shop_upgrade')) {
  29. return;
  30. }
  31. $.post(checkUrl, function (result) {
  32. if (-1 == result.updated) {
  33. window.location.href = pirateUrl;
  34. }
  35. if (result && result.updated != '0') {
  36. var html = '<div class="container" id="check_yun_shop_upgrade" style=" position: fixed;margin: auto;bottom: 0px;z-index: 999;">\
  37. <div class="row">\
  38. <div class="alert alert-danger">\
  39. <button type="button" class="close" data-dismiss="alert" onclick="check_yun_shop_upgrade_hide()" aria-hidden="true">×</button>\
  40. <h4><i class="icon fa fa-check"></i> 系统更新提示</h4>\
  41. 商城检测到新版本:' + result.last_version + ' 请<a href="' + todoUrl + '"> 点击这里 </a> 更新到最新版本 \
  42. </div>\
  43. </div>\
  44. </div>';
  45. $('.main-footer').append(html);
  46. }
  47. });
  48. });
  49. }
  50. function check_yun_shop_upgrade_hide() {
  51. require(['util'], function (util) {
  52. util.cookie.set('check_yun_shop_upgrade', 1, 3600);
  53. $('#check_yun_shop_upgrade').remove();
  54. });
  55. }
  56. $(function () {
  57. //check_yun_shop_upgrade();
  58. });
  59. </script>
  60. @endif