Authored by 陈峰

Merge branch 'feature/hotfix' into 'gray'

Feature/hotfix



See merge request !95
... ... @@ -78,7 +78,11 @@ const handleBrandList = origin => {
brands.push({
name: subValue.brand_name_en || subValue.brand_name_cn || subValue.brand_name,
logo: subValue.brand_ico,
domain: subValue.brand_domain
domain: subValue.brand_domain,
shopId: subValue.shop_id,
shopName: subValue.brand_name_en || subValue.brand_name_cn || subValue.brand_name,
isRedShop: subValue.is_red_shop,
shopTemplateType: subValue.shop_template_type
});
});
dest.brandList.push({
... ...
... ... @@ -20,10 +20,7 @@ exports.index = (req, res) => {
/* 查询 产品列表 */
exports.fetchProducts = (req, res, next) => {
const params = req.query;
params.gender = '';
model.products(params)
model.products(req.query)
.then(result => res.json(result))
.catch(next);
};
... ...
... ... @@ -100,7 +100,6 @@ module.exports = {
},
console: {
level: 'debug',
colorize: 'all',
prettyPrint: true,
debugStdout: true
}
... ...
... ... @@ -4,15 +4,11 @@
* @author: Aiden Xu<aiden.xu@yoho.cn>
* @date: 2016/4/27
*/
const channelGender = require('./doraemon/middleware/channel-gender').channelGender;
module.exports = app => {
app.use('/', require('./apps/channel')); // 一级频道模块
// 商品模块
app.use('/'
, channelGender
, require('./apps/product')
);
app.use('/', require('./apps/product'));
app.use('/', require('./apps/me')); // 个人中心
app.use('/api', require('./apps/api')); // 各模块公有 API
app.use('/editorial', require('./apps/editorial')); // 资讯
... ...
{
"name": "yohoblk-wap",
"version": "2.0.42",
"version": "2.0.43",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -114,11 +114,29 @@ const getChannel = function() {
});
};
const miniVersion = function (miniVersion) {
let appVersion = cookie.get('app_version');
let miniVersions = miniVersion.split('.');
if (appVersion && typeof appVersion === 'string') {
let versions = appVersion.split('.');
if (versions.length === 3 &&
(+versions[0] > +miniVersions[0] ||
(+versions[0] === +miniVersions[0] && +versions[1] > +miniVersions[1]) ||
(+versions[0] === +miniVersions[0] && +versions[1] === +miniVersions[1] && +versions[2] >= +miniVersions[2]))) {
return true;
}
}
return false;
};
export default {
getImgHost,
getImgUrl,
applySuccuss,
visibilitychange,
getChannel,
replaceHttp
replaceHttp,
miniVersion
};
... ...
... ... @@ -5,6 +5,7 @@
* @Last Modified time: 2016-08-02 17:42:26
*/
import yoho from 'yoho';
import cookie from 'yoho-cookie';
import util from 'common/util';
function ImgSrcBinding(el, binding) {
... ... @@ -42,32 +43,31 @@ function BrandHrefBinding(el, binding) {
href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
el.href = href;
return;
}
if (yoho.isYohoBuy && !shopId) {
yoho.ready(function () {
yoho.getAppVersion({}, (version) => {
if (version >= '6.5.5') {
let { name } = binding.value;
let goParams = {
action: 'go.searchlist',
params: {
keyword: name
}
};
href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
el.href = href;
} else {
el.href = href;
}
});
if (util.miniVersion('6.5.5')) {
let { name } = binding.value;
let goParams = {
action: 'go.searchlist',
params: {
keyword: name
}
};
href += `?openby:yohobuy=${JSON.stringify(goParams)}`;
el.href = href;
} else {
el.href = href;
}
});
return;
}
el.href = href;
if (!yoho.isYohoBuy) {
el.href = href;
}
} else {
el.href = `/product/shop/${binding.value}`;
}
... ...
... ... @@ -44,6 +44,7 @@ import ResourceNewProductList from 'components/resources/resource-new-product-li
import ResourceTfGoodsList from 'components/resources/resource-tfgoods-list';
import {SearchSlider} from 'components/search';
import {mapState} from 'vuex';
import util from 'common/util';
import {HomeSlider} from './components';
import {REPORT_YAS} from 'store/yoho/types';
import ResourceBox from 'components/resources/resource-box';
... ... @@ -123,17 +124,8 @@ export default {
},
mounted() {
if (this.$yoho.isAndroid) {
let appVersion = this.$cookie.get('app_version');
if (appVersion && typeof appVersion === 'string') {
let versions = appVersion.split('.');
if (versions.length === 3 &&
(+versions[0] > 6 ||
(+versions[0] === 6 && +versions[1] > 5) ||
(+versions[0] === 6 && +versions[1] === 5 && +versions[2] > 1))) {
this.showBack = true;
}
if (util.miniVersion('6.5.2')) {
this.showBack = true;
}
} else {
this.showBack = true;
... ...