...
|
...
|
@@ -82,42 +82,45 @@ |
|
|
<?php $this->_endblock();?>
|
|
|
<?php $this->_block('js');?>
|
|
|
<script type="text/javascript">
|
|
|
var shareData = {
|
|
|
title: $('.detail-title').find('.title'),
|
|
|
desc: '',
|
|
|
imgUrl: $(".share").attr("cover-url"),
|
|
|
link: $(".share").attr("data-link")
|
|
|
};
|
|
|
var wechatAppId = $(".share").attr("wechatAppId"),
|
|
|
wechatTimestamp = $(".share").attr("wechatTimestamp"),
|
|
|
wechatNonceStr = $(".share").attr("wechatNonceStr"),
|
|
|
wechatSignature = $(".share").attr("wechatSignature");
|
|
|
wx.config({
|
|
|
debug: true,
|
|
|
appId: wechatAppId,
|
|
|
timestamp: wechatTimestamp,
|
|
|
nonceStr: wechatNonceStr,
|
|
|
signature: wechatSignature,
|
|
|
jsApiList: ['checkJsApi','onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ',
|
|
|
'onMenuShareWeibo','hideMenuItems','showMenuItems','hideAllNonBaseMenuItem','showAllNonBaseMenuItem',
|
|
|
'translateVoice','startRecord','stopRecord','onRecordEnd','playVoice','pauseVoice','stopVoice',
|
|
|
'uploadVoice','downloadVoice','chooseImage','previewImage','uploadImage','downloadImage',
|
|
|
'getNetworkType','openLocation','getLocation','hideOptionMenu','showOptionMenu','closeWindow',
|
|
|
'scanQRCode','chooseWXPay','openProductSpecificView','addCard','chooseCard','openCard'
|
|
|
]
|
|
|
});
|
|
|
wx.ready(function () {
|
|
|
// 2.1 “分享给朋友”
|
|
|
wx.onMenuShareAppMessage(shareData);
|
|
|
// 2.2 “分享到朋友圈”
|
|
|
wx.onMenuShareTimeline(shareData);
|
|
|
// 2.3 “分享到QQ”
|
|
|
wx.onMenuShareQQ(shareData);
|
|
|
// 2.4 “分享到微博”
|
|
|
wx.onMenuShareWeibo(shareData);
|
|
|
});
|
|
|
wx.error(function (res) {
|
|
|
alert(res.errMsg);
|
|
|
});
|
|
|
seajs.use(['jquery', 'mobile'],function($, mobile) {
|
|
|
mobile.detail();
|
|
|
var shareData = {
|
|
|
title: $('.detail-title').find('.title'),
|
|
|
desc: '',
|
|
|
imgUrl: $(".share").attr("cover-url"),
|
|
|
link: $(".share").attr("data-link")
|
|
|
};
|
|
|
var wechatAppId = $(".share").attr("wechatAppId"),
|
|
|
wechatTimestamp = $(".share").attr("wechatTimestamp"),
|
|
|
wechatNonceStr = $(".share").attr("wechatNonceStr"),
|
|
|
wechatSignature = $(".share").attr("wechatSignature");
|
|
|
wx.config({
|
|
|
debug: false,
|
|
|
appId: wechatAppId,
|
|
|
timestamp: wechatTimestamp,
|
|
|
nonceStr: wechatNonceStr,
|
|
|
signature: wechatSignature,
|
|
|
jsApiList: ['checkJsApi','onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ',
|
|
|
'onMenuShareWeibo','hideMenuItems','showMenuItems','hideAllNonBaseMenuItem','showAllNonBaseMenuItem',
|
|
|
'translateVoice','startRecord','stopRecord','onRecordEnd','playVoice','pauseVoice','stopVoice',
|
|
|
'uploadVoice','downloadVoice','chooseImage','previewImage','uploadImage','downloadImage',
|
|
|
'getNetworkType','openLocation','getLocation','hideOptionMenu','showOptionMenu','closeWindow',
|
|
|
'scanQRCode','chooseWXPay','openProductSpecificView','addCard','chooseCard','openCard'
|
|
|
]
|
|
|
});
|
|
|
wx.ready(function () {
|
|
|
// 2.1 “分享给朋友”
|
|
|
wx.onMenuShareAppMessage(shareData);
|
|
|
// 2.2 “分享到朋友圈”
|
|
|
wx.onMenuShareTimeline(shareData);
|
|
|
// 2.3 “分享到QQ”
|
|
|
wx.onMenuShareQQ(shareData);
|
|
|
// 2.4 “分享到微博”
|
|
|
wx.onMenuShareWeibo(shareData);
|
|
|
});
|
|
|
});
|
|
|
</script>
|
|
|
<?php $this->_endblock();?> |
...
|
...
|
|