Authored by 张丽霞

yas函数判断、wechatShare

... ... @@ -35,6 +35,7 @@ exports.index = (req, res, next) => {
result: couponData,
module: 'activity',
page: 'coupon',
wechatShare: true,
title: couponData.title
});
}).catch(next);
... ...
... ... @@ -36,9 +36,9 @@
{{{body}}}
{{> footer}}
</div>
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
{{#wechatShare}}
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
{{/wechatShare}}
{{#if devEnv}}
<script src="//localhost:5001/libs.js"></script>
... ...
... ... @@ -155,7 +155,7 @@ $('.phone-input-content div').on('click', function() {
},
success: function(data) {
if (data.result.code === 200) {
if (window._yas) {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
activityID: activityID,
returnCode: data.result.returnCode
... ... @@ -236,7 +236,7 @@ $('.vertify-input-content').on('click', '.get', function() {
dataType: 'json',
success: function(data) {
if (data.result.code === 200) {
if (window._yas) {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
activityID: activityID,
returnCode: data.result.returnCode
... ... @@ -341,7 +341,7 @@ $('.description').on('click', function() {
});
$('.use-coupon-btn').on('click', function() {
if (window._yas) {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
activityID: activityID
}, true);
... ...