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
xuqi
9 years ago
Commit
a1717be676e9f923abd28ac51ef09a06f99baaad
2 parents
d27a6a05
dc092ba4
Merge branch 'release/1.0' of
http://git.yoho.cn/fe/yoho-blk
into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
39 additions
and
31 deletions
apps/product/models/helpers.js
apps/product/router.js
apps/product/views/action/item.hbs
apps/product/views/partial/list/filter.hbs
apps/product/views/partial/list/order-area.hbs
doraemon/middleware/display.js
doraemon/views/partial/footer.hbs
doraemon/views/partial/header.hbs
doraemon/views/partial/sign-header.hbs
public/js/product/list/list-search.js
public/js/product/shop.page.js
public/scss/product/_list.css
apps/product/models/helpers.js
View file @
a1717be
...
...
@@ -211,11 +211,11 @@ const helpers = {
goodsId
=
goodsList
[
0
].
goodsId
;
goodsList
.
forEach
(
o
=>
{
o
.
url
=
`
$
{
config
.
siteUrl
}
/product/
i
tem
/
$
{
g
.
productId
}
_$
{
o
.
goodsId
}.
html
`
;
o
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
g
.
productId
}
_$
{
o
.
goodsId
}
/${o.cnAlphabet
}.html`
;
});
}
g
.
url
=
`
$
{
config
.
siteUrl
}
/product/
i
tem
/
$
{
g
.
productId
}
_$
{
goodsId
}.
html
`
;
g
.
url
=
`
$
{
config
.
siteUrl
}
/product/
pro_$
{
g
.
productId
}
_$
{
goodsId
}
/${g.cnAlphabet
}.html`
;
});
}
return
list
;
...
...
apps/product/router.js
View file @
a1717be
...
...
@@ -18,7 +18,7 @@ const query = require(cRoot + '/query');
router
.
get
(
'/list'
,
list
.
index
);
// 列表页面
router
.
get
(
'/list/new'
,
list
.
newPage
);
// 新品列表页
router
.
get
(
/
\/
item
\/([\d]
+
)
_
([\d]
+
)
.html/
,
item
.
index
);
// 商品详情页
router
.
get
(
/
\/
pro_
([\d]
+
)
_
([\d]
+
)\/(
.*
)
/
,
item
.
index
);
// 商品详情routers
router
.
post
(
'/item/togglecollect'
,
fav
.
product
);
// 商品详情页
router
.
get
(
'/shop/:domain/list'
,
shop
.
list
);
...
...
apps/product/views/action/item.hbs
View file @
a1717be
...
...
@@ -115,7 +115,7 @@
</span>
{{/if}}
{{/
unless
}}
<span
id=
"sold-out"
class=
"btn disable
hide
"
>
已售罄
</span>
<span
id=
"sold-out"
class=
"btn disable
{{#
unless
soldOut
}}
hide
{{/
unless
}}
"
>
已售罄
</span>
<span
id=
"collect-product"
class=
"btn white
{{#if
productFav
}}
coll
{{/if}}
"
>
<span
class=
"collecting"
>
<i
class=
"iconfont"
>

</i>
...
...
apps/product/views/partial/list/filter.hbs
View file @
a1717be
...
...
@@ -82,12 +82,12 @@
{{/
each
}}
<div
class=
"price-btns"
>
<div
class=
"price-input inline-block"
>
<span
>
¥
</span>
<span
class=
"iconfont"
>

</span>
<input
type=
"text"
class=
"price-low"
value=
"
{{
customPriceLow
}}
"
>
</div>
<span>
-
</span>
<div
class=
"price-input inline-block"
>
<span
>
¥
</span>
<span
class=
"iconfont"
>

</span>
<input
type=
"text"
class=
"price-high"
value=
"
{{
customPriceHigh
}}
"
>
</div>
<span
class=
"btn large confirm"
>
确定
</span>
...
...
apps/product/views/partial/list/order-area.hbs
View file @
a1717be
...
...
@@ -13,7 +13,7 @@
共
<span>
{{
total
}}
</span>
件商品
</label>
<label
class=
"page-info"
><span
class=
"cur-page"
>
{{
page
}}
</span>
/
<span
class=
"total-page"
>
{{
pageTotal
}}
</span></label>
{{#
isEqual
page
'1'
}}
{{#
isEqual
page
1
}}
<span
class=
"iconfont page disable page-pre"
>

</span>
{{^}}
<span
class=
"iconfont page page-pre"
>

</span>
...
...
doraemon/middleware/display.js
View file @
a1717be
...
...
@@ -7,12 +7,15 @@
'use strict'
;
const
_
=
require
(
'lodash'
);
const
header
=
require
(
'../models/header'
);
const
helpers
=
global
.
yoho
.
helpers
;
module
.
exports
=
()
=>
{
return
(
req
,
res
,
next
)
=>
{
res
.
display
=
(
path
,
data
)
=>
{
let
isHead
=
true
;
data
.
siteUrl
=
helpers
.
urlFormat
(
''
);
// 判断是否隐藏公共布局
if
(
_
.
isBoolean
(
data
.
layout
)
&&
!
data
.
layout
)
{
isHead
=
false
;
...
...
doraemon/views/partial/footer.hbs
View file @
a1717be
<div
class=
"blk-footer"
>
<div
class=
"center-content"
>
<ul
class=
"about-us clearfix"
>
<li><a
href=
"#"
>
BLK首页
</a></li>
<li><a
href=
"#"
>
客户服务
</a></li>
<li><a
href=
"#"
>
支付方式
</a></li>
<li><a
href=
"#"
>
配送方式
</a></li>
<li><a
href=
"#"
>
售后服务
</a></li>
<li><a
href=
"
{{
siteUrl
}}
"
>
BLK首页
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help"
>
客户服务
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/#"
>
支付方式
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/#"
>
配送方式
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/#"
>
售后服务
</a></li>
</ul>
<div
class=
"record-info"
>
<p>
...
...
doraemon/views/partial/header.hbs
View file @
a1717be
...
...
@@ -17,18 +17,18 @@
<li>
{{#if
userName
}}
Hi~
<a
href=
"//www.yohoblk.com/me"
>
{{
userName
}}
</a>
<a
href=
"//www.yohoblk.com/passport/logout"
>
[退出]
</a>
<a
href=
"
{{
..
/
siteUrl
}}
/me"
>
{{
userName
}}
</a>
<a
href=
"
{{
..
/
siteUrl
}}
/passport/logout"
>
[退出]
</a>
{{^}}
<a
href=
"//www.yohoblk.com/passport/login"
>
登录
</a>
|
<a
href=
"//www.yohoblk.com/passport/reg/index"
>
注册
</a>
<a
href=
"
{{
..
/
siteUrl
}}
/passport/login"
>
登录
</a>
|
<a
href=
"
{{
..
/
siteUrl
}}
/passport/reg"
>
注册
</a>
{{/if}}
</li>
<li>
<a
href=
"
#
"
>
个人中心
</a>
<a
href=
"
{{
..
/
siteUrl
}}
/me
"
>
个人中心
</a>
</li>
<li>
<a
href=
"
#
"
>
帮助中心
</a>
<a
href=
"
{{
..
/
siteUrl
}}
/help
"
>
帮助中心
</a>
</li>
<li
class=
"tag-phone"
>
<span
class=
"tools-icon icon-phone"
></span>
...
...
doraemon/views/partial/sign-header.hbs
View file @
a1717be
...
...
@@ -4,14 +4,14 @@
<ul
class=
"header-tools right clearfix"
>
{{#if
userName
}}
Hi~
<a
href=
"//www.yohoblk.com/me"
>
{{
userName
}}
</a>
<a
href=
"//www.yohoblk.com/passport/logout"
>
[退出]
</a>
<a
href=
"
{{
siteUrl
}}
/me"
>
{{
userName
}}
</a>
<a
href=
"
{{
siteUrl
}}
/passport/logout"
>
[退出]
</a>
{{^}}
<a
href=
"//www.yohoblk.com/passport/login"
>
登录
</a>
|
<a
href=
"//www.yohoblk.com/passport/reg/index"
>
注册
</a>
<a
href=
"
{{
siteUrl
}}
/passport/login"
>
登录
</a>
|
<a
href=
"
{{
siteUrl
}}
/passport/reg"
>
注册
</a>
{{/if}}
<li><a
href=
"//www.yohoblk.com"
>
首页
</a></li>
<li><a
href=
"//www.yohoblk.com/help"
>
帮助中心
</a></li>
<li><a
href=
"
{{
siteUrl
}}
"
>
首页
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help"
>
帮助中心
</a></li>
<li>
客服电话
<span>
400-9889-9646
</span></li>
</ul>
</div>
...
...
public/js/product/list/list-search.js
View file @
a1717be
...
...
@@ -4,6 +4,7 @@ var common = require('../../common');
var
query
=
common
.
queryString
();
var
YohoListPage
=
{
rootDoc
:
$
(
'.yoho-product-list'
),
brandsDoc
:
$
(
'.yoho-product-list .brand-list'
),
...
...
@@ -16,7 +17,7 @@ var YohoListPage = {
require
(
'yoho-jquery-nanoscroller'
);
require
(
'../../plugins/check'
);
require
(
'../../common/return-top'
);
require
(
'../../common/header'
);
lazyload
();
$
(
'.nano'
).
nanoScroller
();
$
(
'.yoho-ui-accordion'
,
this
.
rootDoc
).
each
(
function
()
{
...
...
public/js/product/shop.page.js
View file @
a1717be
var
lazyload
=
require
(
'yoho-jquery-lazyload'
);
require
(
'../common/header'
);
lazyload
();
...
...
public/scss/product/_list.css
View file @
a1717be
...
...
@@ -120,24 +120,26 @@
width
:
72px
;
height
:
38px
;
line-height
:
38px
;
position
:
relative
;
vertical-align
:
bottom
;
span
{
height
:
36px
;
line-height
:
36px
;
margin-top
:
1px
;
height
:
30px
;
line-height
:
30px
;
margin-top
:
5px
;
display
:
inline-block
;
padding
:
0
3px
;
}
input
{
border
:
0
;
background-color
:
transparent
;
width
:
50
px
;
width
:
45
px
;
height
:
38px
;
line-height
:
38px
;
padding
:
0
;
font-size
:
14px
;
font-family
:
'BrownStd'
,
'黑体'
;
float
:
right
;
font-weight
:
700
;
}
}
...
...
Please
register
or
login
to post a comment