Authored by 梁志锋

Merge remote-tracking branch 'remotes/origin/hotfix/memcachebug'

... ... @@ -13,7 +13,7 @@ const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser');
const favicon = require('serve-favicon');
const yohoLib = require('yoho-node-lib');
const session = require('express-session');
const session = require('yoho-express-session');
const memcached = require('connect-memcached');
const hbs = require('express-handlebars');
const pkg = require('./package.json');
... ... @@ -64,7 +64,9 @@ app.use(session({
},
store: new MemcachedStore({
hosts: config.memcache.session,
prefix: 'yohobuy_session:'
prefix: 'yohobuy_session:',
timeout: 1000,
retries: 0
})
}));
... ...
... ... @@ -38,7 +38,7 @@ const _article = (param) => {
sort_id: param.type ? param.type : 1,
tag: param.tag ? param.tag : null,
author_id: param.authorId ? param.authorId : null,
limit: param.limit ? param.limit : null,
limit: param.limit ? param.limit : null
}, {
code: 200
}).then(result => {
... ...
... ... @@ -110,7 +110,7 @@ const _processIndexData = (dataList) => {
let url = `/guang/star/detail?tag=${data.tagName}&openby:yohobuy{"action":"go.h5","params":{"id":"","share":"","shareparam":{},"islogin":"N","type":0,"updateflag":"N","url":"http://m.yohobuy.com/guang/star/detail","param":{"tag":"${data.tagName}"}}}`; // eslint-disable-line
formatData.starAvatar.push({
//noLazy: index < 6,
// noLazy: index < 6,
url: url,
cover: data.cover ? (data.cover + '?imageView2/2/w/180/h/180') : data.cover
});
... ...
... ... @@ -87,7 +87,8 @@ if (isProduction) {
master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
slave: ['memcache1.yohoops.org:12112', 'memcache2.yohoops.org:12112', 'memcache3.yohoops.org:12112'],
session: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
timeout: 100,
reconnect: 5000,
timeout: 1000,
retries: 0
},
useCache: true,
... ... @@ -110,6 +111,7 @@ if (isProduction) {
slave: ['127.0.0.1:12112'],
session: ['127.0.0.1:12111'],
timeout: 100,
reconnect: 5000,
retries: 0
},
useCache: true
... ...
... ... @@ -37,7 +37,6 @@
"cookie-parser": "^1.4.3",
"express": "^4.14.0",
"express-handlebars": "^3.0.0",
"express-session": "^1.14.0",
"influxdb-winston": "^1.0.1",
"lodash": "^4.15.0",
"md5": "^2.1.0",
... ... @@ -55,6 +54,7 @@
"uuid": "^2.0.2",
"winston": "^2.2.0",
"winston-daily-rotate-file": "^1.2.0",
"yoho-express-session": "^1.14.1",
"yoho-node-lib": "0.0.49"
},
"devDependencies": {
... ...
... ... @@ -8,7 +8,7 @@ var swiper = new Swiper('.tab .swiper-container', {
lazyLoadingInPrevNext: true,
paginationClickable: true,
loop: true,
autoplay: 3000,
autoplay: 3000
});
require('lodash/commit');
... ...
... ... @@ -320,6 +320,8 @@ function givePoint(parameter) {
case 'lifestyle':
CID = 4;
break;
default:
CID = 1;
}
parameter = $.extend({
... ...
... ... @@ -257,8 +257,9 @@ starIScroll.iScroll.on('scrollStart', function() {
bannerSwiper && bannerSwiper.stopAutoplay();
});
starIScroll.iScroll.on('scroll', function() {
$window.trigger('scroll');
starIScroll.iScroll.on('scroll', function() {
$window.trigger('scroll');
// var avatarOffsetT;
//
// if (this.directionY !== -1) {
... ... @@ -300,7 +301,7 @@ starIScroll.iScroll.on('scrollStart', function() {
// } else {
// $avatarClone.hide();
// }
});
});
starIScroll.iScroll.on('scrollEnd', function() {
// $loadingTip.slideUp();
... ...
... ... @@ -103,7 +103,7 @@ var page = {
$.get('/passport/sms_login/token.json', {
area: area,
mobile: mobile,
mobile: mobile
})
.done(function(res) {
if (res.code === 200) {
... ...