shop-api.js
951 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
51
52
53
/**
* 店铺相关api调用
*
* @author: jiangfeng<jeff.jiang@yoho.cn>
* @date: 2016/07/14
**/
'use strict';
const Api = global.yoho.API;
const ShopApi = {
getShopIntro(shopId, uid) {
let param = {
method: 'app.shops.getIntro',
shop_id: shopId
};
if (uid) {
param.uid = uid;
}
return Api.get('', param);
},
getShopDecorator(shopId) {
let param = {
method: 'app.shopsdecorator.getList',
shop_id: shopId
};
return Api.get('', param);
},
getShopSorts(shopId, channel, gender) {
let param = {
method: 'app.shop.getSortInfo',
shop_id: shopId
};
if (channel) {
param.yh_channel = channel;
}
if (gender) {
param.gender = gender;
}
return Api.get('', param);
}
};
module.exports = ShopApi;