html_health_end.blade.php 6.0 KB

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