Authored by 周少峰

Merge branch 'master' into release/5.9

... ... @@ -8,6 +8,7 @@ const staticUrls = require('../../../config/staticUrls');
const api = global.yoho.API;
const Service = global.yoho.ServiceAPI;
const headerModel = require('../../../doraemon/models/header');
const redis = global.yoho.redis;
const getStaticUrls = (currentStatics) => {
... ... @@ -35,9 +36,30 @@ const getStaticUrls = (currentStatics) => {
return Promise.resolve(urls);
};
// 关键词页面
const keywordsPage = () => {
return redis.getAsync('golobal:yoho:seo:keywords:allIds').then(function(res) {
let page = [];
_.forEach(JSON.parse(res), val => {
page.push({
url: `https://www.yohobuy.com/chanpin/${val}.html`,
changefreq: 'daily',
priority: 0.5
});
});
return page;
}).catch(()=>{
return {};
});
};
// www 地图数据
const wwwXmlData = () => {// eslint-disable-line
return getStaticUrls(_.get(staticUrls, 'www'));
return Promise.all([keywordsPage(), getStaticUrls(_.get(staticUrls, 'www'))]).then(result => {
return _.concat(result[1], result[0]);
});
};
// list 地图数据
... ...
... ... @@ -21,7 +21,7 @@
<p>1.复制您的邀请码<br>2.粘贴给您的朋友</p>
</div>
<div class="item-card">
<span class="tag">方法:使用邀请链接</span>
<span class="tag">方法:使用邀请链接</span>
<div class="card-main">
<div class="spread-url">
<input type="text" value="{{url}}" class
... ...
... ... @@ -737,7 +737,7 @@ exports.handleFilterData = (origin, params, total) => {
}];
// 尺码处理
if (!_.isEmpty(origin.size) && ((params.msort && !_.includes(params.msort, ',')) || params.misort || params.sort)) {
if (!_.isEmpty(origin.size) && params.category_id) {
dest.size = [];
... ...
... ... @@ -394,7 +394,7 @@ exports.getSearchKeywordData = (params, channel) => {
let apiMethod = [
headerModel.requestHeaderData(channel),
searchApi.getSuggest({keyword: searchParams.query.substring(0, 2)}),
searchApi.getProductList(Object.assign({order: 'h_v_desc'}, searchParams), 'fuzzySearch')
searchApi.getProductList(searchParams, 'fuzzySearch')
];
return api.all(apiMethod).then(result => {
... ...
{
"name": "yohobuy-node",
"version": "5.8.10",
"version": "5.8.11",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -99,6 +99,11 @@
color: #666;
height: 22px;
line-height: 22px;
margin-left: 10px;
}
&.suggest-list a {
margin-left: 0;
}
}
... ...