Showing
1 changed file
with
25 additions
and
26 deletions
@@ -134,37 +134,36 @@ | @@ -134,37 +134,36 @@ | ||
134 | 134 | ||
135 | } | 135 | } |
136 | }); | 136 | }); |
137 | - | ||
138 | - /* | ||
139 | - * 微信分享 | ||
140 | - */ | ||
141 | - wx.ready(function () { | ||
142 | - //构造分享信息 | ||
143 | - var shareTitle = '123123';//$('.detail-title').find('.title') | ||
144 | - var shareImg = $(".share").attr("cover-url"); | ||
145 | - var shareDesc = '在长大的过程中,我才慢慢发现,我身边的所有事,别人跟我说的所有事,那些所谓本来如此,注定如此的事,它们其没有非如此,事情是可以改变的。更重要的是,有些事既然错了,那就该做出改变。'; | ||
146 | - var shareLink = 'http://movie.douban.com/subject/25785114/'; | ||
147 | - var shareData = { | ||
148 | - title: shareTitle, | ||
149 | - desc: shareDesc, | ||
150 | - imgUrl: shareImg, | ||
151 | - link: shareLink | ||
152 | - }; | ||
153 | - // 2.1 “分享给朋友” | ||
154 | - wx.onMenuShareAppMessage(shareData); | ||
155 | - // 2.2 “分享到朋友圈” | ||
156 | - wx.onMenuShareTimeline(shareData); | ||
157 | - // 2.3 “分享到QQ” | ||
158 | - wx.onMenuShareQQ(shareData); | ||
159 | - // 2.4 “分享到微博” | ||
160 | - wx.onMenuShareWeibo(shareData); | ||
161 | - | ||
162 | - }); | ||
163 | wx.error(function (res) { | 137 | wx.error(function (res) { |
164 | alert(res.errMsg); | 138 | alert(res.errMsg); |
165 | }); | 139 | }); |
166 | seajs.use(['jquery', 'mobile'],function($, mobile) { | 140 | seajs.use(['jquery', 'mobile'],function($, mobile) { |
167 | mobile.detail(); | 141 | mobile.detail(); |
142 | + //构造分享信息 | ||
143 | + var shareTitle = $('.detail-title').find('.title') | ||
144 | + var shareImg = $(".share").attr("cover-url"); | ||
145 | + var shareDesc = '在长大的过程中,我才慢慢发现,我身边的所有事,别人跟我说的所有事,那些所谓本来如此,注定如此的事,它们其没有非如此,事情是可以改变的。更重要的是,有些事既然错了,那就该做出改变。'; | ||
146 | + var shareLink = $(".share").attr("data-link"); | ||
147 | + /* | ||
148 | + * 微信分享 | ||
149 | + */ | ||
150 | + wx.ready(function () { | ||
151 | + var shareData = { | ||
152 | + title: shareTitle, | ||
153 | + desc: shareDesc, | ||
154 | + imgUrl: shareImg, | ||
155 | + link: shareLink | ||
156 | + }; | ||
157 | + // 2.1 “分享给朋友” | ||
158 | + wx.onMenuShareAppMessage(shareData); | ||
159 | + // 2.2 “分享到朋友圈” | ||
160 | + wx.onMenuShareTimeline(shareData); | ||
161 | + // 2.3 “分享到QQ” | ||
162 | + wx.onMenuShareQQ(shareData); | ||
163 | + // 2.4 “分享到微博” | ||
164 | + wx.onMenuShareWeibo(shareData); | ||
165 | + | ||
166 | + }); | ||
168 | }); | 167 | }); |
169 | </script> | 168 | </script> |
170 | <?php $this->_endblock();?> | 169 | <?php $this->_endblock();?> |
-
Please register or login to post a comment