Authored by whb

test wechat

... ... @@ -44,6 +44,7 @@
</div>
<div class="overlay"></div>
</div>
<script type="text/javascript" charset="utf-8" src="http://staticzine.myoho.net/download/jquery.min.js?v=20150429"></script>
<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<?php $this->_js('index.js', array(
SITE_JS . '/lib/seajs.js'
... ...
... ... @@ -82,27 +82,25 @@
<?php $this->_endblock();?>
<?php $this->_block('js');?>
<script type="text/javascript">
seajs.use(['jquery', 'mobile'],function($, mobile) {
mobile.detail();
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 () {
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 () {
wx.onMenuShareAppMessage({
title: '互联网之子',
desc: '在长大的过程中,我才慢慢发现,我身边的所有事,别人跟我说的所有事,那些所谓本来如此,注定如此的事,它们其实没有非得如此,事情是可以改变的。更重要的是,有些事既然错了,那就该做出改变。',
... ... @@ -123,10 +121,13 @@
}
});
alert('aaa');
});
});
wx.error(function (res) {
alert(res.errMsg);
});
});
seajs.use(['jquery', 'mobile'],function($, mobile) {
mobile.detail();
var shareData = {
title: $('.detail-title').find('.title'),
desc: '123123',
... ...