Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
6fb954d0e68f1cb1efdae82d6e79ddf2ec3534a2
2 parents
5de219ee
2c6b3cbe
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
12 deletions
static/js/cart/chose-panel.js
static/sass/cart/_chose-panel.scss
template/m.yohobuy.com/actions/cart/index/index.phtml
template/m.yohobuy.com/actions/product/detail/index.phtml
template/m.yohobuy.com/partials/cart/cart-content.phtml
static/js/cart/chose-panel.js
View file @
6fb954d
...
...
@@ -277,6 +277,10 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
if
(
num
===
1
||
0
===
leftNum
-
0
)
{
return
;
}
if
(
num
<
1
)
{
$num
.
val
(
1
);
return
;
}
$num
.
val
(
num
-
1
);
}).
on
(
'touchstart'
,
'.btn-plus'
,
function
()
{
...
...
@@ -294,7 +298,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
}
//TODO:库存数验证
if
(
num
>
leftNum
)
{
if
(
num
>
leftNum
-
1
)
{
$num
.
val
(
leftNum
);
return
;
}
...
...
@@ -318,6 +322,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
return
;
}
//TODO status change
if
(
$
(
'#chose-btn-sure'
).
html
()
===
'已售罄'
)
{
return
;
...
...
@@ -329,7 +334,10 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
tip
.
show
(
'您选择的数量超过了最大库存量~'
);
return
;
}
if
(
num
<
0
)
{
tip
.
show
(
'您选择的数量小于一件~'
);
return
;
}
$chosed
=
$
(
'.block-list>ul>li.chosed'
);
if
(
2
===
$chosed
.
length
&&
0
===
$chosed
.
closest
(
'.zero-stock'
).
length
)
{
...
...
static/sass/cart/_chose-panel.scss
View file @
6fb954d
...
...
@@ -39,17 +39,18 @@
.thumb
{
float
:
left
;
width
:
8
0rem
/
$pxConvertRem
;
width
:
10
0rem
/
$pxConvertRem
;
}
.text-info
{
position
:
absolute
;
height
:
auto
;
left
:
pxToRem
(
95px
);
top
:
50%
;
transform
:
translateY
(
-50%
);
.name
{
font-size
:
28rem
/
$pxConvertRem
;
height
:
74rem
/
$pxConvertRem
;
overflow
:
hidden
;
display
:
-
webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.price
{
...
...
template/m.yohobuy.com/actions/cart/index/index.phtml
View file @
6fb954d
...
...
@@ -11,7 +11,7 @@
{
{/if
}
}
{
{#if
isEmptyCart
}
}
<div
class=
"cart-zero"
>
<i
class=
"iconfont"
>
6
2
c
</i>
<i
class=
"iconfont"
>
6
40
;
</i>
<p>您的购物车暂无商品</p>
<a
href=
"/product/new"
>随便逛逛</a>
</div>
...
...
template/m.yohobuy.com/actions/product/detail/index.phtml
View file @
6fb954d
...
...
@@ -118,8 +118,7 @@
{
{#cartInfo
}
}
<div
class=
"cart-bar"
>
<span
class=
"num-tag hide"
></span>
<a
href=
"{{cartUrl}}"
class=
"num-incart iconfont"
>
62
c;</a>
<a
href=
"{{cartUrl}}"
class=
"num-incart iconfont"
><span
class=
"num-tag hide"
></span>
62
c;</a>
{
{#if
addToCartUrl
}
}
<!--
<a
id=
"addtoCart"
href=
"{{addToCartUrl}}"
class=
"addto-cart"
>加入购物车</a>
-->
...
...
template/m.yohobuy.com/partials/cart/cart-content.phtml
View file @
6fb954d
...
...
@@ -16,8 +16,8 @@
<a href="/cart/index/gift?cartType={{cartType}}">
<span class="iconfont"></span>
赠品
<span class="count">{{count}}</span>
<span class="iconfont icon-right-arrow"></span>
<span class="count">{{count}}</span>
</a>
</li>
{{/ freebie}}
...
...
@@ -26,8 +26,8 @@
<a href="/cart/index/advanceBuy?cartType={{cartType}}">
<span class="iconfont"></span>
加价购
<span class="count">{{advanceBuyCount}}</span>
<span class="iconfont icon-right-arrow"></span>
<span class="count">{{advanceBuyCount}}</span>
</a>
</li>
{{/if}}
...
...
Please
register
or
login
to post a comment