Authored by htoooth

Merge branch 'master' into release/6.0

web: npm run dev
gulp: gulp --cwd=public
proxy: d:\dev\traefik\traefik.exe -c d:\dev\traefik\conf.toml
mem: d:\dev\memcached\memcached.exe
... ...
... ... @@ -20,14 +20,17 @@ const removeBlack = (remoteIp) => {
keyMax = `pc:limiter:max:${remoteIp}`,
key10mMax = `pc:limiter:10m:max:${remoteIp}`,
synchronizeKey = `pc:limiter:synchronize:${remoteIp}`,
asynchronousKey = `pc:limiter:asynchronous:${remoteIp}`,
spiderKey = `pc:limiter:spider:${remoteIp}`;
return Promise.all([
cache.delAsync(key),
cache.delAsync(key10m),
cache.delAsync(keyMax),
cache.delAsync(key10mMax),
cache.delAsync(synchronizeKey),
cache.delAsync(asynchronousKey),
cache.delAsync(spiderKey)
]);
};
... ...
... ... @@ -9,11 +9,7 @@
</ul>
</div>
<div class="main-container">
{{#if devEnv}}
<img src="//webstatic.dev.yohobuy.com/img/about/aboutnewpower.png?random=1466056691"/>
{{^}}
<img src="//cdn.yoho.cn/yohobuy/assets/img/about/aboutnewpower.png?random=1466056691"/>
{{/if}}
<div class="text-info">
<p style="font-family:微软雅黑; text-align:left;">
<span style="font-size:18px; line-height:68px;">一、公司概况:</span>
... ... @@ -25,7 +21,7 @@
<br/>
1、平面杂志及电子平台
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;《YOHO!潮流志》、《YOHO!GIRL》是YOHO!旗下在国内潮流领域具有深厚影响力的杂志媒体。《YOHO!潮流志》2005 年10月创刊。他是国内第一本完全原创版权的,提供潮流和 lifestyle 资讯,属于年轻人的潮流时尚半月刊,通过正规发行渠道(报刊亭、连锁商超等)发行至全国各大中城市,深受全国年轻人的喜爱。设计给国内年轻女性的中高端时装月刊《YOHO!GIRL》,2013年3月正式创刊,在香港、大陆以及日本东京茑屋地区同步发行。以大量独家资讯加上独特的编采手法,改变读者的阅读习惯,扩阔大家在时装、美容、设计、生活、次文化等各方面的视野。深入结构品牌背后的哲学和时装趋势,带领各读者一探最新时尚。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;《YOHO!潮流志》、《YOHO!GIRL》是YOHO!旗下在国内潮流领域具有深厚影响力的杂志媒体。《YOHO!潮流志》2005 年10月创刊。他是一本完全原创版权并提供潮流和 lifestyle 资讯的属于年轻人的潮流时尚半月刊,通过正规发行渠道(报刊亭、连锁商超等)发行至全国各大中城市,深受全国年轻人的喜爱。设计给国内年轻女性的中高端时装月刊《YOHO!GIRL》,2013年3月正式创刊,在香港、大陆以及日本东京茑屋地区同步发行。以大量资讯加上独特的编采手法,改变读者的阅读习惯,扩阔大家在时装、美容、设计、生活、次文化等各方面的视野。深入结构品牌背后的哲学和时装趋势,带领各读者一探时尚。
<br/>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YOHO!作为中国权威的潮流杂志电子平台,无论是影响力或发行量均名列前茅。“Yoho!Now”于 iOS 和 Android平台触亮全球潮流资讯,“Yoho!Now”7*24h 无休供应时装、运动、设计、科技、美容、家居、趣闻等严选潮流营养,并于每周发布特别线上专题,与读者Play and Learn。《YOHO!潮流志》和《YOHO!GIRL》亦于各自App內每周上架新鲜线上周刊,打包纸质版内容精华,汇通YOHO!潮流矩阵。
... ... @@ -33,12 +29,12 @@
<br/>
2、关于“Yoho!Buy有货”
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“Yoho!Buy有货”(www.yohobuy.com)——年轻人潮流购物中心,同样秉承YOHO!“年轻是种态度”的口号,Yoho!Buy有货专注于中国潮流趋势和受众的需要,凭借专业的买手团队和对中国潮流趋势敏锐的嗅觉,积极开拓符合中国年轻人喜爱的品牌和商品。销售包括国际知名、日韩港台流行、明星设计师、内地原创等等超过1400 个潮流品牌商品,满足18-35岁年轻群体的时尚个性化述求,涵盖男女服装、鞋帽、配件、童装及创意生活用品等。Yoho!Buy有货所销售的品牌均与品牌直接签订销售协议,保持货品与国际国内实体店铺同步,通过独家定制、限定发售、明星合作品牌等,并结合“逛”内容频道及社区互动引导消费。Yoho!Buy有货已成为中国年轻态群体喜爱的潮流购物平台。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“Yoho!Buy有货”(www.yohobuy.com)——年轻人潮流购物中心,同样秉承YOHO!“年轻是种态度”的口号,Yoho!Buy有货专注于中国潮流趋势和受众的需要,凭借专业的买手团队和对中国潮流趋势敏锐的嗅觉,积极开拓符合中国年轻人喜爱的品牌和商品。销售包括国际知名、日韩港台流行、明星设计师、内地原创等等超过1400 个潮流品牌商品,满足18-35岁年轻群体的时尚个性化述求,涵盖男女服装、鞋帽、配件、童装及创意生活用品等。Yoho!Buy有货所销售的品牌均与品牌直接签订销售协议,保持货品与国际国内实体店铺同步,通过定制、限定发售、明星合作品牌等,并结合“逛”内容频道及社区互动引导消费。Yoho!Buy有货已成为中国年轻态群体热爱的潮流购物平台。
<br/>
<br/>
3、关于“mars - 新鲜好去处”
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“mars - 新鲜好去处”是一款由YOHO!出品的潮流生活应用,立志为百万年轻人打造酷炫的“城市探索”线上枢纽。连续两周被 Apple 评选为App Store“最佳新应用”,并获得 2016 年“一月最佳 App”、“最佳生活 App”等推荐。mars深入探索全球热点城市潮流坐标,现已上线北京、上海、成都、台北、香港、东京、首尔、纽约、洛杉矶等城市,未来还将陆续上线更多城市。集优质潮流攻略、专属玩乐线路、每日热点话题等功能,邀集世界各地时髦生活方式达人与所有用户分享好去处,让潮流随时、随地、随享。我们的目标就是带你去那些“如果你不用 mars 可能一辈子都不知道”的潮流好去处。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“mars - 新鲜好去处”是一款由YOHO!出品的潮流生活应用,立志为百万年轻人打造酷炫的“城市探索”线上枢纽。多次被 Apple 的 App Store 官方推荐。mars深入探索全球热点城市潮流坐标,现已上线北京、上海、成都、台北、香港、东京、首尔、纽约、洛杉矶等城市,未来还将陆续上线更多城市。集优质潮流攻略、专属玩乐线路、每日热点话题等功能,邀集世界各地时髦生活方式达人与所有用户分享好去处,让潮流随时、随地、随享。我们的目标就是带你去那些“如果你不用 mars 可能一辈子都不知道”的潮流好去处。
</p>
</div>
</div>
... ...
... ... @@ -19,14 +19,11 @@
<p style="font-family:微软雅黑; text-align:left;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“Yoho!Buy 有货”(
<a style=" font:#000;" href="//www.yohobuy.com" target="_blank">www.yohobuy.com</a>
)——年轻人潮流购物中心,同样秉承YOHO!“年轻是种态度”的口号,Yoho!Buy有货专注于中国潮流趋势和受众的需要,凭借专业的买手团队和对中国潮流趋势敏锐的嗅觉,积极开拓符合中国年轻人喜爱的品牌和商品。销售包括国际知名、日韩港台流行、明星设计师、内地原创等等超过1400 个潮流品牌商品,满足18-35岁年轻群体的时尚个性化述求,涵盖男女服装、鞋帽、配件、童装及创意生活用品等。Yoho!Buy有货所销售的品牌均与品牌直接签订销售协议,保持货品与国际国内实体店铺同步,通过独家定制、限定发售、明星合作品牌等,并结合“逛”内容频道及社区互动引导消费。Yoho!Buy有货已成为中国年轻态群体最喜爱的潮流购物平台。<br>
)——年轻人潮流购物中心,同样秉承YOHO!“年轻是种态度”的口号,Yoho!Buy有货专注于中国潮流趋势和受众的需要,凭借专业的买手团队和对中国潮流趋势敏锐的嗅觉,积极开拓符合中国年轻人喜爱的品牌和商品。销售包括国际知名、日韩港台流行、明星设计师、内地原创等等超过1400 个潮流品牌商品,满足18-35岁年轻群体的时尚个性化述求,涵盖男女服装、鞋帽、配件、童装及创意生活用品等。Yoho!Buy有货所销售的品牌均与品牌直接签订销售协议,保持货品与国际国内实体店铺同步,通过定制、限定发售、明星合作品牌等,并结合“逛”内容频道及社区互动引导消费。Yoho!Buy有货已成为中国年轻态群体热爱的潮流购物平台。
<br>
</p>
<p>
{{#if devEnv}}
<img src="//webstatic.dev.yohobuy.com/img/about/about_yohobuy.jpg?random=1466056691" />
{{^}}
<img src="//cdn.yoho.cn/yohobuy/assets/img/about/about_yohobuy.jpg?random=1466056691" />
{{/if}}
<img src="//img11.static.yhbimg.com/evidenceImages/2017/07/11/16/01e66a43c7eff25fef57e5c9795474bddc.jpg" />
</p>
</div>
</div>
... ...
... ... @@ -11,7 +11,7 @@ const suggestFeedBackModel = require('../models/suggestFeedBack-service');
const getFeedBack = (req, res, next) => {
suggestFeedBackModel.suggestFeedBack().then((result) => {
suggestFeedBackModel.suggestFeedBack(req.user.uid).then((result) => {
res.jsonp(result);
}).catch(next);
};
... ...
... ... @@ -14,9 +14,9 @@ const URL_ACTIVITY_QUESTION = '/activity/question/';
* @param uid
* @return string
*/
const feedBackApi = () => {
const feedBackApi = (uid) => {
return service.get(URL_ACTIVITY_QUESTION + 'questionList', {});
return service.get(URL_ACTIVITY_QUESTION + 'questionList', {uid: uid});
};
module.exports = {
... ...
... ... @@ -9,9 +9,9 @@ const api = require('./suggestFeedBack-api');
const helpers = global.yoho.helpers;
const _ = require('lodash');
const suggestFeedBack = () => {
const suggestFeedBack = (uid) => {
return api.feedBackApi().then((result) => {
return api.feedBackApi(uid).then((result) => {
let suggestData = [];
if (result && result.code === 200 && _.get(result, 'data.rows')) {
... ...
... ... @@ -210,7 +210,13 @@ const keyId = (req, res, next) => {
let params = req.query;
let id = req.params.id;
return search.getSearchKeywordDataById(id, params, req.yoho.channel).then(result => {
return search.getSearchKeywordDataById(id, Object.assign({stocknumber: -1}, params),
req.yoho.channel).then(result => {
if (!result) {
return next();
}
let query = result.queryKey;
Object.assign(result, {
... ...
... ... @@ -56,7 +56,7 @@ const indexAsync = pid => {
marketPrice: cur.product.productPriceBo.formatMarketPrice,
productName: cur.product.productName,
href: helpers.getUrlBySkc(
_.get(goods, 'goodsImagesList[0].productSkn', ''))
_.get(cur.product, 'productPriceBo.productSkn', ''))
};
acc.push(point);
... ...
... ... @@ -6,6 +6,7 @@
const api = global.yoho.API;
const config = global.yoho.config;
const redis = global.yoho.redis;
/**
* 商品的 banner
... ... @@ -131,8 +132,8 @@ const getShopRecommendAsync = (skn, page, limit) => {
return api.get('', {
method: 'web.product.shopRecommend',
product_skn: skn,
page: page,
limit: limit
page: page || 1,
limit: limit || 20
});
};
... ... @@ -146,6 +147,24 @@ const getBundleAsync = (skn) => {
});
};
/**
* 找相似
*/
const getLikeAsync = (skn, limit) => {
return api.get('', {
method: 'app.search.findLike',
limit: limit || 10,
product_skn: skn
});
};
// 根据small_sort从redis获取分类下的关键词
const getRecommendKeywords = (smallSort) => {
return redis.all([['get', `golobal:yoho:seo:keywords:sortId:${smallSort}`]]).then(res => {
return res[0];
});
};
module.exports = {
getProductBannerAsync,
sizeInfoAsync,
... ... @@ -156,5 +175,7 @@ module.exports = {
isSupportReturnedSale,
getLimitedProductStatusAsync,
getShopRecommendAsync,
getBundleAsync
getBundleAsync,
getLikeAsync,
getRecommendKeywords
};
... ...
... ... @@ -35,6 +35,7 @@ const BLANK_STR = ' ';
const BUNDLE_PRODUCE = 2; // 量贩
const BUNDLE_PACKAGE = 1; // 套餐
const tdk = require('../../../utils/getTDK');
const Helpers = global.yoho.helpers;
const _getProductAdditionInfoAsync = (data) => {
return co(function * () {
... ... @@ -1007,6 +1008,19 @@ const _getIntroInfo = (productSkn, maxSortId, additionalData)=> {
return result;
};
// 返回6条推荐关键词页面
const getKeywordsInfo = (keywords) => {
let res = [];
_.forEach(_.slice(_.shuffle(keywords), 0, 12), val => {
res.push({
url: Helpers.urlFormat(`/chanpin/${val.id}.html`),
keyword: val.keyword
});
});
return res;
};
/**
* 获取seo信息
*
... ... @@ -1101,6 +1115,9 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
return result;
}
// sku商品信息,尺寸信息
let skuData = _getSkuDataByProductBaseInfo(origin);
result.name = propOrigin('product_name');
result.skn = propOrigin('product_skn');
result.productId = propOrigin('product_id');
... ... @@ -1143,6 +1160,17 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
requestApi.bundle = productAPI.getBundleAsync(result.skn); // 量贩
}
// 找相似
if (skuData.totalStorageNum === 0) {
requestApi.alike = productAPI.getLikeAsync(result.skn);
}
// 相关推荐词
requestApi.recommendKeywords = productAPI.getRecommendKeywords(result.smallSortId);
// 店铺推荐直出(seo需要)
requestApi.shopRecommend = productAPI.getShopRecommendAsync(result.skn);
let requestData = yield Promise.props(requestApi);
let additionalData = requestData.addition;
... ... @@ -1151,6 +1179,20 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
let coupon = requestData.coupon;
let limitedInfo = requestData.limited;
let bundle = requestData.bundle;
let recommendKeywords = requestData.recommendKeywords ? JSON.parse(requestData.recommendKeywords) : [];
// 处理相似商品
result.alike = _.map(_.get(requestData, 'alike.data.product_list', ''), val =>{
return Object.assign({url: Helpers.getUrlBySkc(val.product_skn)}, val);
});
// 推荐关键词页面
result.recommendKeywords = getKeywordsInfo(recommendKeywords);
// 处理店铺推荐
result.shopRecommend = _.map(_.get(requestData, 'shopRecommend.data.product_list', ''), val =>{
return Object.assign({url: Helpers.getUrlBySkc(val.product_skn)}, val);
});
// 商品标签
result.tags = _getTagsDataByProductInfo(origin);
... ... @@ -1238,9 +1280,6 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
result.presale = 'Y';
}
// sku商品信息,尺寸信息
let skuData = _getSkuDataByProductBaseInfo(origin);
result.img = skuData.defaultImage;
result.colors = skuData.skuGoods;
let totalStorageNum = skuData.totalStorageNum;
... ... @@ -1719,7 +1758,6 @@ const getPackage = co(function * (skn) {
return resData;
});
module.exports = {
getShareOrderListAsync: commentService.getShareOrderListAsync, // 获取评论列表
indexConsultAsync: consultService.indexAsync, // 获取咨询列表
... ...
... ... @@ -419,8 +419,7 @@ exports.getSearchKeywordDataById = (id, params, channel) => {
]);
if (!redisData[0]) {
return Promise.reject('get redis canpin keywords by id error!' +
`key: golobal:yoho:seo:keywords:id:${id} value: ${redisData[0]}`);
return false;
}
redisData = JSON.parse(redisData[0]);
... ...
... ... @@ -23,6 +23,8 @@
<div id="package" class="package-box clearfix hide"></div>
{{> product/alike}}
<div class="total-content">
<div class="other-infos">
{{> product/description}}
... ... @@ -39,6 +41,8 @@
{{> product/after-service}}
{{> product/recommend-keywords}}
{{> product/recommend-receiveview}}
</div>
... ...
{{#if goodsInfo.alike}}
<div class="bottom-tab alike-title">
<p>
<span class="bottom-title bottom-cur">相似商品</span>
<span class="bottom-title change">换一批
<span class="iconfont change-icon">&#xe6d3;</span>
</span>
</p>
</div>
<div class="individual-comment info-block info-bottom alike">
<div>
<div class="recommend-content clearfix">
<div class="recommend-slider-alike">
<ul class=" img-list">
{{# goodsInfo.alike}}
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{image2 default_images w=280 h=382}}"/>
</a>
<a class="name" href="{{url}}" target="_blank">{{product_name}}</a>
<p class="price">
<span class="market-price">¥{{market_price}}</span>
<span class="sale-price">¥{{sales_price}}</span>
</p>
</div>
</li>
{{/goodsInfo.alike}}
</ul>
<div class="img-brand-switch">
<a class="prev iconfont" href="javascript:;">&#xe609;</a>
<a class="next iconfont" href="javascript:;">&#xe608;</a>
</div>
</div>
</div>
</div>
</div>
{{/if}}
\ No newline at end of file
... ...
{{#if goodsInfo.recommendKeywords}}
<div class="recommend-keywords">
<h3>相关推荐</h3>
<p>
{{# goodsInfo.recommendKeywords}}
<a href="{{url}}" title="{{keyword}}" target="_blank">{{keyword}}</a>
{{/ goodsInfo.recommendKeywords}}
</p>
</div>
{{/if}}
... ...
... ... @@ -25,11 +25,27 @@
{{> product/latest-walk-tpl}}
</div>
{{/if}}
<div id="recommend-shop" class="hide">
{{#if goodsInfo.shopRecommend}}
<div id="recommend-shop">
<div class="recommend-content clearfix">
<div class="recommend-slider">
<ul class=" img-list" id="recommend-content"></ul>
<ul class=" img-list" id="recommend-content">
{{# goodsInfo.shopRecommend}}
<li class="img-item">
<span class="hide goods-id">{{goods_id}}</span>
<div class="good">
<a href="{{url}}" target="_blank">
<img class="lazy" src="{{image2 default_images w=280 h=382}}"/>
</a>
<a class="name" href="{{url}}" target="_blank">{{product_name}}</a>
<p class="price">
<span class="market-price">¥{{market_price}}</span>
<span class="sale-price">¥{{sales_price}}</span>
</p>
</div>
</li>
{{/ goodsInfo.shopRecommend}}
</ul>
<div class="img-brand-switch">
<a class="prev iconfont" href="javascript:;">&#xe609;</a>
<a class="next iconfont" href="javascript:;">&#xe608;</a>
... ... @@ -37,5 +53,6 @@
</div>
</div>
</div>
{{/if}}
</div>
{{/unless}}
... ...
... ... @@ -37,11 +37,11 @@ module.exports = (req, res, next) => {
remoteIp = req.get('X-Real-IP');
}
logger.info('request remote ip: ', remoteIp);
const excluded = _.includes(IP_WHITE_LIST, remoteIp);
const enabled = !_.get(req.app.locals, 'pc.sys.noLimiter');
logger.info(`request remote ip: ${remoteIp}; excluded: ${excluded}; enabled: ${enabled}`);
// 判断获取remoteIp成功,并且开关未关闭
if (enabled && remoteIp && !excluded) {
const context = {
... ...
... ... @@ -47,6 +47,7 @@ module.exports = (limiter, policy) => {
logger.debug(results);
if (results[spiderKey]) {
logger.info(results);
return Promise.resolve(policy);
}
... ... @@ -63,6 +64,7 @@ module.exports = (limiter, policy) => {
if (results[synchronizeKey] > 10 && !results[asynchronousKey]) {
cache.setAsync(spiderKey, 1, 60 * 60 * 24);
logger.info(results);
return Promise.resolve(policy);
}
... ...
... ... @@ -3,6 +3,8 @@ const _ = require('lodash');
const redis = require('redis');
const bluebird = require('bluebird');
const config = require('../../config/common');
const logger = global.yoho.logger;
const timeout = 200; // redis 操作超时时间
let client;
try {
... ... @@ -20,9 +22,14 @@ try {
}
}
return client.multi.call(client, args).execAsync();
return client.multi.call(client, args).execAsync().timeout(timeout).catch(()=>{
logger.err('redis exe time out');
return false;
});
};
client.on('error', function() {
global.yoho.redis = '';
});
... ...
... ... @@ -282,7 +282,7 @@
<p>
<a href="//www.yohobuy.com">返回首页</a>
<span>|</span>
<a href="//www.yohobuy.com">YOHO!BUY 有货</a>
<a href="//www.yohobuy.com/yohobuy.html">YOHO!BUY 有货</a>
<span>|</span>
<a href="//www.yohobuy.com/newpower.html" rel="nofollow">新力传媒</a>
<span>|</span>
... ... @@ -293,6 +293,10 @@
<a href="//www.yohobuy.com/privacy.html" rel="nofollow">隐私条款</a>
<span>|</span>
<a href="//www.yohobuy.com/link.html">友情链接</a>
<span>|</span>
<a class="police" target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=32010502010132">
苏公网安备 32010502010132号
</a>
</p>
<p>
CopyRight © 2007-2016 南京新与力文化传播有限公司
... ...
{
"name": "yohobuy-node",
"version": "5.9.0",
"version": "5.9.4",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -160,8 +160,14 @@ function bindHoverEvent() {
$brand.unbind('mouseenter').unbind('mouseleave').hover(function() {
var $this = $(this);
var key = $this.attr('data-key');
var options;
var options = {
// 全球购品牌不展示品牌简介
if (+key < 0) {
return;
}
options = {
url: '/brands/brandinfo',
type: 'get',
data: {
... ...
... ... @@ -107,7 +107,7 @@ function validateAddress(data) {
var regx = {
consignee: /^([\u4e00-\u9fa5\w*]{1,20})$/,
areaCode: /^[0-9]{6,9}$/,
mobile: /^\d{3}(\d{4}|\*{4})\d{1,8}$/,
mobile: /^\d{3}(\d{4}|\*{4})\d{4}$/, // 手机号11位校验 by 新飞 2017.7.11
phone: /^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/
},
pass = true,
... ...
... ... @@ -114,7 +114,7 @@ function getShoppingKey() {
a.src = j;
m.parentNode.insertBefore(a, m);
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//' + // eslint-disable-line
'cdn.yoho.cn/yas-jssdk/2.4.1/yas.js', '_yas')); // eslint-disable-line
'cdn.yoho.cn/yas-jssdk/2.4.2/yas.js', '_yas')); // eslint-disable-line
(function() {
var uid = getUid();
... ... @@ -124,7 +124,7 @@ function getShoppingKey() {
window._ozuid = uid; // 暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '2.4.1', 'yohobuy_web', uid, '', '');
window._yas(1 * new Date(), '2.4.2', 'yohobuy_web', uid, '', '');
}
}());
... ...
... ... @@ -230,7 +230,7 @@ function blurAction(opt) {
}
if (opt.inputName === 'mobile') {
regular = /^[0-9]{1,}$/;
regular = /^[0-9]{11}$/; // 手机号11位校验 by 新飞 2017.7.11
if (regular.test(opt.val) === false) {
msg = '您输入的手机号格式不正确';
... ...
... ... @@ -1498,36 +1498,21 @@ function initPageYas() {
yas.givePoint('YB_CHOOSE_FOR_YOU_Y', loadYas);
}
// 店铺推荐
// 店铺推荐 改为后台直出
function loadRecommend() {
return $.ajax({
type: 'GET',
url: '/product/detail/recommend',
data: {
skn: skn,
size: 20,
num: 1
}
}).then(function(data) {
var pro = data.data.products;
var recommendTpl = require('hbs/product/recommend.hbs');
var html = recommendTpl(data.data);
if (data.code === 200 && pro.length !== 0) {
$('#recommend-shop').removeClass('hide');
$('#recommend-content').append(html);
$('.recommend-slider').slider2({
shownum: 5,
isCircle: true
});
var imgItem = $('.recommend-slider .img-item'),
$bottomTitle = $('.bottom-tab .bottom-title');
if (imgItem.length !== 0) {
$('.recommend-slider .img-item .goods-id').each(function() {
$goodsIdArr.push($(this).html());
});
} else {
$('.bottom-title').eq(0).removeClass('bottom-cur').addClass('hide');
$('.bottom-title').eq(1).addClass('bottom-cur');
$('.bottom-title').filter('.change').addClass('hide');
$bottomTitle.eq(0).removeClass('bottom-cur').addClass('hide');
$bottomTitle.eq(1).addClass('bottom-cur');
$bottomTitle.filter('.change').addClass('hide');
$('#recommend-shop').remove();
$('.individual-comment .latest-walk').show();
... ... @@ -1536,7 +1521,6 @@ function loadRecommend() {
// 页面加载完,埋点
initPageYas();
});
}
// 点击为您推荐商品埋点
... ... @@ -1838,14 +1822,14 @@ $('.bottom-tab').on('click', '.bottom-title', function() {
$recommendComment.slideDown(SLIDETIME);
$latestWalk.slideUp(SLIDETIME);
$('.change').removeClass('hide');
$(this).siblings('.change').removeClass('hide');
} else {
// 最近游览
window.fetchLatestWalk(); // eslint-disable-line
$recommendComment.slideUp(SLIDETIME);
$latestWalk.slideDown(SLIDETIME);
$('.change').addClass('hide');
$(this).siblings('.change').addClass('hide');
}
});
... ... @@ -1969,6 +1953,16 @@ $(function() {
}
});
});
// 猜你喜欢、店铺推荐初始化,
$('.recommend-slider-alike').slider2({
shownum: 5,
isCircle: true
});
$('.recommend-slider').slider2({
shownum: 5,
isCircle: true
});
});
yasAtBottom.yasBottom();
... ...
... ... @@ -346,6 +346,13 @@
padding: 0 10px;
}
}
.police {
background: resolve(layout/police.png) no-repeat;
height: 20px;
display: inline-block;
padding-left: 25px;
}
}
.right-floating-layer {
... ...
... ... @@ -1013,7 +1013,8 @@
}
}
.bottom-tab {
.bottom-tab,
.alike-title {
.bottom-title {
font-size: 15px;
display: inline-block;
... ... @@ -1808,6 +1809,31 @@
}
}
.recommend-keywords {
margin-top: 30px;
margin-bottom: 20px;
border: 1px #e0e0e0 solid;
h3 {
height: 46px;
border-bottom: 1px #e0e0e0 solid;
line-height: 44px;
background: #f5f5f5;
text-align: center;
font-size: 15px;
}
p {
padding: 10px;
a {
display: inline-block;
margin: 5px 15px;
font-size: 12px;
}
}
}
.support-salereturned-service {
$service: product/service.png;
... ... @@ -2096,6 +2122,20 @@
}
}
}
.alike-title {
margin-top: 30px;
}
.alike {
.recommend-content {
height: 340px;
li {
height: 340px;
}
}
}
}
.coupon-big {
... ...
User-Agent: *
Disallow: /passport/
Disallow: /help
Disallow: signin.html
Disallow: reg.html
Disallow: /cart/
... ...