Authored by 张丽霞

yas函数判断、wechatShare

@@ -35,6 +35,7 @@ exports.index = (req, res, next) => { @@ -35,6 +35,7 @@ exports.index = (req, res, next) => {
35 result: couponData, 35 result: couponData,
36 module: 'activity', 36 module: 'activity',
37 page: 'coupon', 37 page: 'coupon',
  38 + wechatShare: true,
38 title: couponData.title 39 title: couponData.title
39 }); 40 });
40 }).catch(next); 41 }).catch(next);
@@ -36,9 +36,9 @@ @@ -36,9 +36,9 @@
36 {{{body}}} 36 {{{body}}}
37 {{> footer}} 37 {{> footer}}
38 </div> 38 </div>
39 - <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>  
40 39
41 {{#wechatShare}} 40 {{#wechatShare}}
  41 + <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
42 {{/wechatShare}} 42 {{/wechatShare}}
43 {{#if devEnv}} 43 {{#if devEnv}}
44 <script src="//localhost:5001/libs.js"></script> 44 <script src="//localhost:5001/libs.js"></script>
@@ -155,7 +155,7 @@ $('.phone-input-content div').on('click', function() { @@ -155,7 +155,7 @@ $('.phone-input-content div').on('click', function() {
155 }, 155 },
156 success: function(data) { 156 success: function(data) {
157 if (data.result.code === 200) { 157 if (data.result.code === 200) {
158 - if (window._yas) { 158 + if (window._yas && window._yas.sendCustomInfo) {
159 window._yas.sendCustomInfo({ 159 window._yas.sendCustomInfo({
160 activityID: activityID, 160 activityID: activityID,
161 returnCode: data.result.returnCode 161 returnCode: data.result.returnCode
@@ -236,7 +236,7 @@ $('.vertify-input-content').on('click', '.get', function() { @@ -236,7 +236,7 @@ $('.vertify-input-content').on('click', '.get', function() {
236 dataType: 'json', 236 dataType: 'json',
237 success: function(data) { 237 success: function(data) {
238 if (data.result.code === 200) { 238 if (data.result.code === 200) {
239 - if (window._yas) { 239 + if (window._yas && window._yas.sendCustomInfo) {
240 window._yas.sendCustomInfo({ 240 window._yas.sendCustomInfo({
241 activityID: activityID, 241 activityID: activityID,
242 returnCode: data.result.returnCode 242 returnCode: data.result.returnCode
@@ -341,7 +341,7 @@ $('.description').on('click', function() { @@ -341,7 +341,7 @@ $('.description').on('click', function() {
341 }); 341 });
342 342
343 $('.use-coupon-btn').on('click', function() { 343 $('.use-coupon-btn').on('click', function() {
344 - if (window._yas) { 344 + if (window._yas && window._yas.sendCustomInfo) {
345 window._yas.sendCustomInfo({ 345 window._yas.sendCustomInfo({
346 activityID: activityID 346 activityID: activityID
347 }, true); 347 }, true);