brand-api.js
1.09 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/7/19
* Time: 14:02
*/
'use strict';
const yhChannel = {
men: {
channel: '301'
},
women: {
channel: '302'
},
lifestyle: {
channel: '303'
}
};
module.exports = class extends global.yoho.BaseModel{
constructor(ctx) {
super(ctx);
}
/**
* 从接口获取品牌列表页数据
* @returns {*}
*/
getBrandListOriginData(params) {
return this.get({
data: {
yh_channel: params.channel ? yhChannel[params.channel].channel : '',
method: 'app.brand.allBrandList'
},
param: {
code: 200,
cache: true
}
});
}
/**
* 从接口获取全部分类数据
* @returns {*}
*/
getCateListData(params) {
return this.get({
data: Object.assign(params, {
method: 'app.sort.get'
}),
param: {
code: 200,
cache: true
}
});
}
};