popular-shop.js
1.41 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
60
61
62
63
64
65
66
67
68
69
70
/**
* desc: 店铺装修----红人店铺
*/
'use strict';
const api = global.yoho.API;
/**
* 获取红人店铺 banner
* doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/商品列表/店铺装修.md
* @param int shopId 店铺id
*/
exports.getBanner = shopId => {
let params = {
// method: 'app.popular.shop.banner',
method: 'app.shop.banner', //TODO: this is mock api,use up
shop_id: shopId,
app_type: 0 // 0 有货 1 blk
};
return api.get('', params, {cache: true, code: 200});
};
/**
* 获取店铺 品牌数据
* @param int shopId 店铺id
*/
exports.getShopsBrands = shopId => {
let params = {
method: 'app.shops.getShopsBrands',
shop_id: shopId
};
return api.get('', params, {cache: true, code: 200});
};
/**
* 获取店铺 介绍
* @param int shopId 店铺id
*/
exports.getIntro = shopId => {
let params = {
// method: 'app.popular.shops.getIntro',
method: 'app.shops.getIntro',
shop_id: shopId,
app_type: 0
};
return api.get('', params, {cache: true, code: 200});
};
/**
* 查询红人店铺对应的装修元素
*
* @param int shopId 店铺id
*/
exports.getShopsdecorator = shopId => {
let params = {
method: 'app.popular.shopsdecorator',
shop_id: shopId,
app_type: 0
};
return api.get('', params, {cache: true, code: 200});
};