Authored by 陈峰

Merge branch 'grey' into 'master'

Grey



See merge request !210
... ... @@ -295,6 +295,8 @@ const wechat = {
const sina = {
login: (req, res, next) => {
// 设置为原链接标识originalUrl
req.session.originalUrl = 'true';
req.session.authState = uuid.v4();
return passport.authenticate('sina', {
state: req.session.authState
... ... @@ -321,6 +323,8 @@ const sina = {
const qq = {
login: (req, res, next) => {
// 设置为原链接标识originalUrl
req.session.originalUrl = 'true';
req.session.authState = uuid.v4();
return passport.authenticate('qq', {
state: req.session.authState
... ... @@ -348,6 +352,8 @@ const qq = {
const alipay = {
login: (req, res, next) => {
// 设置为原链接标识originalUrl
req.session.originalUrl = 'true';
return passport.authenticate('alipay')(req, res, next);
},
callback: (req, res, next) => {
... ...
... ... @@ -72,7 +72,15 @@ const _newGoods = (req, res, next) => {
let banner = _.get(result, 'ads[0]', {});
let handPick = _.get(result, 'ads[1]', {});
// console.log(handPick)
if (handPick.data) {
if (handPick.data.length > 2) {
handPick.three = true;
} else if (handPick.data.length === 2) {
handPick.two = true;
} else if (handPick.data.length === 1) {
handPick.one = true;
}
}
res.render('new/index', {
module: 'product',
... ...
... ... @@ -38,8 +38,14 @@
{{/if}}
{{!--精选抢先看--}}
{{#if handPick.data}}
{{> 'new/handpick' swiper=handPick.data}}
{{#if handPick.three}}
{{> 'new/handpick-three' swiper=handPick.data}}
{{/if}}
{{#if handPick.two}}
{{> 'new/handpick-two' swiper=handPick.data}}
{{/if}}
{{#if handPick.one}}
{{> 'new/handpick-one' swiper=handPick.data}}
{{/if}}
{{!--最新上架--}}
... ...
... ... @@ -8,17 +8,17 @@
</header>
<main class="panel-body">
<!-- Slider main container -->
<div class="handpick-swiper swiper-container">
<div class="handpick-swiper-one swiper-container">
<!-- Additional required wrapper -->
<div class="swiper-wrapper">
<!-- Slides -->
{{#each swiper}}
{{# swiper}}
<div class="swiper-slide">
<a href="{{url}}">
<img class="swiper-lazy" data-src="{{image2 src w=332 h=194 q=60}}" alt="">
<img src="{{image2 src w=690 h=220 q=60}}" alt="">
</a>
</div>
{{/each}}
{{/swiper}}
</div>
</div>
</main>
... ...
{{!-- 新品到着: 精选 --}}
<div id="handpick" class="panel handpick">
<header class="panel-header">
<h4>精选抢先看</h4>
{{!--<a href="#javascript" class="panel-header-r more">
<i class="iconfont">&#xe606;</i>
</a>--}}
</header>
<main class="panel-body">
<!-- Slider main container -->
<div class="handpick-swiper-three swiper-container">
<!-- Additional required wrapper -->
<div class="swiper-wrapper">
<!-- Slides -->
{{# swiper}}
<div class="swiper-slide">
<a href="{{url}}">
<img class="swiper-lazy" data-src="{{image2 src w=330 h=220 q=60}}" alt="">
</a>
</div>
{{/swiper}}
</div>
</div>
</main>
</div>
\ No newline at end of file
... ...
{{!-- 新品到着: 精选 --}}
<div id="handpick" class="panel handpick">
<header class="panel-header">
<h4>精选抢先看</h4>
{{!--<a href="#javascript" class="panel-header-r more">
<i class="iconfont">&#xe606;</i>
</a>--}}
</header>
<main class="panel-body">
<!-- Slider main container -->
<div class="handpick-swiper-two swiper-container">
<!-- Additional required wrapper -->
<div class="swiper-wrapper">
<!-- Slides -->
{{# swiper}}
<div class="swiper-slide">
<a href="{{url}}">
<img src="{{image2 src w=330 h=220 q=60}}" alt="">
</a>
</div>
{{/swiper}}
</div>
</div>
</main>
</div>
\ No newline at end of file
... ...
... ... @@ -17,21 +17,21 @@ module.exports = {
assetUrl: '//127.0.0.1:5001',
testCode: 'yoho4946abcdef#$%&!@',
domains: {
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
// imSocket: 'ws://im.yohobuy.com:10240',
// imCs: 'http://im.yohobuy.com/api',
// imServer: 'http://im.yohobuy.com/server'
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
imSocket: 'ws://im.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api',
imServer: 'http://im.yohobuy.com/server'
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/',
imSocket: 'wss://imsocket.yohobuy.com:443',
imCs: 'https://imhttp.yohobuy.com/api',
imServer: 'https://imhttp.yohobuy.com/server'
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
// imSocket: 'wss://imsocket.yohobuy.com:443',
// imCs: 'https://imhttp.yohobuy.com/api',
// imServer: 'https://imhttp.yohobuy.com/server'
},
subDomains: {
host: '.m.yohobuy.com',
... ... @@ -76,7 +76,7 @@ module.exports = {
port: '4444' // influxdb port
},
console: {
level: 'debug',
level: 'info',
colorize: 'all',
prettyPrint: true
}
... ...
{
"name": "m-yohobuy-node",
"version": "5.4.3",
"version": "5.4.4",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -14,7 +14,7 @@ let $callback = $.Callbacks(); // eslint-disable-line
// 是否继续加载数据
let isScroll = true;
new Swiper('.handpick-swiper', {
new Swiper('.handpick-swiper-three', {
// Optional parameters
lazyLoading: true,
lazyLoadingInPrevNext: true,
... ...
/* 精选抢先看 */
.handpick {
.panel-body {
padding-top: 30px;
padding-bottom: 30px;
}
.swiper-wrapper {
align-items: center;
}
.swiper-container {
height: 220px;
height: 185px;
}
.swiper-slide {
width: 300px;
height: 173px;
height: 185px;
background-color: #444;
border-radius: 6px;
overflow: hidden;
}
}
.handpick-swiper-two {
.swiper-slide {
margin-left: 30px;
width: 277px;
}
}
.handpick-swiper-one {
.swiper-slide {
width: 580px;
margin-left: 30px;
}
}
\ No newline at end of file
... ...