footer_tab.js 1023 Bytes
/**
 * common head model
 * @author: biao<bill.zhao@yoho.cn>
 * @date: 2016/05/12
 */

'use strict';

const helpers = global.yoho.helpers;

exports.getUrlData = function(type) {
    const urlData = {
        indexUrl: helpers.urlFormat('/?go=1'), // 首页
        categoryUrl: helpers.urlFormat('/cate'), // 分类
        guangUrl: helpers.urlFormat('/guang'), // 逛首页
        shoppingCartUrl: helpers.urlFormat('/cart/index/index'), // 购物车
        mineUrl: helpers.urlFormat('/home') // 个人中心
    };

    switch (type) {
        case 'home':
            urlData.boysHomePage = true;
            break;
        case 'category':
            urlData.categoryPage = true;
            break;
        case 'guang':
            urlData.guangHome = true;
            break;
        case 'shoppingCart':
            urlData.shoppingCartPage = true;
            break;
        case 'mine':
            urlData.minePage = true;
            break;
        default:
            break;
    }

    return urlData;
};