html_health_end.blade.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <img src="/themes/default/assets/mobile/images/health/customer_service.png" style="position:fixed;right:20px;bottom:20px;width: 50px;height: 50px;">
  2. </body>
  3. <script src="{{theme_asset('mobile/js/fastclick.js')}}"></script>
  4. <script src="{{theme_asset('mobile/js/qsToast.js')}}"></script>
  5. <script src="{{theme_asset('mobile/js/QSpopout.js')}}"></script>
  6. <script src="{{theme_asset('mobile/js/QSfilter.js')}}"></script>
  7. <script src="{{theme_asset('mobile/js/scrollTo.js')}}"></script>
  8. <script>
  9. window.addEventListener( "load", function() {
  10. FastClick.attach(document.body);
  11. }, false );
  12. </script>
  13. <script>
  14. $('a[href]').click(function(){
  15. var f = $(this).attr('href');
  16. var reg = /\#(\w+)/;
  17. if(reg.test(f)) {
  18. if (!$(this).data('nm')) {
  19. return !1;
  20. }
  21. }
  22. });
  23. $('.js-back').on('click', function () {
  24. var href = $(this).data('href');
  25. if (!href) {
  26. history.back();
  27. } else {
  28. location.href = href;
  29. }
  30. });
  31. $('.rbtn').on('click', function() {
  32. forCloseNav();
  33. })
  34. $('.t-mask').on('click', function () {
  35. forCloseNav();
  36. })
  37. $('.h-navclose').on('click', function () {
  38. forCloseNav();
  39. })
  40. function forCloseNav() {
  41. if ($('.topnavshow').hasClass('qs-actionsheet-toggle')) {
  42. $('.t-mask').hide();
  43. $('.topnavshow').removeClass('qs-actionsheet-toggle');
  44. } else {
  45. $('.t-mask').show();
  46. $('.topnavshow').addClass('qs-actionsheet-toggle');
  47. }
  48. }
  49. /**
  50. * 监听鼠标
  51. */
  52. if ('ontouchstart' in window) {
  53. $.EVENT_START = 'touchstart';
  54. $.EVENT_END = 'touchend';
  55. } else {
  56. $.EVENT_START = 'mousedown';
  57. $.EVENT_END = 'mouseup';
  58. }
  59. $('.plist-txt, .qs-btn, .for-event').on($.EVENT_START, function() {
  60. $(this).addClass('eventactive');
  61. })
  62. $('.plist-txt, .qs-btn, .for-event').on($.EVENT_END, function() {
  63. $(this).removeClass('eventactive');
  64. })
  65. $('.logout').on('click', function () {
  66. var dialog = new QSpopout();
  67. dialog.setContent('确定退出吗?');
  68. forCloseNav();
  69. dialog.show();
  70. dialog.getPrimaryBtn().on('click', function () {
  71. @if(strpos(\Illuminate\Support\Facades\Request::getRequestUri(),'/jkq') === 0)
  72. window.location.href = "{{route('jkq.mobile.logout')}}";
  73. @else
  74. window.location.href = "{{route('mobile.logout')}}";
  75. @endif
  76. });
  77. });
  78. // 处理select
  79. $('select').on('change', function () {
  80. $(this).prev().text($(this).find('option').not(function(){ return !this.selected }).text());
  81. })
  82. $('select').each(function () {
  83. $(this).prev().text($(this).find('option').not(function(){ return !this.selected }).text());
  84. })
  85. @php
  86. $wechat = App\Wechat\WechatParam::instance();
  87. @endphp
  88. @if(!empty($wechat->get('signature')))
  89. wx.config({
  90. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  91. appId: "{{$wechat->get('appid')}}", // 必填,公众号的唯一标识
  92. timestamp: "{{$wechat->get('timestamp')}}", // 必填,生成签名的时间戳
  93. nonceStr: "{{$wechat->get('nonceStr')}}", // 必填,生成签名的随机串
  94. signature: "{{$wechat->get('signature')}}",// 必填,签名,见附录1
  95. jsApiList: ['updateAppMessageShareData','updateTimelineShareData','openLocation'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
  96. });
  97. wx.checkJsApi({
  98. jsApiList: ['updateAppMessageShareData','updateTimelineShareData','openLocation'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
  99. success: function(res) {
  100. console.log(res);
  101. // 以键值对的形式返回,可用的api值true,不可用为false
  102. // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
  103. }
  104. });
  105. wx.ready(function () {
  106. wx.updateAppMessageShareData({
  107. title: '{{empty($share_title) ? '聚才网' : $share_title}}', // 分享标题
  108. desc: '{{empty($share_desc) ? '' : $share_desc}}', // 分享描述
  109. link: '{{empty($share_link) ? Illuminate\Support\Facades\Request::url() : $share_link}}', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
  110. imgUrl: '{{empty($share_image_url) ? theme_asset('mobile/images/rcg.png') : $share_image_url}}', // 分享图标
  111. success: function () {
  112. // 用户确认分享后执行的回调函数
  113. if (typeof wx_share_callback === 'function') {
  114. wx_share_callback('message');
  115. }
  116. }
  117. });
  118. wx.updateTimelineShareData({
  119. title: '{{empty($share_title) ? '聚才网' : $share_title}}', // 分享标题
  120. link: '{{empty($share_link) ? Illuminate\Support\Facades\Request::url() : $share_link}}', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
  121. imgUrl: '{{empty($share_image_url) ? theme_asset('mobile/images/rcg.png') : $share_image_url}}', // 分享图标
  122. success: function () {
  123. // 用户确认分享后执行的回调函数
  124. if (typeof wx_share_callback === 'function') {
  125. wx_share_callback('message');
  126. }
  127. }
  128. })
  129. });
  130. @endif
  131. </script>
  132. @yield('script')
  133. </html>