正在显示
2 个修改的文件
包含
11 行增加
和
3 行删除
@@ -140,6 +140,14 @@ class SalesmangoodsController extends WeChatBaseController{ | @@ -140,6 +140,14 @@ class SalesmangoodsController extends WeChatBaseController{ | ||
140 | return false; | 140 | return false; |
141 | } | 141 | } |
142 | }else{ | 142 | }else{ |
143 | + | ||
144 | + $options=config('wechat_config'); | ||
145 | + $app = new Application($options); | ||
146 | + | ||
147 | + $js = $app->js; | ||
148 | + $jssdk=$js->config(array('onMenuShareAppMessage', 'onMenuShareTimeline','onMenuShareQQ'), false,false,true); | ||
149 | + $this->assign('jssdk',$jssdk); | ||
150 | + | ||
143 | return $this -> fetch(); | 151 | return $this -> fetch(); |
144 | } | 152 | } |
145 | 153 |
@@ -293,8 +293,8 @@ | @@ -293,8 +293,8 @@ | ||
293 | <script> | 293 | <script> |
294 | 294 | ||
295 | function openCamera(){ | 295 | function openCamera(){ |
296 | - | ||
297 | - $.post("{:url('Salesmangoods/getSignPackage')}",{},function (data) { | 296 | + wx.config({$jssdk}); |
297 | + /* $.post("{:url('Salesmangoods/getSignPackage')}",{},function (data) { | ||
298 | data = JSON.parse(data); | 298 | data = JSON.parse(data); |
299 | wx.config({ | 299 | wx.config({ |
300 | debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,测试完成后需要关闭。 | 300 | debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,测试完成后需要关闭。 |
@@ -304,7 +304,7 @@ | @@ -304,7 +304,7 @@ | ||
304 | signature: data.signature,// 必填,签名(加密后,下文有实现) | 304 | signature: data.signature,// 必填,签名(加密后,下文有实现) |
305 | jsApiList: ['chooseImage'] // 必填,需要使用的JS接口列表,开发文档上有所有接口名称,根据需要选用就好。 | 305 | jsApiList: ['chooseImage'] // 必填,需要使用的JS接口列表,开发文档上有所有接口名称,根据需要选用就好。 |
306 | }); | 306 | }); |
307 | - }); | 307 | + });*/ |
308 | 308 | ||
309 | wx.chooseImage({ | 309 | wx.chooseImage({ |
310 | count: 1, // 默认9 | 310 | count: 1, // 默认9 |
-
请 注册 或 登录 后发表评论