Authored by ccbikai

Merge branch 'feature/sale' into release/4.8

... ... @@ -52,7 +52,7 @@ const _processPublicData = (req, title, page, backUrl) => {
* @return {[type]}
*/
let index = (req, res, next) => {
let refer = req.get('Referer') || 0;
let refer = req.get('Referer') || '';
let reqPath = req.baseUrl + req.path;
let backUrl = refer.indexOf(reqPath) === -1 ? refer : '';
... ...
... ... @@ -117,7 +117,9 @@ const _discount = (params) => {
method: 'app.activity.get',
sort: 2,
plateform: 3
}, params));
}, params), {
cache: true
});
};
/**
... ... @@ -188,7 +190,9 @@ const _searchSales = (params) => {
return api.get('', Object.assign({
method: method
}, params), true);
}, params), {
cache: true
});
};
/**
... ... @@ -206,7 +210,9 @@ const _getUserProfile = (uid) => {
return api.get('', {
method: 'app.passport.profile',
uid: uid
}, true);
}, {
cache: true
});
};
/**
... ... @@ -217,6 +223,8 @@ const _getUserProfile = (uid) => {
const _getResources = (page, channel) => {
return serviceAPI.get('operations/api/v5/resource/get', {
content_code: contentCode[channel][page]
}, {
cache: true
}).then((result) => {
if (result && result.code === 200) {
return resourcesProcess(result.data);
... ... @@ -236,6 +244,8 @@ const _getBreakingSort = (yhChannel) => {
return api.get('', {
method: 'app.sale.getBreakingSort',
yh_channel: channelType[yhChannel] || '1'
}, {
cache: true
}).then((result) => {
if (result && result.code === 200) {
return _processBreakingSort(result.data);
... ...