Authored by xuqi

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

... ... @@ -34,7 +34,10 @@ const _doPassportCallback = (req, res, user) => {
if (user.openId && user.nickname) {
let signinByOpenID = LoginService.signinByOpenIDAsync(
user.nickname, user.openId, user.sourceType, shoppingKey, user.unionId);
_.trim(user.nickname), _.trim(user.openId),
_.trim(user.sourceType), _.trim(shoppingKey),
_.trim(user.unionId)
);
return signinByOpenID.then((result) => {
if (result.code !== 200) {
... ...
... ... @@ -17,6 +17,7 @@ const Query = {
index: (req, res, next) => {
let q = req.query;
let query = q.query || '';
let channel = req.cookies._Channel || req.query._Channel || 'men';
q.page = parseInt(q.page || 1, 10);
q.order = q.order || 's_n_desc';
... ... @@ -36,7 +37,7 @@ const Query = {
if (result && result.code === 200 && result.data) {
let data = camelCase(result.data);
let nav = [DataHelper.getChannelNav()];
let nav = [DataHelper.getChannelNav(channel)];
nav.push({
name: query ? `"${query}" ${data.total}个结果` : `共${data.total}个结果`
... ...
... ... @@ -36,6 +36,19 @@ function _paramHanlde(obj) {
obj.standard_value_id = standards[1];
}
if (obj.channel) {
switch (obj.channel) {
case 'men':
obj.gender = '1,3';
break;
case 'women':
obj.gender = '2,3';
break;
default:
break;
}
}
return obj;
}
... ...
... ... @@ -135,7 +135,7 @@ const ShopService = {
info.shopId = shopId;
info.name = shopIntro.shopName;
info.info = shopIntro.shopIntro;
info.btnName = '店铺介绍';
info.btnName = '品牌介绍';
info.isFavorite = shopIntro.isFavorite === 'Y';
let shopData = yield Promise.all([ShopService.getShopDecorator(shopId),
... ...
... ... @@ -91,6 +91,10 @@ $('.yoho-group a').hover(function() {
$(this).text(data.en);
});
$('.tag-bag').hover(function() {
refreshBag();
});
$bagGoodsList.on('click', '.del-good-btn', function() {
var $this = $(this),
data = $this.data();
... ...
... ... @@ -253,14 +253,15 @@ $('#keep-shopping').click(function() {
$('#brand-fav').click(function() {
var $this = $(this),
info = $this.data(),
param = {};
param = {
brandId: $this.data('id'),
type: 'add'
};
if (!info.id) {
if (!param.brandId) {
return;
}
param.brandId = info.id;
if ($this.hasClass('coll')) {
param.type = 'cancel';
}
... ...