Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
徐炜
9 years ago
Commit
6b47230bff97a44af1cefec53607f1ffeef82013
2 parents
5c00ee75
b069f6e9
Merge branch 'release/1.0'
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
apps/brand/controllers/brand.js
apps/brand/models/brand.js
apps/me/controllers/address.js
apps/shopping/controllers/order.js
apps/brand/controllers/brand.js
View file @
6b47230
...
...
@@ -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'
,
...
...
apps/brand/models/brand.js
View file @
6b47230
...
...
@@ -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
{
...
...
apps/me/controllers/address.js
View file @
6b47230
...
...
@@ -7,7 +7,8 @@
const
mcHandler
=
require
(
'../models/menu-crumb-handler'
);
const
addressModel
=
require
(
'../models/address'
);
const
crypto
=
global
.
yoho
.
crypto
;
const
config
=
global
.
yoho
.
config
;
const
config
=
global
.
yoho
.
config
const
logger
=
global
.
yoho
.
logger
;
const
_
=
require
(
'lodash'
);
...
...
@@ -95,6 +96,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 +115,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 +129,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
;
...
...
apps/shopping/controllers/order.js
View file @
6b47230
...
...
@@ -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
);
}
...
...
Please
register
or
login
to post a comment