Merge branch 'master' into feature/defaultOrder
Showing
25 changed files
with
126 additions
and
69 deletions
@@ -7,11 +7,6 @@ | @@ -7,11 +7,6 @@ | ||
7 | 7 | ||
8 | const config = require('./config/common'); | 8 | const config = require('./config/common'); |
9 | 9 | ||
10 | -// use one apm | ||
11 | -if (config.useOneapm) { | ||
12 | - require('oneapm'); | ||
13 | -} | ||
14 | - | ||
15 | const express = require('express'); | 10 | const express = require('express'); |
16 | const path = require('path'); | 11 | const path = require('path'); |
17 | const bodyParser = require('body-parser'); | 12 | const bodyParser = require('body-parser'); |
@@ -41,6 +36,7 @@ app.locals.version = pkg.version; | @@ -41,6 +36,7 @@ app.locals.version = pkg.version; | ||
41 | 36 | ||
42 | app.set('view engine', '.hbs'); | 37 | app.set('view engine', '.hbs'); |
43 | app.set('views', './doraemon/views'); | 38 | app.set('views', './doraemon/views'); |
39 | +app.set('view cache', true); | ||
44 | app.engine('.hbs', hbs({ | 40 | app.engine('.hbs', hbs({ |
45 | extname: '.hbs', | 41 | extname: '.hbs', |
46 | defaultLayout: 'layout', | 42 | defaultLayout: 'layout', |
@@ -70,8 +66,11 @@ app.use(session({ | @@ -70,8 +66,11 @@ app.use(session({ | ||
70 | store: new MemcachedStore({ | 66 | store: new MemcachedStore({ |
71 | hosts: config.memcache.session, | 67 | hosts: config.memcache.session, |
72 | prefix: 'yohobuy_session:', | 68 | prefix: 'yohobuy_session:', |
73 | - timeout: 100, | ||
74 | - retries: 0 | 69 | + poolSize: 25, |
70 | + reconnect: 5000, | ||
71 | + timeout: 1000, | ||
72 | + retries: 1, | ||
73 | + retry: 3000 | ||
75 | }) | 74 | }) |
76 | })); | 75 | })); |
77 | 76 |
@@ -74,6 +74,10 @@ const getUserInfoAPI = (req, res, next) => { | @@ -74,6 +74,10 @@ const getUserInfoAPI = (req, res, next) => { | ||
74 | .catch(next); | 74 | .catch(next); |
75 | }; | 75 | }; |
76 | 76 | ||
77 | +const fakeGetUserInfoAPI = (req, res) => { | ||
78 | + return res.json({code: 200, message: '验证成功'}); | ||
79 | +}; | ||
80 | + | ||
77 | const sendCodePage = (req, res, next) => { | 81 | const sendCodePage = (req, res, next) => { |
78 | let inputInfo = req.inputInfo; | 82 | let inputInfo = req.inputInfo; |
79 | 83 | ||
@@ -357,6 +361,7 @@ const validateMobileInSession = (req, res, next) => { | @@ -357,6 +361,7 @@ const validateMobileInSession = (req, res, next) => { | ||
357 | 361 | ||
358 | module.exports = { | 362 | module.exports = { |
359 | index, // 首页 | 363 | index, // 首页 |
364 | + fakeGetUserInfoAPI, // 通过邮箱或手机号获得用户信息 | ||
360 | getUserInfoAPI, // 通过邮箱或手机号获得用户信息 | 365 | getUserInfoAPI, // 通过邮箱或手机号获得用户信息 |
361 | sendCodePage, // 发送验证码到邮箱或者手机,然后跳转页面 | 366 | sendCodePage, // 发送验证码到邮箱或者手机,然后跳转页面 |
362 | saveInSession, // 保存状态到session中 | 367 | saveInSession, // 保存状态到session中 |
@@ -30,7 +30,7 @@ function doPassportCallback(req, res, user) { | @@ -30,7 +30,7 @@ function doPassportCallback(req, res, user) { | ||
30 | let shoppingKey = cookie.getShoppingKey(req); | 30 | let shoppingKey = cookie.getShoppingKey(req); |
31 | let refer = cookie.getRefer(req, config.siteUrl); | 31 | let refer = cookie.getRefer(req, config.siteUrl); |
32 | 32 | ||
33 | - if (/sign|login/.test(refer)) { | 33 | + if (/sign|login|reg|passport/.test(refer)) { |
34 | refer = config.siteUrl; | 34 | refer = config.siteUrl; |
35 | } | 35 | } |
36 | if (user.openId) { | 36 | if (user.openId) { |
@@ -122,6 +122,13 @@ const local = { | @@ -122,6 +122,13 @@ const local = { | ||
122 | 122 | ||
123 | areaName = area ? area.name : ''; | 123 | areaName = area ? area.name : ''; |
124 | } | 124 | } |
125 | + | ||
126 | + let refer = req.query.refer; | ||
127 | + | ||
128 | + refer && res.cookie('refer', encodeURI(refer), { | ||
129 | + domain: 'yohobuy.com' | ||
130 | + }); | ||
131 | + | ||
125 | PassportHelper.getLeftBannerAsync(SIGNIN_LEFT_BANNER_CODE).then(cover => { | 132 | PassportHelper.getLeftBannerAsync(SIGNIN_LEFT_BANNER_CODE).then(cover => { |
126 | res.render('login', { | 133 | res.render('login', { |
127 | loginPage: true, | 134 | loginPage: true, |
@@ -133,7 +140,7 @@ const local = { | @@ -133,7 +140,7 @@ const local = { | ||
133 | countryName: areaName, | 140 | countryName: areaName, |
134 | countryList: areaArr, | 141 | countryList: areaArr, |
135 | forgetPwd: helpers.urlFormat('/passport/back/index'), | 142 | forgetPwd: helpers.urlFormat('/passport/back/index'), |
136 | - fastReg: helpers.urlFormat('/passport/reg/index'), | 143 | + fastReg: helpers.urlFormat('/reg.html', {refer: refer}), |
137 | weixinLogin: helpers.urlFormat('/passport/autosign/wechat'), | 144 | weixinLogin: helpers.urlFormat('/passport/autosign/wechat'), |
138 | qqLogin: helpers.urlFormat('/passport/autosign/qq'), | 145 | qqLogin: helpers.urlFormat('/passport/autosign/qq'), |
139 | weiboLogin: helpers.urlFormat('/passport/autosign/sina'), | 146 | weiboLogin: helpers.urlFormat('/passport/autosign/sina'), |
@@ -168,10 +175,10 @@ const local = { | @@ -168,10 +175,10 @@ const local = { | ||
168 | } | 175 | } |
169 | 176 | ||
170 | let refer = (function() { | 177 | let refer = (function() { |
171 | - if (_.has(req, 'cookies.refer')) { | ||
172 | - return decodeURI(req.cookies.refer); | ||
173 | - } else if (/sign|login|passport/.test(_.get(req, 'cookies.refer', ''))) { | 178 | + if (/sign|login|reg|passport/.test(_.get(req, 'cookies.refer', ''))) { |
174 | return `${config.siteUrl}/home`; | 179 | return `${config.siteUrl}/home`; |
180 | + } else if (_.has(req, 'cookies.refer')) { | ||
181 | + return decodeURI(req.cookies.refer); | ||
175 | } else { | 182 | } else { |
176 | return `${config.siteUrl}/home`; | 183 | return `${config.siteUrl}/home`; |
177 | } | 184 | } |
@@ -87,7 +87,7 @@ let index = (req, res, next) => { | @@ -87,7 +87,7 @@ let index = (req, res, next) => { | ||
87 | captchaUrl: helpers.urlFormat('/passport/imagesNode', {t: Date.now()}), | 87 | captchaUrl: helpers.urlFormat('/passport/imagesNode', {t: Date.now()}), |
88 | itemUrl: helpers.urlFormat('/help/', {category_id: 143}), | 88 | itemUrl: helpers.urlFormat('/help/', {category_id: 143}), |
89 | referUrl: refer, | 89 | referUrl: refer, |
90 | - loginUrl: helpers.urlFormat('/passport/login', {refer: refer}), | 90 | + loginUrl: helpers.urlFormat('/signin.html', {refer: refer}), |
91 | coverHref: result.url, | 91 | coverHref: result.url, |
92 | coverImg: result.img, | 92 | coverImg: result.img, |
93 | regBtnText: '立即注册' | 93 | regBtnText: '立即注册' |
@@ -115,7 +115,7 @@ const Auth = { | @@ -115,7 +115,7 @@ const Auth = { | ||
115 | 115 | ||
116 | 116 | ||
117 | if (data) { | 117 | if (data) { |
118 | - let uidCookie = `{data.profile_name}::${encryptionUid}::${data.vip_info.title}::${token}`; | 118 | + let uidCookie = `${data.profile_name}::${encryptionUid}::${data.vip_info.title}::${token}`; |
119 | let isStudent = data.vip_info.is_student || 0; | 119 | let isStudent = data.vip_info.is_student || 0; |
120 | 120 | ||
121 | req.session._TOKEN = token; | 121 | req.session._TOKEN = token; |
@@ -27,7 +27,7 @@ router.get('/logout.html', login.local.logout); | @@ -27,7 +27,7 @@ router.get('/logout.html', login.local.logout); | ||
27 | router.post('/passport/login/sms/send', login.local.sms.send); // 发短信验证码 | 27 | router.post('/passport/login/sms/send', login.local.sms.send); // 发短信验证码 |
28 | router.post('/passport/login/sms/auth', login.local.sms.auth); // 验证短信验证码 | 28 | router.post('/passport/login/sms/auth', login.local.sms.auth); // 验证短信验证码 |
29 | router.post('/passport/login/sms/checkuser', login.local.sms.checkUser); // 短信检查用户是否注册 | 29 | router.post('/passport/login/sms/checkuser', login.local.sms.checkUser); // 短信检查用户是否注册 |
30 | -router.post('/passport/login/password/checkuser', back.validateInputAPI, back.getUserInfoAPI);// 密码登录检查用户是否注册 | 30 | +router.post('/passport/login/password/checkuser', back.fakeGetUserInfoAPI);// 假的,密码登录检查用户是否注册 |
31 | 31 | ||
32 | router.get('/passport/login', login.common.beforeLogin, login.local.loginPage); | 32 | router.get('/passport/login', login.common.beforeLogin, login.local.loginPage); |
33 | router.post('/passport/login/auth', login.local.login); | 33 | router.post('/passport/login/auth', login.local.login); |
@@ -24,6 +24,14 @@ const sizeInfoAsync = skn => { | @@ -24,6 +24,14 @@ const sizeInfoAsync = skn => { | ||
24 | 24 | ||
25 | }; | 25 | }; |
26 | 26 | ||
27 | +// 退换支持 | ||
28 | +const isSupportReturnedSale = skn => { | ||
29 | + return api.get('', { | ||
30 | + method: 'app.product.refundExchange', | ||
31 | + product_skn: skn | ||
32 | + }); | ||
33 | +}; | ||
34 | + | ||
27 | const getProductComfortAsync = pid => { | 35 | const getProductComfortAsync = pid => { |
28 | return api.get('', { | 36 | return api.get('', { |
29 | method: 'web.productComfort.data', | 37 | method: 'web.productComfort.data', |
@@ -77,7 +85,8 @@ module.exports = { | @@ -77,7 +85,8 @@ module.exports = { | ||
77 | getProductComfortAsync, | 85 | getProductComfortAsync, |
78 | getProductModelCardAsync, | 86 | getProductModelCardAsync, |
79 | getProductModelTryAsync, | 87 | getProductModelTryAsync, |
80 | - getProductAsync | 88 | + getProductAsync, |
89 | + isSupportReturnedSale | ||
81 | }; | 90 | }; |
82 | 91 | ||
83 | 92 |
@@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
9 | const Promise = require('bluebird'); | 9 | const Promise = require('bluebird'); |
10 | const co = Promise.coroutine; | 10 | const co = Promise.coroutine; |
11 | const moment = require('moment'); | 11 | const moment = require('moment'); |
12 | +const url = require('url'); | ||
12 | const _ = require('lodash'); | 13 | const _ = require('lodash'); |
13 | const helpers = global.yoho.helpers; | 14 | const helpers = global.yoho.helpers; |
14 | 15 | ||
@@ -729,7 +730,7 @@ const _detailDataPkg = (origin, uid, vipLevel) => { | @@ -729,7 +730,7 @@ const _detailDataPkg = (origin, uid, vipLevel) => { | ||
729 | } | 730 | } |
730 | 731 | ||
731 | // 分享相关,产品的链接 | 732 | // 分享相关,产品的链接 |
732 | - result.weixinUrl = helpers.urlFormat(origin.productUrl, {}, 'item'); | 733 | + result.weixinUrl = origin.productUrl; |
733 | result.shareTitle = result.name; | 734 | result.shareTitle = result.name; |
734 | result.shareImg = 'http:' + result.img; // 分享图片必须使用http | 735 | result.shareImg = 'http:' + result.img; // 分享图片必须使用http |
735 | result.shareDesc = result.phrase; | 736 | result.shareDesc = result.phrase; |
@@ -776,10 +777,10 @@ const _detailDataPkg = (origin, uid, vipLevel) => { | @@ -776,10 +777,10 @@ const _detailDataPkg = (origin, uid, vipLevel) => { | ||
776 | } | 777 | } |
777 | } | 778 | } |
778 | 779 | ||
779 | - statGoodsInfo.imageUrl = result.img; | ||
780 | - statGoodsInfo.productUrl = result.weixinUrl; | 780 | + statGoodsInfo.imageUrl = 'http:' + result.img; |
781 | + statGoodsInfo.productUrl = 'http:' + helpers.urlFormat(url.parse(origin.productUrl).pathname, {}, 'item'); | ||
781 | statGoodsInfo.smallSortId = result.smallSortId; | 782 | statGoodsInfo.smallSortId = result.smallSortId; |
782 | - statGoodsInfo.soldOut = parseInt(soldOut); | 783 | + statGoodsInfo.soldOut = soldOut ? 1 : 0; |
783 | 784 | ||
784 | return { | 785 | return { |
785 | goodsInfo: result, | 786 | goodsInfo: result, |
@@ -1338,7 +1339,8 @@ const showMainAsync = (data) => { | @@ -1338,7 +1339,8 @@ const showMainAsync = (data) => { | ||
1338 | let currentUserProductInfo = _.partial(_detailDataPkg, _, data.uid, data.vipLevel); | 1339 | let currentUserProductInfo = _.partial(_detailDataPkg, _, data.uid, data.vipLevel); |
1339 | 1340 | ||
1340 | // 获取商品信息 | 1341 | // 获取商品信息 |
1341 | - let productInfo = yield productAPI.getProductAsync(data.pid, data.uid, data.isStudent, data.vipLevel).then(currentUserProductInfo); | 1342 | + let productInfo = yield productAPI.getProductAsync(data.pid, data.uid, data.isStudent, data.vipLevel) |
1343 | + .then(currentUserProductInfo); | ||
1342 | 1344 | ||
1343 | if (_.isEmpty(productInfo) || _.isEmpty(productInfo.goodsInfo)) { | 1345 | if (_.isEmpty(productInfo) || _.isEmpty(productInfo.goodsInfo)) { |
1344 | return Promise.reject({ | 1346 | return Promise.reject({ |
@@ -1348,7 +1350,8 @@ const showMainAsync = (data) => { | @@ -1348,7 +1350,8 @@ const showMainAsync = (data) => { | ||
1348 | 1350 | ||
1349 | let requestData = yield Promise.all([ | 1351 | let requestData = yield Promise.all([ |
1350 | _getSortNavAsync(productInfo.goodsInfo.smallSortId, data.gender), | 1352 | _getSortNavAsync(productInfo.goodsInfo.smallSortId, data.gender), |
1351 | - HeaderModel.requestHeaderData(data.channel) | 1353 | + HeaderModel.requestHeaderData(data.channel), |
1354 | + productAPI.isSupportReturnedSale(productInfo.goodsInfo.skn) | ||
1352 | ]); | 1355 | ]); |
1353 | 1356 | ||
1354 | // 分类导航 ,seo | 1357 | // 分类导航 ,seo |
@@ -1372,6 +1375,10 @@ const showMainAsync = (data) => { | @@ -1372,6 +1375,10 @@ const showMainAsync = (data) => { | ||
1372 | productInfo.statGoodsInfo | 1375 | productInfo.statGoodsInfo |
1373 | ); | 1376 | ); |
1374 | 1377 | ||
1378 | + // 是否支持退换货,true 支持,false 不支持 | ||
1379 | + result.detail.supportSaleReturnedService = | ||
1380 | + _.get(requestData, `[2].data.${productInfo.goodsInfo.skn}`, 'N') === 'N'; | ||
1381 | + | ||
1375 | // 导航 | 1382 | // 导航 |
1376 | result.detail.pathNav = _.concat( | 1383 | result.detail.pathNav = _.concat( |
1377 | homeService.getHomeChannelNav(data.channel), | 1384 | homeService.getHomeChannelNav(data.channel), |
@@ -402,8 +402,7 @@ exports.getSaleDiscountData = (params, channel) => { | @@ -402,8 +402,7 @@ exports.getSaleDiscountData = (params, channel) => { | ||
402 | if (subResult[0].code === 200) { | 402 | if (subResult[0].code === 200) { |
403 | Object.assign(finalResult, { | 403 | Object.assign(finalResult, { |
404 | leftContent: publicHandler.handleSaleSortData(subResult[0].data.filter.group_sort, | 404 | leftContent: publicHandler.handleSaleSortData(subResult[0].data.filter.group_sort, |
405 | - params, | ||
406 | - 'discount'), | 405 | + params, 'discount'), |
407 | saleList: { | 406 | saleList: { |
408 | footPager: publicHandler.handlePagerData(subResult[0].data.total, params), | 407 | footPager: publicHandler.handlePagerData(subResult[0].data.total, params), |
409 | opts: publicHandler.handleSaleOptsData(params, subResult[0].data.total, 'default') | 408 | opts: publicHandler.handleSaleOptsData(params, subResult[0].data.total, 'default') |
@@ -416,13 +415,20 @@ exports.getSaleDiscountData = (params, channel) => { | @@ -416,13 +415,20 @@ exports.getSaleDiscountData = (params, channel) => { | ||
416 | 415 | ||
417 | // 处理商品数据,顶部分类 | 416 | // 处理商品数据,顶部分类 |
418 | if (subResult[1].code === 200) { | 417 | if (subResult[1].code === 200) { |
418 | + let sknArr = []; | ||
419 | + | ||
419 | finalResult.saleList.goods = productProcess.processProductList(subResult[1].data.product_list); | 420 | finalResult.saleList.goods = productProcess.processProductList(subResult[1].data.product_list); |
420 | finalResult.saleList.totalCount = subResult[1].data.total; | 421 | finalResult.saleList.totalCount = subResult[1].data.total; |
421 | _.forEach(finalResult.saleList.goods, (value, key) => { | 422 | _.forEach(finalResult.saleList.goods, (value, key) => { |
423 | + if (sknArr.length < 3) { | ||
424 | + sknArr.push(value.productSkn); | ||
425 | + } | ||
422 | delete finalResult.saleList.goods[key].tags.isNew; // 屏蔽 new 标签 | 426 | delete finalResult.saleList.goods[key].tags.isNew; // 屏蔽 new 标签 |
423 | delete finalResult.saleList.goods[key].tags.isSale;// 屏蔽 sale 标签 | 427 | delete finalResult.saleList.goods[key].tags.isSale;// 屏蔽 sale 标签 |
424 | delete finalResult.saleList.goods[key].discount; // 屏蔽折扣信息 | 428 | delete finalResult.saleList.goods[key].discount; // 屏蔽折扣信息 |
425 | }); | 429 | }); |
430 | + | ||
431 | + finalResult.criteo = {skn: sknArr}; // 重要:推广列表前三个商品Skn | ||
426 | } else { | 432 | } else { |
427 | logger.error('discount goods list api code no 200'); | 433 | logger.error('discount goods list api code no 200'); |
428 | } | 434 | } |
@@ -632,6 +632,12 @@ | @@ -632,6 +632,12 @@ | ||
632 | </div> | 632 | </div> |
633 | </div> | 633 | </div> |
634 | 634 | ||
635 | + {{#if supportSaleReturnedService}} | ||
636 | + <div class="support-saleReturned-service"></div> | ||
637 | + {{^}} | ||
638 | + <div class="not-support-saleReturned-service"></div> | ||
639 | + {{/if}} | ||
640 | + | ||
635 | <div class="service"></div> | 641 | <div class="service"></div> |
636 | {{#if latestWalk}} | 642 | {{#if latestWalk}} |
637 | <div class="info-block latest-walk"> | 643 | <div class="info-block latest-walk"> |
@@ -698,7 +704,7 @@ | @@ -698,7 +704,7 @@ | ||
698 | _mvq.push(['$addGoods', /*分类id*/ '', /*品牌id*/ '', /*商品名称*/ '', /*商品ID*/ '{{skn}}', /*商品售价*/ '', /*商品图片url*/ '', /*分类名*/ '', /*品牌名*/ '', /*商品库存状态1或是0*/ '', /*网络价*/ '', /*收藏人数*/ '']); | 704 | _mvq.push(['$addGoods', /*分类id*/ '', /*品牌id*/ '', /*商品名称*/ '', /*商品ID*/ '{{skn}}', /*商品售价*/ '', /*商品图片url*/ '', /*分类名*/ '', /*品牌名*/ '', /*商品库存状态1或是0*/ '', /*网络价*/ '', /*收藏人数*/ '']); |
699 | _mvq.push(['$logData']); | 705 | _mvq.push(['$logData']); |
700 | var _goodsData = { | 706 | var _goodsData = { |
701 | - id: '{{skn}}',// 商品ID | 707 | + id: '{{productId}}',// 商品ID |
702 | name: '{{productName}}', // 商品名称 | 708 | name: '{{productName}}', // 商品名称 |
703 | brand: '{{brandName}}', // 商品品牌(非必填) | 709 | brand: '{{brandName}}', // 商品品牌(非必填) |
704 | origPrice: '{{marketPrice}}', // 商品原价(非必填) | 710 | origPrice: '{{marketPrice}}', // 商品原价(非必填) |
@@ -709,6 +715,14 @@ | @@ -709,6 +715,14 @@ | ||
709 | category: '{{fullSortName}}', // 所属分类完整路径, // 所属分类完整路径 | 715 | category: '{{fullSortName}}', // 所属分类完整路径, // 所属分类完整路径 |
710 | soldOut: '{{soldOut}}' // 状态 1下架,0在售(必填) | 716 | soldOut: '{{soldOut}}' // 状态 1下架,0在售(必填) |
711 | }; | 717 | }; |
718 | + | ||
719 | + (function() { | ||
720 | + var mvl = document.createElement('script'); | ||
721 | + mvl.type = 'text/javascript'; mvl.async = true; | ||
722 | + mvl.src = ('https:' == document.location.protocol ? 'https://static-ssl.mediav.com/mvl.js' : 'http://static.mediav.com/mvl.js'); | ||
723 | + var s = document.getElementsByTagName('script')[0]; | ||
724 | + s.parentNode.insertBefore(mvl, s); | ||
725 | + })(); | ||
712 | </script> | 726 | </script> |
713 | {{/statGoodsInfo}} | 727 | {{/statGoodsInfo}} |
714 | 728 |
apps/product/views/partial/common/criteo.hbs
0 → 100644
1 | +{{# criteo}} | ||
2 | + <script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script> | ||
3 | + <script type="text/javascript"> | ||
4 | + window.criteo_q = window.criteo_q || []; | ||
5 | + window.criteo_q.push( | ||
6 | + { event: "setAccount", account: [16184] }, | ||
7 | + { event: "setSiteType", type: "d" }, | ||
8 | + { event: "viewList", item: [{{#each skn}}"{{.}}"{{#unless @last}},{{/unless}}{{/each}}]} | ||
9 | + ); | ||
10 | + </script> | ||
11 | +{{/ criteo}} |
@@ -88,9 +88,11 @@ if (isProduction) { | @@ -88,9 +88,11 @@ if (isProduction) { | ||
88 | master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], | 88 | master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], |
89 | slave: ['memcache1.yohoops.org:12112', 'memcache2.yohoops.org:12112', 'memcache3.yohoops.org:12112'], | 89 | slave: ['memcache1.yohoops.org:12112', 'memcache2.yohoops.org:12112', 'memcache3.yohoops.org:12112'], |
90 | session: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], | 90 | session: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], |
91 | - timeout: 100, | ||
92 | - retries: 0, | ||
93 | - reconnect: 5000 | 91 | + poolSize: 25, |
92 | + reconnect: 5000, | ||
93 | + timeout: 300, | ||
94 | + retries: 1, | ||
95 | + retry: 3000 | ||
94 | }, | 96 | }, |
95 | useOneapm: true, | 97 | useOneapm: true, |
96 | useCache: true, | 98 | useCache: true, |
@@ -40,3 +40,12 @@ var _gaq = _gaq || []; | @@ -40,3 +40,12 @@ var _gaq = _gaq || []; | ||
40 | var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h); | 40 | var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h); |
41 | }(document); | 41 | }(document); |
42 | </script> | 42 | </script> |
43 | +<script> | ||
44 | + var _hmt = _hmt || []; | ||
45 | + (function() { | ||
46 | + var hm = document.createElement("script"); | ||
47 | + hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841"; | ||
48 | + var s = document.getElementsByTagName("script")[0]; | ||
49 | + s.parentNode.insertBefore(hm, s); | ||
50 | + })(); | ||
51 | +</script> |
@@ -43,10 +43,6 @@ | @@ -43,10 +43,6 @@ | ||
43 | <li> | 43 | <li> |
44 | <a href="{{helpHref}}">帮助中心</a> | 44 | <a href="{{helpHref}}">帮助中心</a> |
45 | </li> | 45 | </li> |
46 | - <li> | ||
47 | - <i class="tell-icon iconfont"></i> | ||
48 | - <span>400-8899-646</span> | ||
49 | - </li> | ||
50 | {{/ tool}} | 46 | {{/ tool}} |
51 | </ul> | 47 | </ul> |
52 | </div> | 48 | </div> |
@@ -137,29 +137,29 @@ | @@ -137,29 +137,29 @@ | ||
137 | <div id="foot-mobile"> | 137 | <div id="foot-mobile"> |
138 | <ul class="mobile clearfix"> | 138 | <ul class="mobile clearfix"> |
139 | <li> | 139 | <li> |
140 | - <a href="http://www.yohomars.com/" target="_blank"> | 140 | + <a href="http://www.yoho.cn/product#yoho" target="_blank"> |
141 | {{#if devEnv}} | 141 | {{#if devEnv}} |
142 | - <img class="lazy" data-original="http://localhost:5002/img/layout/mars.png"> | 142 | + <img class="lazy" data-original="http://localhost:5002/img/layout/yoho.png"> |
143 | {{^}} | 143 | {{^}} |
144 | - <img class="lazy" data-original="//cdn.yoho.cn/yohobuy-node/assets/img/layout/mars.png"> | 144 | + <img class="lazy" data-original="//cdn.yoho.cn/yohobuy-node/assets/img/layout/yoho.png"> |
145 | {{/if}} | 145 | {{/if}} |
146 | </a> | 146 | </a> |
147 | </li> | 147 | </li> |
148 | <li> | 148 | <li> |
149 | - <a href="http://app.yohoshow.com/" target="_blank"> | 149 | + <a href="http://www.yohomars.com/" target="_blank"> |
150 | {{#if devEnv}} | 150 | {{#if devEnv}} |
151 | - <img class="lazy" data-original="http://localhost:5002/img/layout/show.png"> | 151 | + <img class="lazy" data-original="http://localhost:5002/img/layout/mars.png"> |
152 | {{^}} | 152 | {{^}} |
153 | - <img class="lazy" data-original="//cdn.yoho.cn/yohobuy-node/assets/img/layout/show.png"> | 153 | + <img class="lazy" data-original="//cdn.yoho.cn/yohobuy-node/assets/img/layout/mars.png"> |
154 | {{/if}} | 154 | {{/if}} |
155 | </a> | 155 | </a> |
156 | </li> | 156 | </li> |
157 | <li> | 157 | <li> |
158 | - <a href="http://www.yoho.cn/product#yoho" target="_blank"> | 158 | + <a href="http://app.yohoshow.com/" target="_blank"> |
159 | {{#if devEnv}} | 159 | {{#if devEnv}} |
160 | - <img class="lazy" data-original="http://localhost:5002/img/layout/yoho.png"> | 160 | + <img class="lazy" data-original="http://localhost:5002/img/layout/show.png"> |
161 | {{^}} | 161 | {{^}} |
162 | - <img class="lazy" data-original="//cdn.yoho.cn/yohobuy-node/assets/img/layout/yoho.png"> | 162 | + <img class="lazy" data-original="//cdn.yoho.cn/yohobuy-node/assets/img/layout/show.png"> |
163 | {{/if}} | 163 | {{/if}} |
164 | </a> | 164 | </a> |
165 | </li> | 165 | </li> |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | </div> | 26 | </div> |
27 | <div class="good-detail-img"> | 27 | <div class="good-detail-img"> |
28 | <a class="good-thumb" href="{{url}}" target="_blank"> | 28 | <a class="good-thumb" href="{{url}}" target="_blank"> |
29 | - <img class="lazy" data-original="{{image thumb 220 300}}"> | 29 | + <img class="lazy" data-original="{{image thumb 280 382}}"> |
30 | </a> | 30 | </a> |
31 | {{# isFew}} | 31 | {{# isFew}} |
32 | <p class="few-tag">即将售罄</p> | 32 | <p class="few-tag">即将售罄</p> |
@@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
75 | </p> | 75 | </p> |
76 | <div class="hideList hide"> | 76 | <div class="hideList hide"> |
77 | {{#goodsList}} | 77 | {{#goodsList}} |
78 | - <li data-src="{{image imagesUrl 235 314}}" data-url="{{../url}}"></li> | 78 | + <li data-src="{{image imagesUrl 280 374}}" data-url="{{../url}}"></li> |
79 | {{/goodsList}} | 79 | {{/goodsList}} |
80 | </div> | 80 | </div> |
81 | </div> | 81 | </div> |
1 | { | 1 | { |
2 | "name": "yohobuy-node", | 2 | "name": "yohobuy-node", |
3 | - "version": "4.9.4", | 3 | + "version": "4.9.7", |
4 | "private": true, | 4 | "private": true, |
5 | "description": "A New Yohobuy Project With Express", | 5 | "description": "A New Yohobuy Project With Express", |
6 | "repository": { | 6 | "repository": { |
@@ -58,8 +58,7 @@ | @@ -58,8 +58,7 @@ | ||
58 | "uuid": "^2.0.2", | 58 | "uuid": "^2.0.2", |
59 | "winston": "^2.2.0", | 59 | "winston": "^2.2.0", |
60 | "winston-daily-rotate-file": "^1.1.4", | 60 | "winston-daily-rotate-file": "^1.1.4", |
61 | - "yoho-express-session": "^1.14.1", | ||
62 | - "yoho-node-lib": "0.0.49" | 61 | + "yoho-node-lib": "0.0.52" |
63 | }, | 62 | }, |
64 | "devDependencies": { | 63 | "devDependencies": { |
65 | "autoprefixer": "^6.3.6", | 64 | "autoprefixer": "^6.3.6", |
public/img/product/limit.png
0 → 100644
25.2 KB
@@ -120,26 +120,7 @@ var LoginType = { | @@ -120,26 +120,7 @@ var LoginType = { | ||
120 | PasswordLogin: { | 120 | PasswordLogin: { |
121 | ele: '.password-login', | 121 | ele: '.password-login', |
122 | validateAccountAsync: function() { | 122 | validateAccountAsync: function() { |
123 | - return $.ajax({ | ||
124 | - url: '/passport/login/password/checkuser', | ||
125 | - type: 'POST', | ||
126 | - data: { | ||
127 | - phoneNum: getAccountVal1(), | ||
128 | - area: getAreaCodeVal() | ||
129 | - } | ||
130 | - }).then(function(result) { | ||
131 | - var defer = $.Deferred(); // eslint-disable-line | ||
132 | - | ||
133 | - if (result.code === 200) { | ||
134 | - hideAccountTip1(); // eslint-disable-line | ||
135 | - defer.resolve(); | ||
136 | - } else { | ||
137 | - showAccountTip1(result.message); // eslint-disable-line | ||
138 | - defer.reject(); | ||
139 | - } | ||
140 | - | ||
141 | - return defer.promise(); | ||
142 | - }); | 123 | + return $.Deferred().resolve().promise(); // eslint-disable-line |
143 | }, | 124 | }, |
144 | validateAccountLocal: validateAccountPasswordLocal, // eslint-disable-line | 125 | validateAccountLocal: validateAccountPasswordLocal, // eslint-disable-line |
145 | creditableToken: getPasswordVal, | 126 | creditableToken: getPasswordVal, |
@@ -446,7 +446,7 @@ $rightDia.on('click', function() { | @@ -446,7 +446,7 @@ $rightDia.on('click', function() { | ||
446 | '<p>权益1:新品立享9折</p>' + | 446 | '<p>权益1:新品立享9折</p>' + |
447 | '<p>学生购买原价新品时,可立即享受9折优惠,与VIP折扣不可同时享受。</p><br>' + | 447 | '<p>学生购买原价新品时,可立即享受9折优惠,与VIP折扣不可同时享受。</p><br>' + |
448 | '<p>权益2:每1元返1个有货币</p>' + | 448 | '<p>权益2:每1元返1个有货币</p>' + |
449 | - '<p>学生购买商品时,以商品的实际成交金额计算,每1元返1个有货币;</p>' + | 449 | + '<p>学生购买指定商品时,以商品的实际成交金额计算,每1元返1个有货币;</p>' + |
450 | '<p>返有货币时间:确认收货7日后,系统将自动将对应数量的有货币返至购买账户;</p>' + | 450 | '<p>返有货币时间:确认收货7日后,系统将自动将对应数量的有货币返至购买账户;</p>' + |
451 | '<p>有货币有效期:获得当日至次年12月31日,逾期自动作废;</p>' + | 451 | '<p>有货币有效期:获得当日至次年12月31日,逾期自动作废;</p>' + |
452 | '<p>查看有货币:登录后,点击“个人中心”在“我的有货币”中可以查看有货币余额及明细。</p><br>' + | 452 | '<p>查看有货币:登录后,点击“个人中心”在“我的有货币”中可以查看有货币余额及明细。</p><br>' + |
@@ -984,7 +984,7 @@ | @@ -984,7 +984,7 @@ | ||
984 | } | 984 | } |
985 | } | 985 | } |
986 | 986 | ||
987 | - .service { | 987 | + .support-saleReturned-service { |
988 | $service: product/service.png; | 988 | $service: product/service.png; |
989 | 989 | ||
990 | width: width($service); | 990 | width: width($service); |
@@ -993,6 +993,14 @@ | @@ -993,6 +993,14 @@ | ||
993 | background: resolve($service); | 993 | background: resolve($service); |
994 | } | 994 | } |
995 | 995 | ||
996 | + .not-support-saleReturned-service { | ||
997 | + $service: product/limit.png; | ||
998 | + width: width($service); | ||
999 | + height: height($service); | ||
1000 | + margin: 45px auto; | ||
1001 | + background: resolve($service); | ||
1002 | + } | ||
1003 | + | ||
996 | .latest-walk { | 1004 | .latest-walk { |
997 | overflow: inherit; | 1005 | overflow: inherit; |
998 | 1006 |
1 | 'use strict'; | 1 | 'use strict'; |
2 | const _ = require('lodash'); | 2 | const _ = require('lodash'); |
3 | +const fp = require('lodash/fp'); | ||
3 | 4 | ||
4 | const camelCase = global.yoho.camelCase; | 5 | const camelCase = global.yoho.camelCase; |
5 | const helpers = global.yoho.helpers; | 6 | const helpers = global.yoho.helpers; |
6 | const images = require(`${global.utils}/images`); | 7 | const images = require(`${global.utils}/images`); |
7 | 8 | ||
9 | +// NOTE: 这里修改了图片质量的参数 | ||
10 | +helpers.image = _.flow(helpers.image, fp.replace(/\/quality\/\d*$/, '/quality/90')); | ||
11 | + | ||
8 | /** | 12 | /** |
9 | * 根据性别来决定 默认图片获取字段 如果是 2、3 | 13 | * 根据性别来决定 默认图片获取字段 如果是 2、3 |
10 | * | 14 | * |
@@ -20,7 +24,6 @@ const procProductImg = (product, gender) => { | @@ -20,7 +24,6 @@ const procProductImg = (product, gender) => { | ||
20 | return product.cover1 || product.cover2 || product.imagesUrl || ''; | 24 | return product.cover1 || product.cover2 || product.imagesUrl || ''; |
21 | }; | 25 | }; |
22 | 26 | ||
23 | - | ||
24 | /** | 27 | /** |
25 | * 处理列表大图周边小图数据,拼接添加 href | 28 | * 处理列表大图周边小图数据,拼接添加 href |
26 | * @param origin goods 原始数据 | 29 | * @param origin goods 原始数据 |
-
Please register or login to post a comment