Authored by ccbikai

Merge branch 'develop' into feature/sale

... ... @@ -40,7 +40,6 @@ const getUserStatus = (param) => {
var dest = {};
dest.code = param.code;
dest.title = param.data.h5Title;
dest.returnCode = param.data.returnCode;
dest.mobile = param.data.mobile;
if (param.data.returnCode === 0) {
... ...
... ... @@ -18,7 +18,7 @@
<div class="page">
<div class="gain-coupon-centent hidden">
<div class="coupon">
<img src={{couponPic}}>
<img src={{image couponPic}}>
</div>
<p class="phone" id="mobile"></p>
<p>登录Yoho!Buy有货客户端即可使用</p>
... ...
<div class="star-page yoho-page">
{{> star/head-tab}}
<div class="swiper-num swiper-num1"></div>
<div class="swiper-num swiper-num2"></div>
<div class="swiper-num swiper-num3"></div>
<div class="loading-tip">下拉刷新</div>
<div class="star-main">
<div class="main-content">
... ...
... ... @@ -26,7 +26,7 @@ function doPassportCallback(openId, nickname, sourceType, req, res) {
refer = `${config.siteUrl}/home`;
}
if (/sign|login/.test(refer)) {
if (/signin|login/.test(refer)) {
refer = `${config.siteUrl}/home`;
}
if (openId && nickname) {
... ... @@ -55,7 +55,7 @@ const common = {
if (!refer) {
refer = req.get('Referer');
}
refer && res.cookie('refer', encodeURI(refer), {
refer && !/signin|login/.test(refer) && res.cookie('refer', encodeURI(refer), {
domain: 'yohobuy.com'
});
next();
... ...
... ... @@ -54,14 +54,16 @@ class Auth {
let uidCookie = `${data.profile_name}::${data.uid}::${data.vip_info.title}::${token}`;
res.cookie('_UID', uidCookie, {
domain: 'yohobuy.com'
domain: 'yohobuy.com',
expires: new Date(Date.now() + 2592000000) // 有效期一年
});
}
req.session._TOKEN = token;
req.session._LOGIN_UID = uid;
res.cookie('_TOKEN', token, {
domain: 'yohobuy.com'
});
domain: 'yohobuy.com',
expires: new Date(Date.now() + 2592000000) // 有效期一年
}); // esline-disable-line
});
}
}
... ...
... ... @@ -78,7 +78,7 @@ if (isProduction) {
Object.assign(module.exports, {
appName: 'm.yohobuy.com for test',
domains: {
api: 'http://testapi.yoho.cn:28078/',
api: 'http://devapi.yoho.cn:58078/',
service: 'http://testservice.yoho.cn:28077/'
},
memcache: {
... ...
{
"name": "m-yohobuy-node",
"version": "0.1.9",
"version": "0.1.11",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -18,7 +18,9 @@ var $window = $(window),
$headTab = $('.head-tab'),
headTabH = $headTab.height(),
scrollH = $(window).height() - headTabH,
$loadingTip = $('.loading-tip');
$loadingTip = $('.loading-tip'),
u = navigator.userAgent,
isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
/*
$swiperView = $('.swiper-view'),
... ... @@ -33,8 +35,11 @@ var mySwiper;
var avatarKey, bannerLen, res, avatarSwiper, avatarSwiperClone, getIndexHtml,
$avatarClone, $starArticle, $avatarWrap, starIScroll;
var swiperNum = ($('.swiper-num2').width() - $('.swiper-num1').width()) +
($('.swiper-num3').width() - $('.swiper-num1').width()) / 2;
var swiperNum = $('.avatar-wrap .swiper-slide').width() / 2;
if ($window.width() === 375 && isiOS) {
swiperNum = 32;
}
require('../common');
... ... @@ -101,6 +106,7 @@ function setIndexAction() {
if (bannerLen > 1) {
avatarSwiper = new Swiper('.avatar-1', {
loop: true,
initialSlide: 0,
centeredSlides: true,
slidesPerView: 'auto',
loopedSlides: bannerLen,
... ...
... ... @@ -147,10 +147,8 @@
margin-top: 36px;
background: #000;
span {
display: block;
width: 100%;
height: 100%;
a {
border-radius: 5px;
}
}
... ... @@ -416,18 +414,6 @@
top: 0;
z-index: -1;
}
.swiper-num1 {
width: 110px;
}
.swiper-num2 {
width: 130px;
}
.swiper-num3 {
width: 180px;
}
}
.star-index-bg {
... ... @@ -438,3 +424,31 @@
background: #000;
}
}
@media screen and (max-width: 375px) and (min-width: 375px) {
.star-page {
.avatar-wrap {
height: 105PX;
}
.avatar-swiper {
li {
width: 64PX;
height: 64PX;
margin-top: 20.5PX;
}
.swiper-slide-active {
width: 105PX;
height: 105PX;
}
.swiper-slide-prev,
.swiper-slide-next {
width: 76PX;
height: 76PX;
margin-top: 14.5PX;
}
}
}
}
... ...
// 获取 UID
exports.getUid = (req) => {
var _uid = 0,
cookie = req.cookies._UID,
cookieList;
if (req.isApp) {
return req.query.uid || 0;
}
if (cookie) {
cookieList = cookie.split('::');
if (cookieList[1] && !isNaN(cookieList[1])) {
_uid = cookieList[1];
}
}
return _uid;
};