Merge branch 'release/1.0'
Showing
4 changed files
with
15 additions
and
5 deletions
@@ -41,7 +41,7 @@ const index = (req, res, next) => { | @@ -41,7 +41,7 @@ const index = (req, res, next) => { | ||
41 | 41 | ||
42 | let appType = 1; | 42 | let appType = 1; |
43 | 43 | ||
44 | - brand.getListData(contentCode, channel, appType).then((result) => { | 44 | + brand.getListData(contentCode, channel, gender, appType).then((result) => { |
45 | res.display('index', { | 45 | res.display('index', { |
46 | module: 'brand', | 46 | module: 'brand', |
47 | page: 'index', | 47 | page: 'index', |
@@ -107,8 +107,9 @@ const _getResources = (contentCode) => { | @@ -107,8 +107,9 @@ const _getResources = (contentCode) => { | ||
107 | * @param channel | 107 | * @param channel |
108 | * @returns {*} | 108 | * @returns {*} |
109 | */ | 109 | */ |
110 | -const _getBreakingSort = (channel, appType) => { | 110 | +const _getBreakingSort = (channel, gender, appType) => { |
111 | return api.get('', { | 111 | return api.get('', { |
112 | + gender: gender, | ||
112 | yh_channel: channel, | 113 | yh_channel: channel, |
113 | app_type: appType, | 114 | app_type: appType, |
114 | method: 'app.brand.newBrandList' | 115 | method: 'app.brand.newBrandList' |
@@ -126,8 +127,8 @@ const _getBreakingSort = (channel, appType) => { | @@ -126,8 +127,8 @@ const _getBreakingSort = (channel, appType) => { | ||
126 | * 获取品牌一览相关数据 | 127 | * 获取品牌一览相关数据 |
127 | * @returns {*} | 128 | * @returns {*} |
128 | */ | 129 | */ |
129 | -const getListData = (contentCode, channel, appType) => { | ||
130 | - return Promise.all([_getResources(contentCode), _getBreakingSort(channel, appType)]) | 130 | +const getListData = (contentCode, channel, gender, appType) => { |
131 | + return Promise.all([_getResources(contentCode), _getBreakingSort(channel, gender, appType)]) | ||
131 | .then((result) => { | 132 | .then((result) => { |
132 | 133 | ||
133 | return { | 134 | return { |
@@ -7,7 +7,8 @@ | @@ -7,7 +7,8 @@ | ||
7 | const mcHandler = require('../models/menu-crumb-handler'); | 7 | const mcHandler = require('../models/menu-crumb-handler'); |
8 | const addressModel = require('../models/address'); | 8 | const addressModel = require('../models/address'); |
9 | const crypto = global.yoho.crypto; | 9 | const crypto = global.yoho.crypto; |
10 | -const config = global.yoho.config; | 10 | +const config = global.yoho.config |
11 | +const logger = global.yoho.logger; | ||
11 | 12 | ||
12 | const _ = require('lodash'); | 13 | const _ = require('lodash'); |
13 | 14 | ||
@@ -95,6 +96,8 @@ const addAddressData = (req, res, next) => { | @@ -95,6 +96,8 @@ const addAddressData = (req, res, next) => { | ||
95 | * 修改地址 | 96 | * 修改地址 |
96 | */ | 97 | */ |
97 | const updateAddressData = (req, res, next) => { | 98 | const updateAddressData = (req, res, next) => { |
99 | + logger.info(`address update, address_id decrypt. address_id = ${req.body.id}`); | ||
100 | + | ||
98 | let id = crypto.decrypt(config.crypto.common, req.body.id); | 101 | let id = crypto.decrypt(config.crypto.common, req.body.id); |
99 | let uid = req.user.uid; | 102 | let uid = req.user.uid; |
100 | let address = req.body.address; | 103 | let address = req.body.address; |
@@ -112,6 +115,8 @@ const updateAddressData = (req, res, next) => { | @@ -112,6 +115,8 @@ const updateAddressData = (req, res, next) => { | ||
112 | * 删除地址 | 115 | * 删除地址 |
113 | */ | 116 | */ |
114 | const delAddressData = (req, res, next) => { | 117 | const delAddressData = (req, res, next) => { |
118 | + logger.info(`address delete, address_id decrypt. address_id = ${req.body.id}`); | ||
119 | + | ||
115 | let id = crypto.decrypt(config.crypto.common, req.body.id); | 120 | let id = crypto.decrypt(config.crypto.common, req.body.id); |
116 | let uid = req.user.uid; | 121 | let uid = req.user.uid; |
117 | 122 | ||
@@ -124,6 +129,8 @@ const delAddressData = (req, res, next) => { | @@ -124,6 +129,8 @@ const delAddressData = (req, res, next) => { | ||
124 | * 设置默认地址 | 129 | * 设置默认地址 |
125 | */ | 130 | */ |
126 | const setDefaultAddress = (req, res) => { | 131 | const setDefaultAddress = (req, res) => { |
132 | + logger.info(`address set default, address_id decrypt. address_id = ${req.body.id}`); | ||
133 | + | ||
127 | let id = crypto.decrypt(config.crypto.common, req.body.id); | 134 | let id = crypto.decrypt(config.crypto.common, req.body.id); |
128 | let uid = req.user.uid; | 135 | let uid = req.user.uid; |
129 | 136 |
@@ -13,6 +13,7 @@ const _ = require('lodash'); | @@ -13,6 +13,7 @@ const _ = require('lodash'); | ||
13 | const helper = global.yoho.helpers; | 13 | const helper = global.yoho.helpers; |
14 | const crypto = global.yoho.crypto; | 14 | const crypto = global.yoho.crypto; |
15 | const config = global.yoho.config; | 15 | const config = global.yoho.config; |
16 | +const logger = global.yoho.logger; | ||
16 | 17 | ||
17 | // 结算页面 | 18 | // 结算页面 |
18 | const index = (req, res, next) => { | 19 | const index = (req, res, next) => { |
@@ -93,6 +94,7 @@ const orderSub = (req, res, next) => { | @@ -93,6 +94,7 @@ const orderSub = (req, res, next) => { | ||
93 | }); | 94 | }); |
94 | return; | 95 | return; |
95 | } else { | 96 | } else { |
97 | + logger.info(`order submit, address_id decrypt. address_id = ${other.address_id}`); | ||
96 | other.address_id = crypto.decrypt(config.crypto.common, other.address_id); | 98 | other.address_id = crypto.decrypt(config.crypto.common, other.address_id); |
97 | } | 99 | } |
98 | 100 |
-
Please register or login to post a comment