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
Email Patches
Plain Diff
Browse Files
Authored by
石坚
9 years ago
Commit
989aaace208fb51e576433bc3647000f976cdaa3
1 parent
f0c5ace4
edit camelcase
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
30 deletions
apps/me/controllers/currency.js
apps/me/controllers/favorite.js
apps/me/models/currency.js
apps/me/views/partial/collection/brand.hbs
apps/me/views/partial/collection/editorial.hbs
apps/me/views/partial/collection/product.hbs
doraemon/views/layout.hbs
apps/me/controllers/currency.js
View file @
989aaac
...
...
@@ -61,7 +61,25 @@ const index = (req, res, next) => {
beginTime
:
beginTime
};
}
console
.
log
(
JSON
.
stringify
({
module
:
'me'
,
page
:
'currency'
,
isMe
:
true
,
content
:
{
nav
:
mcHandler
.
getMeCrumb
(
'我的有货币'
),
navigation
:
mcHandler
.
getSideMenu
(
'我的有货币'
),
banner
:
thumb
,
currency
:
true
,
tabs
:
result
[
0
].
list
.
tabs
,
title
:
'我的有货币'
,
currentYear
:
new
Date
().
getFullYear
(),
data
:
result
[
0
].
list
.
coinList
,
paginationOpts
:
result
[
0
].
list
.
paginationOpts
,
num
:
result
[
0
].
num
.
data
,
selects
:
result
[
0
].
list
.
selects
,
total
:
result
[
0
].
list
.
total
?
result
[
0
].
list
.
total
:
0
}
}));
res
.
display
(
'index'
,
{
module
:
'me'
,
page
:
'currency'
,
...
...
apps/me/controllers/favorite.js
View file @
989aaac
...
...
@@ -7,7 +7,6 @@
'use strict'
;
const
_
=
require
(
'lodash'
);
const
camelCase
=
global
.
yoho
.
camelCase
;
const
config
=
global
.
yoho
.
config
;
const
mcHandler
=
require
(
'../models/menu-crumb-handler'
);
const
FavoriteData
=
require
(
'../models/favorite'
);
...
...
@@ -44,7 +43,7 @@ const favorite = {
let
thumb
=
result
[
1
];
if
(
result
[
0
]
&&
result
[
0
].
code
===
200
&&
result
[
0
].
data
)
{
let
data
=
camelCase
(
result
[
0
].
data
);
let
data
=
result
[
0
].
data
;
//
camelCase(result[0].data);
let
retData
=
{
siteUrl
:
config
.
siteUrl
};
...
...
@@ -58,7 +57,7 @@ const favorite = {
queryParams
:
q
};
retData
.
categoryList
=
data
.
category
L
ist
;
retData
.
categoryList
=
data
.
category
_l
ist
;
retData
.
categoryList
.
unshift
({
categoryId
:
''
,
...
...
@@ -70,7 +69,7 @@ const favorite = {
c
.
checked
=
c
.
categoryId
===
sort
;
});
retData
.
products
=
data
.
product
L
ist
.
filter
(
p
=>
{
retData
.
products
=
data
.
product
_l
ist
.
filter
(
p
=>
{
return
!
sort
||
sort
===
p
.
categoryId
;
}).
slice
((
page
-
1
)
*
16
,
page
*
16
);
...
...
@@ -125,7 +124,7 @@ const favorite = {
let
thumb
=
result
[
1
];
if
(
result
[
0
]
&&
result
[
0
].
code
===
200
&&
result
[
0
].
data
)
{
let
data
=
camelCase
(
result
[
0
].
data
);
let
data
=
result
[
0
].
data
;
//
camelCase(result[0].data);
let
retData
=
{
siteUrl
:
config
.
siteUrl
};
...
...
@@ -135,10 +134,10 @@ const favorite = {
page
:
page
,
limit
:
limit
,
total
:
data
.
total
,
pageTotal
:
data
.
page
T
otal
,
pageTotal
:
data
.
page
_t
otal
,
queryParams
:
q
};
retData
.
brandList
=
data
.
brand
L
ist
;
retData
.
brandList
=
data
.
brand
_l
ist
;
if
(
retData
.
brandList
)
{
_
.
each
(
retData
.
brandList
,
b
=>
{
...
...
@@ -195,15 +194,15 @@ const favorite = {
let
thumb
=
result
[
1
];
if
(
result
[
0
]
&&
result
[
0
].
code
===
200
&&
result
[
0
].
data
)
{
let
data
=
camelCase
(
result
[
0
].
data
);
let
data
=
result
[
0
].
data
;
//
camelCase(result[0].data);
let
retData
=
{
siteUrl
:
config
.
siteUrl
,
editorialList
:
data
.
data
};
_
.
forEach
(
retData
.
editorialList
,
function
(
val
)
{
val
.
publishTime
=
val
.
publishTime
.
replace
(
/年|月/g
,
'/'
);
val
.
publishTime
=
val
.
publishTime
.
replace
(
/日/g
,
''
);
val
.
publish_time
=
val
.
publish_time
.
replace
(
/年|月/g
,
'/'
);
val
.
publish_time
=
val
.
publish_time
.
replace
(
/日/g
,
''
);
});
...
...
apps/me/models/currency.js
View file @
989aaac
...
...
@@ -7,7 +7,6 @@
'use strict'
;
const
api
=
global
.
yoho
.
API
;
const
camelCase
=
global
.
yoho
.
camelCase
;
/**
* 有货币列表数据
...
...
@@ -33,7 +32,7 @@ const yohoCoinList = (uid, page, queryType, beginTime) => {
let
curPage
=
1
;
if
(
result
&&
result
.
data
)
{
coinList
=
camelCase
(
result
.
data
.
coinlist
);
coinList
=
result
.
data
.
coinlist
;
//
camelCase(result.data.coinlist);
total
=
result
.
data
.
total
;
curPage
=
result
.
data
.
page
;
}
...
...
apps/me/views/partial/collection/brand.hbs
View file @
989aaac
...
...
@@ -10,16 +10,16 @@
<div
class=
"check"
>
{{>
icon
/
checkbox
}}
</div>
<div
class=
"brand-info"
data-id=
"
{{
brand
I
d
}}
"
data-type=
"
{{
brandOrShopType
}}
"
>
<div
class=
"brand-info"
data-id=
"
{{
brand
_i
d
}}
"
data-type=
"
{{
brandOrShopType
}}
"
>
<div
class=
"brand-icon"
>
<img
src=
"
{{
image
brand
I
co
145
126
}}
"
alt=
""
width=
"145"
height=
"126"
>
<img
src=
"
{{
image
brand
_i
co
145
126
}}
"
alt=
""
width=
"145"
height=
"126"
>
</div>
<div
class=
"brand-name"
>
{{
brand
N
ame
}}
{{
brand
_n
ame
}}
</div>
<div
class=
"tool-area clearfix"
>
<a
class=
"btn white"
href=
"/product/shop/
{{
brand
D
omain
}}{{#if
shopId
}}
?shopId=
{{
shopId
}}{{/if}}
"
href=
"/product/shop/
{{
brand
_d
omain
}}{{#if
shopId
}}
?shopId=
{{
shopId
}}{{/if}}
"
target=
"_blank"
>
去店铺页
</a>
<span
class=
"btn white cancel"
>
取消收藏
</span>
</div>
...
...
@@ -27,7 +27,7 @@
<div
class=
"brand-products slide-container"
>
{{#if
noNewProduct
}}
<p
class=
"no-product-info"
>
暂无新品, 去
<a
href=
"/product/shop/
{{
brand
D
omain
}}{{#if
shopId
}}
?shopId=
{{
shopId
}}{{/if}}
"
target=
"_blank"
>
名牌频道
</a>
看看吧
暂无新品, 去
<a
href=
"/product/shop/
{{
brand
_d
omain
}}{{#if
shopId
}}
?shopId=
{{
shopId
}}{{/if}}
"
target=
"_blank"
>
名牌频道
</a>
看看吧
</p>
{{^}}
<div
class=
"slide-switch"
>
...
...
@@ -45,7 +45,7 @@
{{#
each
this
}}
{{#if
more
}}
<div
class=
"goods-more"
>
<a
href=
"/product/shop/
{{
..
/
..
/
brand
D
omain
}}{{#if
..
/
..
/
shopId
}}
?shopId=
{{
..
/
..
/
shopId
}}{{/if}}
"
<a
href=
"/product/shop/
{{
..
/
..
/
brand
_d
omain
}}{{#if
..
/
..
/
shopId
}}
?shopId=
{{
..
/
..
/
shopId
}}{{/if}}
"
target=
"_blank"
>
<div
class=
"more-text"
>
MORE
</div>
<p>
查看更多
</p>
...
...
@@ -55,11 +55,11 @@
<div
class=
"goods-info"
>
<a
href=
"
{{
url
}}
"
target=
"_blank"
>
<img
class=
"lazy thumb"
src=
"
{{
image
default
I
mages
148
196
}}
"
src=
"
{{
image
default
_i
mages
148
196
}}
"
style=
"display: block;"
>
<div
class=
"desc"
>
<span
class=
"name"
>
{{
productName
}}
</span>
<p
class=
"price"
>
¥
{{
round
salesPrice
2
}}
</p>
<span
class=
"name"
>
{{
product_name
}}
</span>
<p
class=
"price"
>
¥
{{
round
sales_price
2
}}
</p>
</div>
</a>
</div>
...
...
apps/me/views/partial/collection/editorial.hbs
View file @
989aaac
...
...
@@ -23,9 +23,9 @@
</div>
<div
class=
"editorial-some"
>
<span
class=
"author"
>
{{
author
.
name
}}
</span>
<span
class=
"time brown-light"
>
{{
publishTime
}}
</span>
<span>
浏览:
<b
class=
"brown-light"
>
{{
viewsNum
}}
</b></span>
<span>
评论:
<b
class=
"brown-light"
>
{{
praiseNum
}}
</b></span>
<span
class=
"time brown-light"
>
{{
publish_time
}}
</span>
<span>
浏览:
<b
class=
"brown-light"
>
{{
views_num
}}
</b></span>
<span>
评论:
<b
class=
"brown-light"
>
{{
praise_num
}}
</b></span>
</div>
<p
class=
"summer"
>
{{
intro
}}
...
...
apps/me/views/partial/collection/product.hbs
View file @
989aaac
...
...
@@ -28,7 +28,7 @@
<div
class=
"desc"
>
<div
class=
"brand-name"
><a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
{{
brandName
}}
</a></div>
<div
class=
"product-name"
><a
href=
"
{{
https
url
}}
"
target=
"_blank"
>
{{
productName
}}
</a></div>
<p
class=
"price"
>
¥
{{
round
sales
P
rice
2
}}
</p>
<p
class=
"price"
>
¥
{{
round
sales
_p
rice
2
}}
</p>
</div>
<div
class=
"tool-area clearfix"
>
...
...
doraemon/views/layout.hbs
View file @
989aaac
...
...
@@ -15,11 +15,11 @@
<link
rel=
"dns-prefetch"
href=
"//static.yohobuy.com"
>
<link
rel=
"dns-prefetch"
href=
"//img12.static.yhbimg.com"
>
<link
rel=
"dns-prefetch"
href=
"//img13.static.yhbimg.com"
>
{{#
if
devEnv
}}
{{#
unless
devEnv
}}
<link
rel=
"stylesheet"
href=
"//localhost:5003/css/index.css"
>
{{^}}
<link
rel=
"stylesheet"
href=
"//cdn.yoho.cn/yoho-blk/
{{
version
}}
/index.css"
>
{{/
if
}}
{{/
unless
}}
</head>
<body>
{{>
header
}}
...
...
@@ -27,13 +27,13 @@
{{{
body
}}}
{{>
footer
}}
{{#
if
devEnv
}}
{{#
unless
devEnv
}}
<script
src=
"//localhost:5003/libs.js"
></script>
<script
src=
"//localhost:5003/
{{
module
}}
.
{{
page
}}
.js"
></script>
{{^}}
<script
src=
"//cdn.yoho.cn/yoho-blk/
{{
version
}}
/libs.js"
></script>
<script
src=
"//cdn.yoho.cn/yoho-blk/
{{
version
}}
/
{{
module
}}
.
{{
page
}}
.js"
></script>
{{/
if
}}
{{/
unless
}}
{{#
unless
devEnv
}}
{{>
analysis
}}
...
...
Please
register
or
login
to post a comment