...
|
...
|
@@ -72,25 +72,27 @@ if (/MicroMessenger/i.test(navigator.userAgent)) { |
|
|
}
|
|
|
});
|
|
|
}
|
|
|
module.exports = function(data) {
|
|
|
shareData = data;
|
|
|
|
|
|
if (qs && qs.shareId) {
|
|
|
$.ajax({
|
|
|
method: 'GET',
|
|
|
url: location.protocol + '//m.yohobuy.com/activity/share',
|
|
|
data: {
|
|
|
shareId: qs.shareId
|
|
|
},
|
|
|
success: function(res) {
|
|
|
if (res && res.code === 200 && res.data) {
|
|
|
shareData.desc = res.data.content;
|
|
|
shareData.imgUrl = res.data.pic;
|
|
|
shareData.title = res.data.title;
|
|
|
}
|
|
|
if (qs && qs.shareId) {
|
|
|
$.ajax({
|
|
|
method: 'GET',
|
|
|
url: location.protocol + '//m.yohobuy.com/activity/share',
|
|
|
data: {
|
|
|
shareId: qs.shareId
|
|
|
},
|
|
|
dataType: 'jsonp',
|
|
|
success: function(res) {
|
|
|
if (res && res.code === 200 && res.data) {
|
|
|
shareData.desc = res.data.content;
|
|
|
shareData.imgUrl = res.data.pic;
|
|
|
shareData.title = res.data.title;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
module.exports = function(data) {
|
|
|
shareData = data;
|
|
|
|
|
|
if (window.wx) {
|
|
|
window.wx.onMenuShareAppMessage(shareData);
|
...
|
...
|
|