Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
uedxwg
9 years ago
Commit
3bf0374bea5a5c642e44cc7f851b15def056f386
1 parent
78d482c7
'购物车商品详情'
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
5 deletions
static/js/shopping-cart/good.js
static/sass/shopping-cart/_good.scss
template/m.yohobuy.com/actions/index/shoppingCart/index.phtml
template/m.yohobuy.com/partials/shopping-cart/chose-panel.phtml
template/m.yohobuy.com/partials/shopping-cart/good.phtml
static/js/shopping-cart/good.js
View file @
3bf0374
...
...
@@ -6,6 +6,7 @@
var
$
=
require
(
'jquery'
),
ellipsis
=
require
(
'mlellipsis'
),
chosePanel
=
require
(
'../shopping-cart/chose-panel'
),
lazyLoad
=
require
(
'yoho.lazyload'
);
var
dialog
=
require
(
'../me/dialog'
),
...
...
@@ -156,4 +157,32 @@ $('.btn-balance').on('touchend', function() {
window
.
location
.
href
=
'/shoppingCart/orderEnsure?cartType='
+
cartType
;
});
$
(
'.down'
).
on
(
'touchend'
,
function
()
{
chosePanel
.
show
();
});
$
(
'.cut'
).
on
(
'touchend'
,
function
()
{
var
$this
=
$
(
this
),
id
=
$
(
this
).
closest
(
'.shopping-cart-good'
).
data
(
'id'
);
console
.
log
(
id
);
$
.
ajax
({
type
:
'GET'
,
url
:
'/shoppingCart/modify'
,
data
:
{
old_product_sku
:
id
,
new_product_sku
:
id
,
buy_number
:
'0'
,
selected
:
'Y'
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
window
.
history
.
go
(
0
);
}
},
error
:
function
()
{
tip
.
show
(
'网络错误'
);
}
});
});
...
...
static/sass/shopping-cart/_good.scss
View file @
3bf0374
...
...
@@ -151,6 +151,61 @@
}
}
}
.calculate-num
{
float
:
right
;
.calculate
{
float
:
right
;
border
:
1px
solid
#b0b0b0
;
border-radius
:
.2rem
;
p
{
color
:
#444
;
&
:first-child
{
height
:
60rem
/
$pxConvertRem
;
border-bottom
:
1px
solid
#b0b0b0
;
span
{
border-left
:
1px
solid
#b0b0b0
;
border-right
:
1px
solid
#b0b0b0
;
}
}
i
{
width
:
72rem
/
$pxConvertRem
;
height
:
60rem
/
$pxConvertRem
;
float
:
left
;
line-height
:
60rem
/
$pxConvertRem
;
text-align
:
center
;
}
span
{
width
:
96rem
/
$pxConvertRem
;
height
:
60rem
/
$pxConvertRem
;
float
:
left
;
font-size
:
40rem
/
$pxConvertRem
;
line-height
:
60rem
/
$pxConvertRem
;
text-align
:
center
;
}
&
:last-child
{
span
{
width
:
168rem
/
$pxConvertRem
;
overflow
:
hidden
;
font-size
:
48em
/
$pxConvertRem
;
text-overflow
:ellipsis
;
white-space
:nowrap
;
}
}
}
}
.price
{
line-height
:
60rem
/
$pxConvertRem
;
font-size
:
52em
/
$pxConvertRem
;
font-weight
:
bold
;
}
.count
{
position
:
absolute
;
right
:
20rem
/
$pxConvertRem
;;
top
:
20rem
/
$pxConvertRem
;;
font-size
:
52em
/
$pxConvertRem
;
}
}
}
.shopping-cart-good
:last-child
{
...
...
template/m.yohobuy.com/actions/index/shoppingCart/index.phtml
View file @
3bf0374
{
{>
layout/header
}
}
<div
class=
"shopping-cart-page yoho-page"
style=
"display: none;"
>
<div
class=
"shopping-cart-page yoho-page"
>
{
{#
shoppingCart
}
}
{
{#if
cartNav
}
}
<ul
class=
"cart-nav clearfix"
>
...
...
@@ -44,12 +44,13 @@
{
{/
shoppingCart
}
}
</div>
<div
class=
"shopping-cart-zero yoho-page"
>
<div
class=
"shopping-cart-zero yoho-page"
style=
"display: none;"
>
<div
class=
"cart-zero"
>
<i
class=
"iconfont"
>
62
c</i>
<p>您的购物车暂无商品</p>
<a
href=
""
>随便逛逛</a>
</div>
{
{>
product/recommend-for-you
}
}
{
{>
shopping-cart/chose-panel
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/shopping-cart/chose-panel.phtml
View file @
3bf0374
{
{#cartInfo
}
}
<div class="chose-panel">
<div class="main">
<div class="infos">
...
...
@@ -61,4 +61,3 @@
</div>
</div>
</div>
{
{/cartInfo
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/shopping-cart/good.phtml
View file @
3bf0374
...
...
@@ -2,7 +2,7 @@
<span class="checkbox icon-cb-checked iconfont"></span>
<div class="info">
<img class="thumb lazy" data-original={{thumb}}>
<div class="deps">
<
!-- <
div class="deps">
<p class="name row">{{name}}</p>
<p class="row">
{{#if color}}
...
...
@@ -49,6 +49,16 @@
</span>
{{/if}}
</p>
</div> -->
<div class="calculate-num">
<div class="calculate">
<p><i class="iconfont cut"></i><span>{{count}}</span><i class="iconfont add"></i></p>
<p><span>颜色:{{color}}尺码:{{size}}{{name}}</span><i class="iconfont down"></i></p>
</div>
<p><span class="price"> ¥{{price}}</span></p>
<span class="count">
×{{count}}
</span>
</div>
</div>
<!--<div class="opt-panel hide">
...
...
@@ -62,4 +72,5 @@
删除
</div>
</div>-->
</div>
...
...
Please
register
or
login
to post a comment