footer_tab.js
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* common head model
* @author: biao<bill.zhao@yoho.cn>
* @date: 2016/05/12
*/
'use strict';
const helpers = global.yoho.helpers;
exports.getUrlData = function(type, gender) {
const urlData = {
indexUrl: helpers.urlFormat('/?go=1'), // 首页
categoryUrl: helpers.urlFormat('/cate'), // 分类
guangUrl: helpers.urlFormat('/guang', gender ? {gender: gender} : null), // 逛首页
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;
};