Authored by 梁志锋

Merge remote-tracking branch 'remotes/origin/hotfix/wechat'

... ... @@ -6,10 +6,10 @@ const library = '../../../library';
const couponModel = require(`${mRoot}/coupon`); // 领取优惠券 model
const log = require(`${library}/logger`);
exports.index = (req, res) => {
exports.index = (req, res, next) => {
var renderData = {
module: 'coupon',
page: 'index',
module: 'activity',
page: 'coupon',
appDownLoadLink: 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho'
},
ordercode = req.query.ordercode,
... ... @@ -33,19 +33,18 @@ exports.index = (req, res) => {
couponData.appDownLoadLink = renderData.appDownLoadLink;
res.render('coupon', {
result: couponData,
module: 'coupon',
page: 'index',
module: 'activity',
page: 'coupon',
wechatShare: true,
title: couponData.title
});
}).catch((err) => {
log.error('频道页面渲染错误:' + JSON.stringify(err));
});
}).catch(next);
};
exports.getCoupon = (req, res) => {
exports.getCoupon = (req, res, next) => {
var renderData = {
module: 'coupon',
page: 'index'
module: 'activity',
page: 'coupon'
};
var ordercode = req.query.ordercode,
... ... @@ -68,15 +67,13 @@ exports.getCoupon = (req, res) => {
res.json({
result: couponData
});
}).catch((err) => {
log.error('频道页面渲染错误:' + JSON.stringify(err));
});
}).catch(next);
};
exports.verify = (req, res) => {
exports.verify = (req, res, next) => {
var renderData = {
module: 'coupon',
page: 'index'
module: 'activity',
page: 'coupon'
};
... ... @@ -103,7 +100,5 @@ exports.verify = (req, res) => {
res.json({
result: couponData
});
}).catch((err) => {
log.error('频道页面渲染错误:' + JSON.stringify(err));
});
}).catch(next);
};
... ...
... ... @@ -21,7 +21,7 @@ const getPageInfo = (pageInfo) => {
dest.couponPic = pageInfo.data.couponPic;
dest.oldUserCouponPic = pageInfo.data.oldUserCouponPic;
dest.mobile = pageInfo.data.mobile;
dest.wechatShare = true;
// 强制活动开始,活动上线产品要求这样设置
pageInfo.data.flag = 1;
if (pageInfo.data.flag === 1) {
... ...
... ... @@ -44,7 +44,7 @@
<div class="input-content vertify-input-content hidden">
<input id="verification" type="text" placeholder="请输入验证码" maxlength="4"/>
<i class="clear-input iconfont hidden clear-verify">&#xe626;</i>
<div>验证领红包</div>
<div>注册领红包</div>
</div>
<div class="coupon-description">
... ...
... ... @@ -13,8 +13,8 @@ module.exports = {
port: 6001,
siteUrl: '//m.yohobuy.com',
domains: {
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/'
api: 'http://devapi.yoho.cn:58078/',
service: 'http://testservice.yoho.cn:28078/'
},
useOneapm: false,
useCache: false,
... ... @@ -77,9 +77,9 @@ if (isProduction) {
Object.assign(module.exports, {
appName: 'm.yohobuy.com for test',
domains: {
api: 'http://testapi.yoho.cn:28078/',
service: 'http://testservice.yoho.cn:28077/'
},
api: 'http://devapi.yoho.cn:58078/',
service: 'http://testservice.yoho.cn:28078/'
},
memcache: {
master: ['127.0.0.1:12111'],
slave: ['127.0.0.1:12112'],
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
webpackJsonp([19],[function(e,n,o){var t,i,s=o(1),a=s("#orderCode").html(),d=s("#oldUserCouponPic").html(),r=s("#newUserCouponPic").html(),l=s("#tipMessage").html(),c=s("#activityID").html(),h="//m.yohobuy.com/life/getSignPackage",u=s("#shareTitle").val(),m=s("#shareImg").val(),p=s("#shareDesc").val(),g=s("#shareLink").val(),v=window.wx;o(3),s("#phone").bind("input propertychange",function(){11===s(this).val().length?s(".input-content div").eq("0").addClass("verification-code"):(s(".input-content div").eq("0").removeClass(),s(this).val().length>=1?s(".input-content i").eq("0").removeClass("hidden"):s(".input-content i").eq("0").addClass("hidden"))}),s("#verification").bind("input propertychange",function(){4===s(this).val().length?s(".input-content div").eq("1").addClass("get"):(s(".input-content div").eq("1").removeClass(),s(this).val().length>=1?s(".input-content i").eq("1").removeClass("hidden"):s(".input-content i").eq("1").addClass("hidden"))}),s("#activityEnded").html()&&(s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(l)),s("#newUser").html()||s(".gain-coupon-centent .coupon img").attr("src",d),"undefined"!=typeof v&&(s.getJSON(h+"?pageurl="+encodeURIComponent(location.href.split("#")[0])+"&callback=?",function(e){var n,o,t,i;e&&(n=e.appId.toString(),o=e.timestamp,t=e.nonceStr.toString(),i=e.signature.toString(),v.config({debug:!1,appId:n,timestamp:o,nonceStr:t,signature:i,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","translateVoice","startRecord","stopRecord","onRecordEnd","playVoice","pauseVoice","stopVoice","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","closeWindow","scanQRCode","chooseWXPay","openProductSpecificView","addCard","chooseCard","openCard"]}))}),v.ready(function(){var e={title:u,desc:p,imgUrl:m,link:g};v.onMenuShareAppMessage(e),v.onMenuShareTimeline(e),v.onMenuShareQQ(e),v.onMenuShareWeibo(e)})),s(".phone-input-content div").on("click",function(){return t=s(this).siblings("input").val(),i=/[0-9]{11}/,i.test(t)?void s.ajax({url:"/activity/coupon/phone",data:{mobile:s("#phone").val(),ordercode:a},success:function(e){if(200===e.result.code)if(window._yas&&window._yas.sendCustomInfo&&window._yas.sendCustomInfo({activityID:c,returnCode:e.result.returnCode},!0),e.result.newUser?s(".gain-coupon-centent .coupon img").attr("src",r):s(".gain-coupon-centent .coupon img").attr("src",d),e.result.ended)s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(e.result.message);else if(e.result.geted)s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile);else if(e.result.newUser)s(".coupon-centent .phone-input-content").addClass("hidden"),s(".coupon-centent .vertify-input-content").removeClass("hidden");else{if(e.result.wrongNumb)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.oldUserAskCouponOnceMore)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" "),s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile)},2500)}else s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)},error:function(){s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误,稍后再试!<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)}}):(s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400))}),s(".vertify-input-content").on("click",".get",function(){s(".input-content div").eq("1").removeClass("get"),4===s(this).siblings("input").val().length?s.ajax({url:"/activity/coupon/verify",data:{identifycode:s("#verification").val(),mobile:s("#phone").val(),ordercode:a},dataType:"json",success:function(e){if(200===e.result.code)if(window._yas&&window._yas.sendCustomInfo&&window._yas.sendCustomInfo({activityID:c,returnCode:e.result.returnCode},!0),e.result.newUser?s(".gain-coupon-centent .coupon img").attr("src",r):s(".gain-coupon-centent .coupon img").attr("src",d),e.result.ended)s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(e.result.message);else if(e.result.geted)s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile);else if(e.result.newUser)s(".coupon-centent .phone-input-content").addClass("hidden"),s(".coupon-centent .vertify-input-content").removeClass("hidden");else{if(e.result.wrongNumb)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.vertifyWrong)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">验证码错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.oldUserAskCouponOnceMore)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" "),s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile)},2500)}else s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">'+e.result.message+"<p>"),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)},error:function(){s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误,稍后再试!<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)}}):(s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">验证码错误,请重新输入。<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400))}),s(".close").on("click",function(){s(".dialog").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")}),s(".coupon-description span").on("click",function(){s("#message").removeClass("hidden"),s(".mask").removeClass("hidden")}),s(".description").on("click",function(){s("#message").removeClass("hidden"),s(".mask").removeClass("hidden")}),s(".use-coupon-btn").on("click",function(){window._yas&&window._yas.sendCustomInfo&&window._yas.sendCustomInfo({activityID:c},!1)}),s(".input-content .clear-mobile").on("click",function(){s(".input-content input").eq("0").val(""),s(this).addClass("hidden"),s(".input-content div").eq("0").removeClass()}),s(".input-content .clear-verify").on("click",function(){s(".input-content input").eq("1").val(""),s(this).addClass("hidden"),s(".input-content div").eq("1").removeClass()})},,,function(e,n,o){function t(e){var n,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(e+"="),o>-1&&(o+=e.length+1,n=decodeURIComponent(m.trim(t.substring(o,t.indexOf(";",o)))))),n}function i(e,n,o){var t,i,s,a,d="";"undefined"!=typeof n&&(o=o||{},null===n&&(n="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(a=new Date,a.setTime(a.getTime()+24*o.expires*60*60*1e3)):a=o.expires,d="; expires="+a.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",s=o.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(n),d,t,i,s].join(""))}function s(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function a(){var e,n=t("_UID");return"undefined"==typeof n?0:(e=n.split("::"),"undefined"==typeof e||e.length<4?0:e)}function d(){var e=a();return 0===e?0:e[1]}function r(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function l(){var e;0!==g.length&&(e=Math.min(m(window).height(),window.screen.availHeight),m("body").height()<=e-parseInt(g.css("height"),0)?g.addClass("bottom"):g.removeClass("bottom"))}function c(e){var n=m(e).outerHeight();e&&g.css("margin-bottom",n+"px")}function h(){var e,n,o=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)e=t[n].split("="),o.push(e[0]),o[e[0]]=e[1];return o}function u(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var m=o(1),p=o(4),g=m("#yoho-footer"),v=m(".yoho-page"),f=m(".yoho-header");!function(){var e,n=g.children(".op-row"),o=m(".back-to-top"),t=a();l(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(e=new p(o[0]),e.on("tap",function(e){return m(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),g.removeClass("hide")}(),function(e,n,o,t,i){var s=n.createElement(o),a=n.getElementsByTagName(o)[0];e.YohoAcquisitionObject=i,e[i]=function(){e[i].p=arguments},s.async=1,s.src=t,a.parentNode.insertBefore(s,a)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=d();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),f.on("touchstart","a",function(){f.find("a").removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel","a",function(){m(this).removeClass("highlight")}),v.on("touchstart",".tap-hightlight",function(){m(this).siblings(".tap-hightlight").removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){m(this).removeClass("highlight")}),m(".nav-home").on("touchstart",function(){m(".homebuttom").toggleClass("hide")}),function(){var e,n,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,s=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!s);n++)e=t[n],i=i||window[e+"RequestAnimationFrame"],s=s||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&s||(i=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-o)),i=window.setTimeout(function(){e(n+t)},t);return o=n+t,i},s=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=s}(),m.extend({queryString:h}),11===g.find(".user-name").text().length&&g.find(".user-name").html(u(g.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=s,window.getUser=a,window.getUid=d,window.getShoppingKey=r,window.rePosFooter=l,window.reMarginFooter=c,window.queryString=h()}]);
\ No newline at end of file
... ...
webpackJsonp([19],[function(e,n,o){o(3)},,,function(e,n,o){function t(e){var n,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(e+"="),o>-1&&(o+=e.length+1,n=decodeURIComponent(p.trim(t.substring(o,t.indexOf(";",o)))))),n}function i(e,n,o){var t,i,a,r,s="";"undefined"!=typeof n&&(o=o||{},null===n&&(n="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(r=new Date,r.setTime(r.getTime()+24*o.expires*60*60*1e3)):r=o.expires,s="; expires="+r.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",a=o.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(n),s,t,i,a].join(""))}function a(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function r(){var e,n=t("_UID");return"undefined"==typeof n?0:(e=n.split("::"),"undefined"==typeof e||e.length<4?0:e)}function s(){var e=r();return 0===e?0:e[1]}function c(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function h(){var e;0!==w.length&&(e=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=e-parseInt(w.css("height"),0)?w.addClass("bottom"):w.removeClass("bottom"))}function d(e){var n=p(e).outerHeight();e&&w.css("margin-bottom",n+"px")}function u(){var e,n,o=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)e=t[n].split("="),o.push(e[0]),o[e[0]]=e[1];return o}function m(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=o(1),l=o(4),w=p("#yoho-footer"),f=p(".yoho-page"),g=p(".yoho-header");!function(){var e,n=w.children(".op-row"),o=p(".back-to-top"),t=r();h(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(e=new l(o[0]),e.on("tap",function(e){return p(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),w.removeClass("hide")}(),function(e,n,o,t,i){var a=n.createElement(o),r=n.getElementsByTagName(o)[0];e.YohoAcquisitionObject=i,e[i]=function(){e[i].p=arguments},a.async=1,a.src=t,r.parentNode.insertBefore(a,r)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=s();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),g.on("touchstart","a",function(){g.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),f.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var e,n,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)e=t[n],i=i||window[e+"RequestAnimationFrame"],a=a||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&a||(i=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-o)),i=window.setTimeout(function(){e(n+t)},t);return o=n+t,i},a=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:u}),11===w.find(".user-name").text().length&&w.find(".user-name").html(m(w.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=r,window.getUid=s,window.getShoppingKey=c,window.rePosFooter=h,window.reMarginFooter=d,window.queryString=u()}]);
\ No newline at end of file
webpackJsonp([18],[function(e,n,o){o(3)},,,function(e,n,o){function t(e){var n,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(e+"="),o>-1&&(o+=e.length+1,n=decodeURIComponent(p.trim(t.substring(o,t.indexOf(";",o)))))),n}function i(e,n,o){var t,i,a,r,s="";"undefined"!=typeof n&&(o=o||{},null===n&&(n="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(r=new Date,r.setTime(r.getTime()+24*o.expires*60*60*1e3)):r=o.expires,s="; expires="+r.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",a=o.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(n),s,t,i,a].join(""))}function a(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function r(){var e,n=t("_UID");return"undefined"==typeof n?0:(e=n.split("::"),"undefined"==typeof e||e.length<4?0:e)}function s(){var e=r();return 0===e?0:e[1]}function c(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function h(){var e;0!==w.length&&(e=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=e-parseInt(w.css("height"),0)?w.addClass("bottom"):w.removeClass("bottom"))}function d(e){var n=p(e).outerHeight();e&&w.css("margin-bottom",n+"px")}function u(){var e,n,o=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)e=t[n].split("="),o.push(e[0]),o[e[0]]=e[1];return o}function m(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=o(1),l=o(4),w=p("#yoho-footer"),f=p(".yoho-page"),g=p(".yoho-header");!function(){var e,n=w.children(".op-row"),o=p(".back-to-top"),t=r();h(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(e=new l(o[0]),e.on("tap",function(e){return p(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),w.removeClass("hide")}(),function(e,n,o,t,i){var a=n.createElement(o),r=n.getElementsByTagName(o)[0];e.YohoAcquisitionObject=i,e[i]=function(){e[i].p=arguments},a.async=1,a.src=t,r.parentNode.insertBefore(a,r)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=s();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),g.on("touchstart","a",function(){g.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),f.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var e,n,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)e=t[n],i=i||window[e+"RequestAnimationFrame"],a=a||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&a||(i=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-o)),i=window.setTimeout(function(){e(n+t)},t);return o=n+t,i},a=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:u}),11===w.find(".user-name").text().length&&w.find(".user-name").html(m(w.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=r,window.getUid=s,window.getShoppingKey=c,window.rePosFooter=h,window.reMarginFooter=d,window.queryString=u()}]);
\ No newline at end of file
... ...
webpackJsonp([18],[function(e,n,o){var t,i,s=o(1),a=s("#orderCode").html(),d=s("#oldUserCouponPic").html(),r=s("#newUserCouponPic").html(),l=s("#tipMessage").html(),c=s("#activityID").html(),h="http://www.yohoshow.com/api/wechat/getSignPackage",u=s("#shareTitle").val(),m=s("#shareImg").val(),p=s("#shareDesc").val(),g=s("#shareLink").val(),v=window.wx;o(3),s("#phone").bind("input propertychange",function(){11===s(this).val().length?s(".input-content div").eq("0").addClass("verification-code"):(s(".input-content div").eq("0").removeClass(),s(this).val().length>=1?s(".input-content i").eq("0").removeClass("hidden"):s(".input-content i").eq("0").addClass("hidden"))}),s("#verification").bind("input propertychange",function(){4===s(this).val().length?s(".input-content div").eq("1").addClass("get"):(s(".input-content div").eq("1").removeClass(),s(this).val().length>=1?s(".input-content i").eq("1").removeClass("hidden"):s(".input-content i").eq("1").addClass("hidden"))}),s("#activityEnded").html()&&(s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(l)),s("#newUser").html()||s(".gain-coupon-centent .coupon img").attr("src",d),"undefined"!=typeof v&&(s.getJSON(h+"?pageurl="+encodeURIComponent(location.href.split("#")[0])+"&callback=?",function(e){var n,o,t,i;e&&(n=e.appId.toString(),o=e.timestamp,t=e.nonceStr.toString(),i=e.signature.toString(),v.config({debug:!1,appId:n,timestamp:o,nonceStr:t,signature:i,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","translateVoice","startRecord","stopRecord","onRecordEnd","playVoice","pauseVoice","stopVoice","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","closeWindow","scanQRCode","chooseWXPay","openProductSpecificView","addCard","chooseCard","openCard"]}))}),v.ready(function(){var e={title:u,desc:p,imgUrl:m,link:g};v.onMenuShareAppMessage(e),v.onMenuShareTimeline(e),v.onMenuShareQQ(e),v.onMenuShareWeibo(e)})),s(".phone-input-content div").on("click",function(){return t=s(this).siblings("input").val(),i=/[0-9]{11}/,i.test(t)?void s.ajax({url:"/activity/coupon/phone",data:{mobile:s("#phone").val(),ordercode:a},success:function(e){if(200===e.result.code)if(window._yas&&window._yas.sendCustomInfo({activityID:c,returnCode:e.result.returnCode},!1),e.result.newUser?s(".gain-coupon-centent .coupon img").attr("src",r):s(".gain-coupon-centent .coupon img").attr("src",d),e.result.ended)s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(e.result.message);else if(e.result.geted)s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile);else if(e.result.newUser)s(".coupon-centent .phone-input-content").addClass("hidden"),s(".coupon-centent .vertify-input-content").removeClass("hidden");else{if(e.result.wrongNumb)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.oldUserAskCouponOnceMore)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" "),s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile)},2500)}else s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)},error:function(){s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误,稍后再试!<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)}}):(s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400))}),s(".vertify-input-content").on("click",".get",function(){s(".input-content div").eq("1").removeClass("get"),4===s(this).siblings("input").val().length?s.ajax({url:"/activity/coupon/verify",data:{identifycode:s("#verification").val(),mobile:s("#phone").val(),ordercode:a},dataType:"json",success:function(e){if(200===e.result.code)if(window._yas&&window._yas.sendCustomInfo({activityID:c,returnCode:e.result.returnCode},!1),e.result.newUser?s(".gain-coupon-centent .coupon img").attr("src",r):s(".gain-coupon-centent .coupon img").attr("src",d),e.result.ended)s(".tip-wrap").removeClass("hidden"),s(".tip-wrap .title").html(e.result.message);else if(e.result.geted)s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile);else if(e.result.newUser)s(".coupon-centent .phone-input-content").addClass("hidden"),s(".coupon-centent .vertify-input-content").removeClass("hidden");else{if(e.result.wrongNumb)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">手机号错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.vertifyWrong)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">验证码错误,请重新输入。<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400);if(e.result.oldUserAskCouponOnceMore)return s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>'),void setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" "),s(".page .gain-coupon-centent").removeClass("hidden"),s(".page .coupon-centent").addClass("hidden"),s("#mobile").html("优惠券已放至账户"+e.result.mobile)},2500)}else s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">'+e.result.message+"<p>"),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)},error:function(){s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">网络错误,稍后再试!<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400)}}):(s("#dialog").removeClass("hidden"),s(".mask").removeClass("hidden"),s("#dialog .content").html('<p class="phone-error">验证码错误,请重新输入。<p>'),setTimeout(function(){s(".messages").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")},1400))}),s(".close").on("click",function(){s(".dialog").addClass("hidden"),s(".mask").addClass("hidden"),s("#dialog .content").html(" ")}),s(".coupon-description span").on("click",function(){s("#message").removeClass("hidden"),s(".mask").removeClass("hidden")}),s(".description").on("click",function(){s("#message").removeClass("hidden"),s(".mask").removeClass("hidden")}),s(".use-coupon-btn").on("click",function(){window._yas&&window._yas.sendCustomInfo({activityID:c},!0)}),s(".input-content .clear-mobile").on("click",function(){s(".input-content input").eq("0").val(""),s(this).addClass("hidden"),s(".input-content div").eq("0").removeClass()}),s(".input-content .clear-verify").on("click",function(){s(".input-content input").eq("1").val(""),s(this).addClass("hidden"),s(".input-content div").eq("1").removeClass()})},,,function(e,n,o){function t(e){var n,o,t=document.cookie;return document.cookie&&""!==document.cookie&&(o=t.indexOf(e+"="),o>-1&&(o+=e.length+1,n=decodeURIComponent(m.trim(t.substring(o,t.indexOf(";",o)))))),n}function i(e,n,o){var t,i,s,a,d="";"undefined"!=typeof n&&(o=o||{},null===n&&(n="",o.expires=-1),o.expires&&("number"==typeof o.expires||o.expires.toUTCString)&&("number"==typeof o.expires?(a=new Date,a.setTime(a.getTime()+24*o.expires*60*60*1e3)):a=o.expires,d="; expires="+a.toUTCString()),t=o.path?"; path="+o.path:"",i=o.domain?"; domain="+o.domain:"",s=o.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(n),d,t,i,s].join(""))}function s(){var e=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!==document.cookie.indexOf("testcookie")),e}function a(){var e,n=t("_UID");return"undefined"==typeof n?0:(e=n.split("::"),"undefined"==typeof e||e.length<4?0:e)}function d(){var e=a();return 0===e?0:e[1]}function r(){var e=t("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function l(){var e;0!==g.length&&(e=Math.min(m(window).height(),window.screen.availHeight),m("body").height()<=e-parseInt(g.css("height"),0)?g.addClass("bottom"):g.removeClass("bottom"))}function c(e){var n=m(e).outerHeight();e&&g.css("margin-bottom",n+"px")}function h(){var e,n,o=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)e=t[n].split("="),o.push(e[0]),o[e[0]]=e[1];return o}function u(e){return e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var m=o(1),p=o(4),g=m("#yoho-footer"),v=m(".yoho-page"),f=m(".yoho-header");!function(){var e,n=g.children(".op-row"),o=m(".back-to-top"),t=a();l(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),o.length>0&&(e=new p(o[0]),e.on("tap",function(e){return m(window).scrollTop(0),e.srcEvent.preventDefault(),!1})),g.removeClass("hide")}(),function(e,n,o,t,i){var s=n.createElement(o),a=n.getElementsByTagName(o)[0];e.YohoAcquisitionObject=i,e[i]=function(){e[i].p=arguments},s.async=1,s.src=t,a.parentNode.insertBefore(s,a)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var e=d();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",e,"","")}(),f.on("touchstart","a",function(){f.find("a").removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel","a",function(){m(this).removeClass("highlight")}),v.on("touchstart",".tap-hightlight",function(){m(this).siblings(".tap-hightlight").removeClass("highlight"),m(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){m(this).removeClass("highlight")}),m(".nav-home").on("touchstart",function(){m(".homebuttom").toggleClass("hide")}),function(){var e,n,o=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,s=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!s);n++)e=t[n],i=i||window[e+"RequestAnimationFrame"],s=s||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&s||(i=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-o)),i=window.setTimeout(function(){e(n+t)},t);return o=n+t,i},s=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=s}(),m.extend({queryString:h}),11===g.find(".user-name").text().length&&g.find(".user-name").html(u(g.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=s,window.getUser=a,window.getUid=d,window.getShoppingKey=r,window.rePosFooter=l,window.reMarginFooter=c,window.queryString=h()}]);
\ No newline at end of file
!function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n=window.webpackJsonp;window.webpackJsonp=function(s,a){for(var o,l,c=0,u=[];c<s.length;c++)l=s[c],r[l]&&u.push.apply(u,r[l]),r[l]=0;for(o in a)e[o]=a[o];for(n&&n(s,a);u.length;)u.shift().call(null,t);return a[0]?(i[0]=0,t(0)):void 0};var i={},r={0:0};return t.e=function(e,n){if(0===r[e])return n.call(null,t);if(void 0!==r[e])r[e].push(n);else{r[e]=[n];var i=document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript",s.charset="utf-8",s.async=!0,s.src=t.p+""+e+"."+({1:"product.outlet",2:"product.detail",3:"product.outlet-detail",4:"product.discount-detail",5:"product.vip",6:"product.sale",7:"product.break-code",8:"channel.home",9:"product.outlet-will-end",10:"guang.star",11:"product.outlet-will-start",12:"guang.detail-list",13:"guang.collocation",14:"product.outlet-activity",15:"channel.index",16:"product.discount",17:"guang.special",18:"coupon.index",19:"common.error"}[e]||e)+".js",i.appendChild(s)}},t.m=e,t.c=i,t.p="",t(0)}([function(e,t,n){n(1),n(18),n(4),n(19),n(15),n(6),n(10),e.exports=n(11)},function(e,t,n){var i,r;/*!
!function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n=window.webpackJsonp;window.webpackJsonp=function(s,a){for(var o,l,c=0,u=[];c<s.length;c++)l=s[c],r[l]&&u.push.apply(u,r[l]),r[l]=0;for(o in a)e[o]=a[o];for(n&&n(s,a);u.length;)u.shift().call(null,t);return a[0]?(i[0]=0,t(0)):void 0};var i={},r={0:0};return t.e=function(e,n){if(0===r[e])return n.call(null,t);if(void 0!==r[e])r[e].push(n);else{r[e]=[n];var i=document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript",s.charset="utf-8",s.async=!0,s.src=t.p+""+e+"."+({1:"product.outlet",2:"product.detail",3:"product.outlet-detail",4:"product.discount-detail",5:"product.vip",6:"product.sale",7:"product.break-code",8:"channel.home",9:"product.outlet-will-end",10:"guang.star",11:"product.outlet-will-start",12:"guang.detail-list",13:"guang.collocation",14:"product.outlet-activity",15:"channel.index",16:"product.discount",17:"guang.special",18:"common.error",19:"activity.coupon"}[e]||e)+".js",i.appendChild(s)}},t.m=e,t.c=i,t.p="",t(0)}([function(e,t,n){n(1),n(18),n(4),n(19),n(15),n(6),n(10),e.exports=n(11)},function(e,t,n){var i,r;/*!
* jQuery JavaScript Library v2.2.4
* http://jquery.com/
*
... ...
... ... @@ -7,7 +7,7 @@ var $ = require('yoho-jquery'),
newUserCouponPic = $('#newUserCouponPic').html(),
tipMessage = $('#tipMessage').html(),
activityID = $('#activityID').html(),
_weChatInterface = 'http://www.yohoshow.com/api/wechat/getSignPackage',
_weChatInterface = '//m.yohobuy.com/life/getSignPackage',
shareTitle = $('#shareTitle').val(),
shareImg = $('#shareImg').val(),
shareDesc = $('#shareDesc').val(),
... ... @@ -155,11 +155,11 @@ $('.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
}, false);
}, true);
}
if (!data.result.newUser) {
$('.gain-coupon-centent .coupon img').attr('src', oldUserCouponPic);
... ... @@ -236,11 +236,11 @@ $('.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
}, false);
}, true);
}
if (!data.result.newUser) {
$('.gain-coupon-centent .coupon img').attr('src', oldUserCouponPic);
... ... @@ -341,10 +341,10 @@ $('.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);
}, false);
}
});
... ...
... ... @@ -9,7 +9,7 @@
@import "product/index";
@import "common/index";
@import "outlet/index";
@import "coupon/index";
@import "activity/index";
@import "guang/index";
@import "cart/chose-panel";
... ...