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
4a69d62bde8b26abe043b0c0c97788b150b4b288
2 parents
900dba37
4290f93d
Merge branch 'release/1.0' of
http://git.yoho.cn/fe/yoho-blk
into release/1.0
列表页不对齐bug修改
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
6 deletions
apps/brand/controllers/brand.js
apps/brand/models/brand.js
apps/editorial/models/editorial.js
apps/me/controllers/address.js
apps/me/views/partial/collection/brand.hbs
apps/shopping/controllers/order.js
apps/brand/controllers/brand.js
View file @
4a69d62
...
...
@@ -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 @
4a69d62
...
...
@@ -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/editorial/models/editorial.js
View file @
4a69d62
...
...
@@ -232,7 +232,7 @@ const _getRelatedData = (idList) => {
return
productList
;
}
else
{
logger
.
error
(
'推荐商品 co
od
不是 200'
);
logger
.
error
(
'推荐商品 co
de
不是 200'
);
return
{};
}
});
...
...
apps/me/controllers/address.js
View file @
4a69d62
...
...
@@ -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
;
...
...
apps/me/views/partial/collection/brand.hbs
View file @
4a69d62
...
...
@@ -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>
...
...
apps/shopping/controllers/order.js
View file @
4a69d62
...
...
@@ -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