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
yyq
9 years ago
Commit
fcacc09742fe2cae08b3e6aa8fbf6a25db41ae30
1 parent
fc61f188
新页面跳转
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
102 additions
and
7 deletions
apps/me/views/partial/refund-detail.hbs
apps/me/views/partial/refund.hbs
doraemon/views/partial/footer.hbs
public/js/common/header.js
public/scss/components/_header.css
public/tpl/common/bag-goods.hbs
apps/me/views/partial/refund-detail.hbs
View file @
fcacc09
{{#
refundDetail
}}
<div
class=
"refund-datail-wrap"
data-id=
"
{{
id
}}
"
>
<a
href=
"/help?id=43"
class=
"refund-notice"
>
退货须知
</a>
<a
href=
"/help?id=43"
class=
"refund-notice"
target=
"_blank"
>
退货须知
</a>
{{>
returns
/
returns-status
}}
{{#
orderReview
}}
...
...
apps/me/views/partial/refund.hbs
View file @
fcacc09
{{#
refund
}}
<div
class=
"refund-wrap"
>
<a
href=
"/help?id=43"
class=
"refund-notice"
>
退货须知
</a>
<a
href=
"/help?id=43"
class=
"refund-notice"
target=
"_blank"
>
退货须知
</a>
{{>
returns
/
returns-status
}}
<h4
class=
"third-title"
>
选择退货商品
</h4>
...
...
doraemon/views/partial/footer.hbs
View file @
fcacc09
...
...
@@ -2,10 +2,10 @@
<div
class=
"center-content"
>
<ul
class=
"about-us clearfix"
>
<li><a
href=
"
{{
siteUrl
}}
"
>
BLK首页
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help"
>
客户服务
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help?id=2"
>
支付方式
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help?id=31"
>
配送方式
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help?id=41"
>
售后服务
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help"
target=
"_blank"
>
客户服务
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help?id=2"
target=
"_blank"
>
支付方式
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help?id=31"
target=
"_blank"
>
配送方式
</a></li>
<li><a
href=
"
{{
siteUrl
}}
/help?id=41"
target=
"_blank"
>
售后服务
</a></li>
</ul>
<div
class=
"record-info"
>
<p>
...
...
public/js/common/header.js
View file @
fcacc09
...
...
@@ -5,13 +5,67 @@
*/
var
$
=
require
(
'yoho-jquery'
);
var
$bagNum
=
$
(
'.bag-num'
),
$bagGoodsList
=
$
(
'.mini-goods-list'
);
var
$searchWrap
=
$
(
'.search-wrapper'
),
$searchForm
=
$
(
'#search-form'
),
$searchKey
=
$
(
'#search-key'
),
$clearInput
=
$
(
'.clear-input'
);
var
goodsTpl
=
require
(
'../../tpl/common/bag-goods.hbs'
);
var
delayer
;
function
handelProduct
(
data
)
{
var
goods
=
[],
list
=
[
'commonPros'
,
'preSalePros'
,
'noStorage'
];
var
i
,
total
=
0
;
for
(
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
data
[
list
[
i
]].
length
)
{
goods
=
goods
.
concat
(
data
[
list
[
i
]]);
}
}
$
.
each
(
goods
,
function
(
key
)
{
total
+=
+
goods
[
key
].
buy_number
||
0
;
});
return
{
total
:
total
,
goods
:
goods
};
}
function
refreshBag
()
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/shopping/cart/data'
,
data
:
{},
success
:
function
(
result
)
{
var
data
;
if
(
result
.
code
===
200
)
{
data
=
handelProduct
(
result
);
if
(
data
.
total
)
{
$bagNum
.
text
(
data
.
total
);
$bagGoodsList
.
html
(
goodsTpl
(
data
));
$bagGoodsList
.
parent
().
removeClass
(
'bag-empty'
);
}
else
{
$bagNum
.
text
(
''
);
$bagGoodsList
.
empty
();
$bagGoodsList
.
parent
().
addClass
(
'bag-empty'
);
}
}
}
})
};
refreshBag
();
$
(
'.yoho-group a'
).
hover
(
function
()
{
var
data
=
$
(
this
).
data
();
...
...
@@ -89,3 +143,7 @@ $(document).click(function(e) {
$searchWrap
.
hide
();
}
});
module
.
exports
=
{
refreshBag
};
...
...
public/scss/components/_header.css
View file @
fcacc09
...
...
@@ -102,7 +102,7 @@
.icon-bag
{
background-image
:
url('/layout/bag.png')
;
line-height
:
2
2
px
;
line-height
:
2
4
px
;
text-align
:
center
;
}
...
...
@@ -166,6 +166,13 @@
background
:
#fff
;
}
.mini-goods-list
{
width
:
340px
;
max-height
:
350px
;
display
:
block
;
overflow-x
:
hidden
;
}
.go-bag-btn
{
font-size
:
20px
;
line-height
:
1
;
...
...
@@ -198,6 +205,15 @@
height
:
64px
;
}
.name
{
width
:
150px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
display
:
block
;
cursor
:
pointer
;
}
.info
{
width
:
160px
;
padding-left
:
10px
;
...
...
@@ -207,6 +223,10 @@
width
:
100px
;
text-align
:
right
;
}
.del-good-btn
{
cursor
:
pointer
;
}
}
}
}
...
...
public/tpl/common/bag-goods.hbs
0 → 100644
View file @
fcacc09
{{#
goods
}}
<dd
class=
"goods-item clearfix"
>
<div
class=
"thumb"
>
<a
href=
"/product/pro_
{{
product_id
}}
_
{{
goods_id
}}
/
{{
cn_alphabet
}}
.html"
target=
"_blank"
>
<img
src=
"
{{
image
goods_images
48
64
}}
"
>
</a>
</div>
<div
class=
"info"
>
<a
href=
"/product/pro_
{{
product_id
}}
_
{{
goods_id
}}
/
{{
cn_alphabet
}}
.html"
class=
"name"
target=
"_blank"
>
{{
product_name
}}
</a>
<p>
颜色:
{{
color_name
}}
尺码:
{{
size_name
}}
</p>
</div>
<div
class=
"price"
>
<p>
¥
{{
round
sales_price
2
}}
X
{{
buy_number
}}
</p>
<span
class=
"del-good-btn"
>
删除
</span>
</div>
</dd>
{{/
goods
}}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment