...
|
...
|
@@ -15,23 +15,17 @@ const search = { |
|
|
method: 'app.search.li'
|
|
|
}, params);
|
|
|
|
|
|
delete data.client_type;
|
|
|
delete data.client_secret;
|
|
|
return api.post('', data, {
|
|
|
return api.get('', data, {
|
|
|
cache: true,
|
|
|
code: 200
|
|
|
})
|
|
|
.then(result => {
|
|
|
if (!result.hasOwnProperty('code')) {
|
|
|
result.code = 200;
|
|
|
}
|
|
|
if (result.code === 200) {
|
|
|
prettyFilter(result.data.filter);
|
|
|
result = camelCase(result);
|
|
|
result.data.productList = processProductList(result.data.productList, {gender: params.gender});
|
|
|
}
|
|
|
return result;
|
|
|
});
|
|
|
}).then(result => {
|
|
|
if (result.data) {
|
|
|
prettyFilter(result.data.filter);
|
|
|
result = camelCase(result);
|
|
|
result.data.productList = processProductList(result.data.productList, {gender: params.gender});
|
|
|
}
|
|
|
return result;
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
|