Showing
1 changed file
with
42 additions
and
0 deletions
apps/product/models/preference.js
0 → 100644
1 | +/* | ||
2 | + * @Author: Targaryen | ||
3 | + * @Date: 2016-05-18 11:42:11 | ||
4 | + * @Last Modified by: Targaryen | ||
5 | + * @Last Modified time: 2016-05-18 13:26:49 | ||
6 | + */ | ||
7 | + | ||
8 | +'use strict'; | ||
9 | + | ||
10 | +const library = '../../../library'; | ||
11 | +const API = require(`${library}/api`).API; | ||
12 | +const sign = require(`${library}/sign`); | ||
13 | +const _ = require('lodash'); | ||
14 | + | ||
15 | +// const log = require(`${library}/logger`); | ||
16 | + | ||
17 | +var api = new API(); | ||
18 | + | ||
19 | +/** | ||
20 | + * 处理偏好信息 | ||
21 | + * @param {Object} origin [description] | ||
22 | + * @return {Object} [description] | ||
23 | + */ | ||
24 | +const getPreference = (origin) => { | ||
25 | + var dest = {}; | ||
26 | + return dest; | ||
27 | +}; | ||
28 | + | ||
29 | +module.exports = (data) => { | ||
30 | + var finalResult; | ||
31 | + | ||
32 | + return api.get('', sign.apiSign({ | ||
33 | + method: 'h5.preference.Search', | ||
34 | + productskn: data.productskn, | ||
35 | + yhchannel: data.yhchannel, | ||
36 | + brandId: data.brandId | ||
37 | + })).then(result => { | ||
38 | + finalResult = getPreference(result); | ||
39 | + | ||
40 | + return finalResult; | ||
41 | + }); | ||
42 | +}; |
-
Please register or login to post a comment