Blame view

apps/product/models/home-service.js 1.02 KB
htoooth authored
1 2 3 4
/**
 * Created by TaoHuang on 2016/6/14.
 */
yoho authored
5 6
'use strict';
htoooth authored
7
const helpers = global.yoho.helpers;
yoho authored
8 9 10 11

/**
 * 获取首页频道nav
 */
htoooth authored
12 13

const getHomeChannelNav = (channel) => {
yoho authored
14 15 16 17
    let home = null;

    switch (channel) {
        case 'boys':
陈轩 authored
18 19 20 21
            {
                home = helpers.urlFormat('', '', 'default');
                break;
            }
yoho authored
22
        case 'girls':
陈轩 authored
23 24 25 26
            {
                home = helpers.urlFormat('/woman', '', 'new');
                break;
            }
yoho authored
27
        case 'lifestyle':
陈轩 authored
28 29 30 31
            {
                home = helpers.urlFormat('/lifestyle', '', 'new');
                break;
            }
yoho authored
32
        case 'kids':
陈轩 authored
33 34 35 36
            {
                home = helpers.urlFormat('/kids', '', 'new');
                break;
            }
yoho authored
37
        default:
陈轩 authored
38 39 40
            {
                home = helpers.urlFormat('', '', 'default');
            }
yoho authored
41 42 43 44

    }

    return {
黄涛 authored
45 46 47 48 49
        href: home,
        name: `${channel.toUpperCase()}首页`,
        pathTitle: 'YOHO!有货'
    };
};
htoooth authored
50 51 52 53

module.exports = {
    getHomeChannelNav
};