<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
$(function () {
wx_config();
})
function wx_config() {
wx.config({
debug: false,
appId: 'wx4320c23a89e2354a',
timestamp:'1576719758',
nonceStr: '6d0007e16e814071b36e660ba2e6f46f',
signature: '04ed3faced1714722e485e35e4ac7538fc7a891f',
jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'updateAppMessageShareData', 'updateTimelineShareData']
});
wx.ready(function () {
var title = '【競技江湖】—全新捕魚贏話費',// 分享標題
desc = '全新捕魚,約你來戰。下載贏話費,金幣滿天飛,還有更多好玩的模式快來一起開啟吧!', // 分享描述
link = 'http://www.happysai.cn/weixin/downshare.aspx',//分享鏈接
imgUrl = 'http://www.happysai.cn/weixin/images/logo2.png'; //分享圖示
wx.onMenuShareTimeline({
title: desc,
imgUrl: imgUrl,
link: link,
success: function (res) {
alert("分享成功");
},
cancel: function (res) {
alert("分享失敗");
}
});
wx.onMenuShareAppMessage({
title: title,
desc: desc,
imgUrl: imgUrl,
link: link,
success: function (res) {
alert("分享成功");
},
cancel: function (res) {
alert("分享失敗");
}
});
wx.onMenuShareQQ({
title: title,
desc: desc,
imgUrl: imgUrl,
link: link,
success: function (res) {
alert("分享成功");
},
cancel: function (res) {
alert("分享失敗");
}
});
wx.updateAppMessageShareData({
title: title,
desc: desc,
link: link,
imgUrl: imgUrl,
success: function (res) {
alert("分享成功");
},
cancel: function (res) {
alert("分享失敗");
}
})
wx.updateTimelineShareData({
title: title,
link: link,
imgUrl: imgUrl,
success: function (res) {
alert("分享成功");
},
cancel: function (res) {
alert("分享失敗");
}
})
});
}
</script>
uj5u.com熱心網友回復:
自己已解決,url地址配置的原因轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/118358.html
標籤:JavaScript
上一篇:如何在已經寫好的js視頻播放器里加入提問?例如這個視頻播完了,結尾自動跳出問題,答對了計算分的。
下一篇:MySQL筆記002(視圖)
