Authored by 郝肖肖

添加活动页传过来的参数

/**
* 活动页<http://feature.yoho.cn/1101/1101ITEMBOY/index.html?title=%E7%94%B7%E7%94%9F%E5%88%86%E4%BC%9A%E5%9C%BA&share_id=814&mkt_code=1011111#a_01>
* <xiaoxiao.hao@yoho.cn>
* 2016/07/13
*/
'use strict';
// 活动页保存相应cookie的值
exports.index = (req, res, next) => {
let mktCode = req.query.mkt_code || false;
// 下载浮层,下载按钮会用到该参数
if (mktCode) {
res.cookie('unionTypeYas', mktCode, {
domain: 'm.yohobuy.com',
path: '/'
});
}
res.json({mktCode: mktCode});
};
... ...
... ... @@ -15,6 +15,7 @@ const wechat = require(`${cRoot}/wechat`);
const student = require(`${cRoot}/student`);
const live = require(`${cRoot}/live`);
const invite = require(`${cRoot}/invite`);
const feature = require(`${cRoot}/feature`);
const couponFloor = require(`${cRoot}/coupon-floor`);
const vipDay = require(`${cRoot}/vipDay`);
... ... @@ -116,4 +117,7 @@ router.get('/vip-day1028/crazy-luck', vipDay1028.beforeIn, vipDay1028.crazyLuck)
router.post('/vip-day1028/signin.json', vipDay1028.beforeIn, vipDay1028.signin);
router.post('/vip-day1028/isStudent', vipDay1028.beforeIn, vipDay1028.checkIsStudent);
// 获取活动页传来的参数
router.get('/feature/index', feature.index);
module.exports = router;
... ...
... ... @@ -199,7 +199,7 @@ function getPageGoods(info) {
url: info.url,
data: info.data,
success: function(data) {
if (data === ' ') {
if (data === '') {
nav.end = true;
}
... ... @@ -325,6 +325,7 @@ var theY;
*/
function reNav1Pos() {
var sTop = theY ? theY : 0;
if (sTop < imgH + main1oH + nav1H) {
if ($nav1.hasClass('hide')) {
$nav1.removeClass('hide');
... ... @@ -385,6 +386,7 @@ function scrollHandler() {
if (sTop + winH * 2 > scH) {
scrollCall = function() {
var translate = 'translate3d(0, ' + (-scH) + 'px, 0)';
$nav1.css({
transform: translate,
'-moz-transform': translate,
... ... @@ -681,7 +683,7 @@ function search(opt) {
break;
}
if (data === ' ') {
if (data === '') {
nav.end = true;
if (nav.reload) {
... ... @@ -929,6 +931,7 @@ $nav2.on('touchstart', 'li', function(e) {
$('.shop-foot-wrapper .buriedpoint').click(function() {
var subGroup = $(this).find('.sub-group');
if (subGroup.hasClass('hide')) {
subGroup.removeClass('hide');
} else {
... ...