linwu 2 lat temu
rodzic
commit
3d34358183

+ 7 - 1
public/themes/default/views/mobile/module/section/html_end.blade.php

@@ -97,7 +97,13 @@
             signature: "{{$wechat->get('signature')}}",// 必填,签名,见附录1
             jsApiList: ['updateAppMessageShareData','updateTimelineShareData','openLocation'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
         });
-
+    wx.checkJsApi({
+        jsApiList: ['updateAppMessageShareData','updateTimelineShareData','openLocation'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
+        success: function(res) {
+            // 以键值对的形式返回,可用的api值true,不可用为false
+            // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
+        }
+    });
         wx.ready(function () {
             wx.updateAppMessageShareData({
                 title: '{{empty($share_title) ? '聚才网' : $share_title}}', // 分享标题

+ 1 - 3
public/themes/default/views/mobile/module/section/html_start.blade.php

@@ -24,7 +24,6 @@
     <meta name="description" content="{{subsite_config('aix.system.site.site.site_description')}}"/>
     <meta name="author" content="招聘通"/>
     <meta name="copyright" content="jsaix.com"/>
-    <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *;script-src * 'unsafe-inline'">
 	<link rel="shortcut icon" href="/favicon.ico">
     <link href="{{ theme_asset('mobile/css/common.css') }}" rel="stylesheet">
     <link href="{{ theme_asset('mobile/css/new_common.css') }}" rel="stylesheet">
@@ -33,8 +32,7 @@
     <script type="text/javascript" src="{{theme_asset('mobile/js/rem.js')}}"></script>
     <script type="text/javascript" src="{{theme_asset('mobile/js/zepto.min.js')}}"></script>
     <script type="text/javascript" src="{{theme_asset('mobile/js/htmlspecialchars.js')}}"></script>
-    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
-    {{--<script type="text/javascript" src="{{theme_asset('mobile/js/wechat.js')}}"></script>--}}
+    <script type="text/javascript" src="{{theme_asset('mobile/js/wechat.js')}}"></script>
     @stack('js')
 </head>
 <body>