Authored by 陈峰

Merge branch 'master' into 'gray'

Master



See merge request !305
... ... @@ -17,15 +17,15 @@ module.exports = class extends global.yoho.BaseModel {
*/
getResourceAsync(resourceCode) {
return this.indexApi.getResourceAsync(resourceCode)
.then(result => {
if (result.code === 200) {
return result.data;
} else {
.then(result => {
if (result.code === 200) {
return result.data;
} else {
return {};
}
})
.catch(() => {
return {};
}
})
.catch(() => {
return {};
});
});
}
};
... ...
... ... @@ -157,7 +157,6 @@ const searchHistory = (req, res) => {
history = _.filter(history.split(','), old => old && old !== q);
if (q) {
sear;
history.unshift(q);
res.cookie('_History', _.take(history, 9).join(','), {
path: '/',
... ...