Authored by 陈轩

share in MOBILE QQ

... ... @@ -19,6 +19,23 @@ var shareData = {
imgUrl: 'http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png'
};
if (/QQ/i.test(navigator.userAgent)) {
console.log('hi')
$.ajax({
url: '//qzonestyle.gtimg.cn/qzone/qzact/common/share/share.js',
dataType: 'script',
cache: true,
success: function() {
window.setShareInfo && window.setShareInfo({
title: shareData.title,
summary: shareData.desc,
pic: shareData.imgUrl,
url: shareData.link
});
}
});
}
if (/MicroMessenger/i.test(navigator.userAgent)) {
$.ajax({
url: '//res.wx.qq.com/open/js/jweixin-1.1.0.js',
... ... @@ -63,4 +80,11 @@ module.exports = function(data) {
window.wx.onMenuShareWeibo(shareData);
window.wx.onMenuShareQZone(shareData);
}
window.setShareInfo && window.setShareInfo({
title: shareData.title,
summary: shareData.desc,
pic: shareData.imgUrl,
url: shareData.link
});
};
... ...