Showing
2 changed files
with
14 additions
and
11 deletions
@@ -1171,7 +1171,7 @@ const getChannelName = channel => { | @@ -1171,7 +1171,7 @@ const getChannelName = channel => { | ||
1171 | 1171 | ||
1172 | let channelName = ''; | 1172 | let channelName = ''; |
1173 | 1173 | ||
1174 | - switch(channel){ | 1174 | + switch (channel) { |
1175 | case 'boys': | 1175 | case 'boys': |
1176 | channelName = '男生'; | 1176 | channelName = '男生'; |
1177 | break; | 1177 | break; |
@@ -1206,10 +1206,10 @@ exports.getListSeo = (channel, sorts, checked) => { | @@ -1206,10 +1206,10 @@ exports.getListSeo = (channel, sorts, checked) => { | ||
1206 | misortName = ''; | 1206 | misortName = ''; |
1207 | 1207 | ||
1208 | _.forEach(sorts, val => { | 1208 | _.forEach(sorts, val => { |
1209 | - if(val.active) { | 1209 | + if (val.active) { |
1210 | msortName = val && val.name; | 1210 | msortName = val && val.name; |
1211 | _.forEach(val.childList, sub => { | 1211 | _.forEach(val.childList, sub => { |
1212 | - if(sub.childActive && sub.sortId !== val.sortId) { | 1212 | + if (sub.childActive && sub.sortId !== val.sortId) { |
1213 | misortName = sub && sub.name; | 1213 | misortName = sub && sub.name; |
1214 | return false; | 1214 | return false; |
1215 | } | 1215 | } |
@@ -1219,9 +1219,9 @@ exports.getListSeo = (channel, sorts, checked) => { | @@ -1219,9 +1219,9 @@ exports.getListSeo = (channel, sorts, checked) => { | ||
1219 | }); | 1219 | }); |
1220 | 1220 | ||
1221 | _.forEach(checked, ck => { | 1221 | _.forEach(checked, ck => { |
1222 | - if(ck.itemType === 'price') { | 1222 | + if (ck.itemType === 'price') { |
1223 | priceName = ck.name; | 1223 | priceName = ck.name; |
1224 | - } else if(ck.itemType === 'brand') { | 1224 | + } else if (ck.itemType === 'brand') { |
1225 | brandName = ck.name; | 1225 | brandName = ck.name; |
1226 | } | 1226 | } |
1227 | }); | 1227 | }); |
@@ -1255,7 +1255,7 @@ exports.getNewSeo = (channel, dlist) => { | @@ -1255,7 +1255,7 @@ exports.getNewSeo = (channel, dlist) => { | ||
1255 | nlabel = ''; | 1255 | nlabel = ''; |
1256 | 1256 | ||
1257 | _.forEach(dlist, d => { | 1257 | _.forEach(dlist, d => { |
1258 | - if(d && d.active) { | 1258 | + if (d && d.active) { |
1259 | nlabel = d.name || ''; | 1259 | nlabel = d.name || ''; |
1260 | return false; | 1260 | return false; |
1261 | } | 1261 | } |
@@ -1267,7 +1267,7 @@ exports.getNewSeo = (channel, dlist) => { | @@ -1267,7 +1267,7 @@ exports.getNewSeo = (channel, dlist) => { | ||
1267 | title: newTitle + '新品上架-YOHO!BUY 有货 100%正品保证', | 1267 | title: newTitle + '新品上架-YOHO!BUY 有货 100%正品保证', |
1268 | keywords: newTitle + '新品上架', | 1268 | keywords: newTitle + '新品上架', |
1269 | description: newTitle + '新品上架,正品网购,官方授权!YOHO! 有货中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。' | 1269 | description: newTitle + '新品上架,正品网购,官方授权!YOHO! 有货中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。' |
1270 | - } | 1270 | + }; |
1271 | }; | 1271 | }; |
1272 | 1272 | ||
1273 | exports.getBrandSeo = (channel, brandInfo) => { | 1273 | exports.getBrandSeo = (channel, brandInfo) => { |
@@ -1279,8 +1279,13 @@ exports.getBrandSeo = (channel, brandInfo) => { | @@ -1279,8 +1279,13 @@ exports.getBrandSeo = (channel, brandInfo) => { | ||
1279 | bc = b + c, | 1279 | bc = b + c, |
1280 | bbc = b + bcn + c, | 1280 | bbc = b + bcn + c, |
1281 | title = bb || b || '', | 1281 | title = bb || b || '', |
1282 | - keywords = (b ? b + ',' : '') + ((b && bcn) ? (bb + ',') : '') + bc || '' + '品牌', | ||
1283 | - desc = b + '正品网购。' + bbc || '' + '品牌官方授权!YOHO! 有货中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。'; | 1282 | + keywords = [b ? b + ',' : '', |
1283 | + ((b && bcn) ? (bb + ',') : ''), | ||
1284 | + bc || '', | ||
1285 | + '品牌'].join(''), | ||
1286 | + desc = [b + '正品网购。', | ||
1287 | + bbc || '', | ||
1288 | + '品牌官方授权!YOHO! 有货中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。'].join(''); | ||
1284 | 1289 | ||
1285 | title += (title ? (title + '|') : '') + c + '品牌|YOHO!BUY 有货 100%正品保证'; | 1290 | title += (title ? (title + '|') : '') + c + '品牌|YOHO!BUY 有货 100%正品保证'; |
1286 | 1291 |
-
Please register or login to post a comment