|
@@ -72,25 +72,27 @@ if (/MicroMessenger/i.test(navigator.userAgent)) { |
|
@@ -72,25 +72,27 @@ if (/MicroMessenger/i.test(navigator.userAgent)) { |
72
|
}
|
72
|
}
|
73
|
});
|
73
|
});
|
74
|
}
|
74
|
}
|
75
|
-module.exports = function(data) {
|
|
|
76
|
- shareData = data;
|
|
|
77
|
|
75
|
|
78
|
- if (qs && qs.shareId) {
|
|
|
79
|
- $.ajax({
|
|
|
80
|
- method: 'GET',
|
|
|
81
|
- url: location.protocol + '//m.yohobuy.com/activity/share',
|
|
|
82
|
- data: {
|
|
|
83
|
- shareId: qs.shareId
|
|
|
84
|
- },
|
|
|
85
|
- success: function(res) {
|
|
|
86
|
- if (res && res.code === 200 && res.data) {
|
|
|
87
|
- shareData.desc = res.data.content;
|
|
|
88
|
- shareData.imgUrl = res.data.pic;
|
|
|
89
|
- shareData.title = res.data.title;
|
|
|
90
|
- }
|
76
|
+if (qs && qs.shareId) {
|
|
|
77
|
+ $.ajax({
|
|
|
78
|
+ method: 'GET',
|
|
|
79
|
+ url: location.protocol + '//m.yohobuy.com/activity/share',
|
|
|
80
|
+ data: {
|
|
|
81
|
+ shareId: qs.shareId
|
|
|
82
|
+ },
|
|
|
83
|
+ dataType: 'jsonp',
|
|
|
84
|
+ success: function(res) {
|
|
|
85
|
+ if (res && res.code === 200 && res.data) {
|
|
|
86
|
+ shareData.desc = res.data.content;
|
|
|
87
|
+ shareData.imgUrl = res.data.pic;
|
|
|
88
|
+ shareData.title = res.data.title;
|
91
|
}
|
89
|
}
|
92
|
- });
|
|
|
93
|
- }
|
90
|
+ }
|
|
|
91
|
+ });
|
|
|
92
|
+}
|
|
|
93
|
+
|
|
|
94
|
+module.exports = function(data) {
|
|
|
95
|
+ shareData = data;
|
94
|
|
96
|
|
95
|
if (window.wx) {
|
97
|
if (window.wx) {
|
96
|
window.wx.onMenuShareAppMessage(shareData);
|
98
|
window.wx.onMenuShareAppMessage(shareData);
|