Authored by 石坚

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

列表页不对齐bug修改
... ... @@ -41,7 +41,7 @@ const index = (req, res, next) => {
let appType = 1;
brand.getListData(contentCode, channel, appType).then((result) => {
brand.getListData(contentCode, channel, gender, appType).then((result) => {
res.display('index', {
module: 'brand',
page: 'index',
... ...
... ... @@ -107,8 +107,9 @@ const _getResources = (contentCode) => {
* @param channel
* @returns {*}
*/
const _getBreakingSort = (channel, appType) => {
const _getBreakingSort = (channel, gender, appType) => {
return api.get('', {
gender: gender,
yh_channel: channel,
app_type: appType,
method: 'app.brand.newBrandList'
... ... @@ -126,8 +127,8 @@ const _getBreakingSort = (channel, appType) => {
* 获取品牌一览相关数据
* @returns {*}
*/
const getListData = (contentCode, channel, appType) => {
return Promise.all([_getResources(contentCode), _getBreakingSort(channel, appType)])
const getListData = (contentCode, channel, gender, appType) => {
return Promise.all([_getResources(contentCode), _getBreakingSort(channel, gender, appType)])
.then((result) => {
return {
... ...
... ... @@ -232,7 +232,7 @@ const _getRelatedData = (idList) => {
return productList;
} else {
logger.error('推荐商品 cood 不是 200');
logger.error('推荐商品 code 不是 200');
return {};
}
});
... ...
... ... @@ -8,6 +8,7 @@ const mcHandler = require('../models/menu-crumb-handler');
const addressModel = require('../models/address');
const crypto = global.yoho.crypto;
const config = global.yoho.config;
const logger = global.yoho.logger;
const _ = require('lodash');
... ... @@ -84,7 +85,8 @@ const addAddressData = (req, res, next) => {
addressModel.addAddressData(uid, address, areaCode, consignee, mobile, phone, isInit).then(result => {
if (result.data && result.data.address_id) {
result.data.aid = crypto.encryption(config.crypto.common, result.data.address_id + '');
result.data.address_id = crypto.encryption(config.crypto.common, result.data.address_id + '');
result.data.aid = result.data.address_id;
}
res.send(result);
... ... @@ -95,6 +97,8 @@ const addAddressData = (req, res, next) => {
* 修改地址
*/
const updateAddressData = (req, res, next) => {
logger.info(`address update, address_id decrypt. address_id = ${req.body.id}`);
let id = crypto.decrypt(config.crypto.common, req.body.id);
let uid = req.user.uid;
let address = req.body.address;
... ... @@ -112,6 +116,8 @@ const updateAddressData = (req, res, next) => {
* 删除地址
*/
const delAddressData = (req, res, next) => {
logger.info(`address delete, address_id decrypt. address_id = ${req.body.id}`);
let id = crypto.decrypt(config.crypto.common, req.body.id);
let uid = req.user.uid;
... ... @@ -124,6 +130,8 @@ const delAddressData = (req, res, next) => {
* 设置默认地址
*/
const setDefaultAddress = (req, res) => {
logger.info(`address set default, address_id decrypt. address_id = ${req.body.id}`);
let id = crypto.decrypt(config.crypto.common, req.body.id);
let uid = req.user.uid;
... ...
... ... @@ -5,6 +5,7 @@
<span class="num">您共收藏了{{total}}个品牌</span>
<div class="brands-list clearfix">
{{#each brandList}}
{{#if status}}
<div class="brand-raw clearfix">
<div class="check">
{{> icon/checkbox}}
... ... @@ -71,6 +72,7 @@
{{/if}}
</div>
</div>
{{/if}}
{{/each}}
</div>
... ...
... ... @@ -13,6 +13,7 @@ const _ = require('lodash');
const helper = global.yoho.helpers;
const crypto = global.yoho.crypto;
const config = global.yoho.config;
const logger = global.yoho.logger;
// 结算页面
const index = (req, res, next) => {
... ... @@ -93,6 +94,7 @@ const orderSub = (req, res, next) => {
});
return;
} else {
logger.info(`order submit, address_id decrypt. address_id = ${other.address_id}`);
other.address_id = crypto.decrypt(config.crypto.common, other.address_id);
}
... ...