brand-api.js
907 Bytes
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
42
43
44
45
46
47
48
49
50
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/7/19
* Time: 14:02
*/
'use strict';
const api = global.yoho.API;
const yhChannel = {
men: {
channel: '301'
},
women: {
channel: '302'
},
lifestyle: {
channel: '303'
}
};
module.exports = {
/**
* 从接口获取品牌列表页数据
* @returns {*}
*/
getBrandListOriginData(params) {
return api.get('', {
method: 'app.brand.newBrandList',
yh_channel: yhChannel[params.channel].channel
}, {
code: 200,
cache: true
});
},
/**
* 从接口获取全部分类数据
* @returns {*}
*/
getCateListData(params) {
return api.get('', Object.assign(params, {
method: 'app.sort.get'
}, {
code: 200,
cache: true
}));
}
};