3,143
社区成员
发帖
与我相关
我的任务
分享
wx.ready(function(){
wx.hideOptionMenu();
//shareTo
document.getElementById("shareTo").onclick = function(){
wx.onMenuShareAppMessage({
title: '分享标题',
desc: '分享描述',
link: 'http://www.xxx.com/goods/item.php?id=2',
imgUrl: 'http://www.xxx.com/images/favicon.png',
type: '',
dataUrl: '',
success: function () {alert("ok"); },
cancel: function () { alert("cancel"); },
fail: function (res){ alert(res); }
});
/*
wx.onMenuShareTimeline({
title: '分享标题',
link: 'http://www.xxx.com/',
imgUrl: 'http://www.xxx.com/images/favicon.png',
success: function () {alert("ok"); },
cancel: function () { alert("cancel"); },
fail: function (res){ alert(res); }
});
*/
alert("s1");
}
//
});