123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- </body>
- <script src="{{theme_asset('mobile/js/fastclick.js')}}"></script>
- <script src="{{theme_asset('mobile/js/qsToast.js')}}"></script>
- <script src="{{theme_asset('mobile/js/QSpopout.js')}}"></script>
- <script src="{{theme_asset('mobile/js/QSfilter.js')}}"></script>
- <script src="{{theme_asset('mobile/js/scrollTo.js')}}"></script>
- <script>
- window.addEventListener( "load", function() {
- FastClick.attach(document.body);
- }, false );
- </script>
- <script>
- $('a[href]').click(function(){
- var f = $(this).attr('href');
- var reg = /\#(\w+)/;
- if(reg.test(f)) {
- if (!$(this).data('nm')) {
- return !1;
- }
- }
- });
- $('.js-back').on('click', function () {
- var href = $(this).data('href');
- if (!href) {
- history.back();
- } else {
- location.href = href;
- }
- });
- $('.rbtn').on('click', function() {
- forCloseNav();
- })
- $('.t-mask').on('click', function () {
- forCloseNav();
- })
- $('.h-navclose').on('click', function () {
- forCloseNav();
- })
- function forCloseNav() {
- if ($('.topnavshow').hasClass('qs-actionsheet-toggle')) {
- $('.t-mask').hide();
- $('.topnavshow').removeClass('qs-actionsheet-toggle');
- } else {
- $('.t-mask').show();
- $('.topnavshow').addClass('qs-actionsheet-toggle');
- }
- }
- /**
- * 监听鼠标
- */
- if ('ontouchstart' in window) {
- $.EVENT_START = 'touchstart';
- $.EVENT_END = 'touchend';
- } else {
- $.EVENT_START = 'mousedown';
- $.EVENT_END = 'mouseup';
- }
- $('.plist-txt, .qs-btn, .for-event').on($.EVENT_START, function() {
- $(this).addClass('eventactive');
- })
- $('.plist-txt, .qs-btn, .for-event').on($.EVENT_END, function() {
- $(this).removeClass('eventactive');
- })
- $('.logout').on('click', function () {
- var dialog = new QSpopout();
- dialog.setContent('确定退出吗?');
- forCloseNav();
- dialog.show();
- dialog.getPrimaryBtn().on('click', function () {
- @if(strpos(\Illuminate\Support\Facades\Request::getRequestUri(),'/jkq') === 0)
- window.location.href = "{{route('jkq.mobile.logout')}}";
- @else
- window.location.href = "{{route('mobile.logout')}}";
- @endif
- });
- });
- // 处理select
- $('select').on('change', function () {
- $(this).prev().text($(this).find('option').not(function(){ return !this.selected }).text());
- })
- $('select').each(function () {
- $(this).prev().text($(this).find('option').not(function(){ return !this.selected }).text());
- })
- @php
- $wechat = App\Wechat\WechatParam::instance();
- @endphp
- @if(!empty($wechat->get('signature')))
- wx.config({
- debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- appId: "{{$wechat->get('appid')}}", // 必填,公众号的唯一标识
- timestamp: "{{$wechat->get('timestamp')}}", // 必填,生成签名的时间戳
- nonceStr: "{{$wechat->get('nonceStr')}}", // 必填,生成签名的随机串
- signature: "{{$wechat->get('signature')}}",// 必填,签名,见附录1
- jsApiList: ['updateAppMessageShareData','updateTimelineShareData','openLocation'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
- });
- wx.checkJsApi({
- jsApiList: ['updateAppMessageShareData','updateTimelineShareData','openLocation'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
- success: function(res) {
- console.log(res);
- // 以键值对的形式返回,可用的api值true,不可用为false
- // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
- }
- });
- wx.ready(function () {
- wx.updateAppMessageShareData({
- title: '{{empty($share_title) ? '聚才网' : $share_title}}', // 分享标题
- desc: '{{empty($share_desc) ? '' : $share_desc}}', // 分享描述
- link: '{{empty($share_link) ? Illuminate\Support\Facades\Request::url() : $share_link}}', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
- imgUrl: '{{empty($share_image_url) ? theme_asset('mobile/images/rcg.png') : $share_image_url}}', // 分享图标
- success: function () {
- // 用户确认分享后执行的回调函数
- if (typeof wx_share_callback === 'function') {
- wx_share_callback('message');
- }
- }
- });
- wx.updateTimelineShareData({
- title: '{{empty($share_title) ? '聚才网' : $share_title}}', // 分享标题
- link: '{{empty($share_link) ? Illuminate\Support\Facades\Request::url() : $share_link}}', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
- imgUrl: '{{empty($share_image_url) ? theme_asset('mobile/images/rcg.png') : $share_image_url}}', // 分享图标
- success: function () {
- // 用户确认分享后执行的回调函数
- if (typeof wx_share_callback === 'function') {
- wx_share_callback('message');
- }
- }
- })
- });
- @endif
- </script>
- @yield('script')
- </html>
|