Showing
1 changed file
with
21 additions
and
22 deletions
@@ -103,33 +103,32 @@ | @@ -103,33 +103,32 @@ | ||
103 | ] | 103 | ] |
104 | }); | 104 | }); |
105 | wx.ready(function () { | 105 | wx.ready(function () { |
106 | - var shareData = { | ||
107 | - title: $('.detail-title').find('.title'), | ||
108 | - desc: '123123', | ||
109 | - imgUrl: $(".share").attr("cover-url"), | ||
110 | - link: $(".share").attr("data-link"), | ||
111 | - success: function () // 用户确认分享后执行的回调函数 | ||
112 | - { | ||
113 | - alert("OK"); | ||
114 | - }, | ||
115 | - cancel: function () { // 用户取消分享后执行的回调函数 | ||
116 | - alert("fail"); | ||
117 | - } | ||
118 | - }; | ||
119 | - // 2.1 “分享给朋友” | ||
120 | - wx.onMenuShareAppMessage(shareData); | ||
121 | - // 2.2 “分享到朋友圈” | ||
122 | - wx.onMenuShareTimeline(shareData); | ||
123 | - // 2.3 “分享到QQ” | ||
124 | - wx.onMenuShareQQ(shareData); | ||
125 | - // 2.4 “分享到微博” | ||
126 | - wx.onMenuShareWeibo(shareData); | ||
127 | alert('aaa'); | 106 | alert('aaa'); |
128 | }); | 107 | }); |
129 | - | ||
130 | wx.error(function (res) { | 108 | wx.error(function (res) { |
131 | alert(res.errMsg); | 109 | alert(res.errMsg); |
132 | }); | 110 | }); |
111 | + var shareData = { | ||
112 | + title: $('.detail-title').find('.title'), | ||
113 | + desc: '123123', | ||
114 | + imgUrl: $(".share").attr("cover-url"), | ||
115 | + link: $(".share").attr("data-link"), | ||
116 | + success: function () // 用户确认分享后执行的回调函数 | ||
117 | + { | ||
118 | + alert("OK"); | ||
119 | + }, | ||
120 | + cancel: function () { // 用户取消分享后执行的回调函数 | ||
121 | + alert("fail"); | ||
122 | + } | ||
123 | + }; | ||
124 | + // 2.1 “分享给朋友” | ||
125 | + wx.onMenuShareAppMessage(shareData); | ||
126 | + // 2.2 “分享到朋友圈” | ||
127 | + wx.onMenuShareTimeline(shareData); | ||
128 | + // 2.3 “分享到QQ” | ||
129 | + wx.onMenuShareQQ(shareData); | ||
130 | + // 2.4 “分享到微博” | ||
131 | + wx.onMenuShareWeibo(shareData); | ||
133 | }); | 132 | }); |
134 | </script> | 133 | </script> |
135 | <?php $this->_endblock();?> | 134 | <?php $this->_endblock();?> |
-
Please register or login to post a comment