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
4d5cadb28817129ffc835772e761c0379120742f
2 parents
558332f0
c06ee389
merge
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
19 deletions
apps/product/router.js
apps/product/views/action/item.hbs
doraemon/middleware/display.js
doraemon/views/partial/footer.hbs
doraemon/views/partial/header.hbs
doraemon/views/partial/sign-header.hbs
apps/product/router.js
View file @
4d5cadb
...
...
@@ -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 @
4d5cadb
...
...
@@ -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>
...
...
doraemon/middleware/display.js
View file @
4d5cadb
...
...
@@ -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 @
4d5cadb
<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 @
4d5cadb
...
...
@@ -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 @
4d5cadb
...
...
@@ -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>
...
...
Please
register
or
login
to post a comment