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
Email Patches
Plain Diff
Browse Files
Authored by
uedxwg
9 years ago
Commit
f7aabc35b1268d00877ace8452343054cbd42f1c
1 parent
75b171dc
'购物车数量修改'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
static/js/cart/chose-panel.js
static/sass/cart/_chose-panel.scss
template/m.yohobuy.com/partials/cart/chose-panel.phtml
static/js/cart/chose-panel.js
View file @
f7aabc3
...
...
@@ -278,8 +278,14 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
}
//TODO:库存数验证
if
(
num
>
leftNum
)
{
$num
.
val
(
leftNum
);
return
;
}
$num
.
val
(
num
+
1
);
}).
on
(
'touchstart'
,
'#chose-btn-sure'
,
function
()
{
});
$yohoPage
.
on
(
'touchstart'
,
'#chose-btn-sure'
,
function
()
{
var
productSku
,
buyNumber
=
$
(
'#good-num'
).
val
()
-
0
,
...
...
@@ -293,6 +299,10 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
if
(
!
checkColorSizeNum
())
{
return
;
}
if
(
isNaN
(
num
))
{
tip
.
show
(
'您选择的数量不是一个数字~'
);
return
;
};
//TODO status change
if
(
$
(
'#chose-btn-sure'
).
html
()
===
'已售罄'
)
{
...
...
static/sass/cart/_chose-panel.scss
View file @
f7aabc3
...
...
@@ -73,7 +73,10 @@
position
:
relative
;
font-size
:
28rem
/
$pxConvertRem
;
padding-left
:
80rem
/
$pxConvertRem
;
input
.disabled
{
background-color
:
#fff
;
color
:
#000
;
}
>
span
{
position
:
absolute
;
left
:
0
;
...
...
@@ -84,6 +87,9 @@
left
:
pxToRem
(
380px
);
top
:
20rem
/
$pxConvertRem
;
}
span
.disabled
{
color
:
#e6e6e6
;
}
}
.size-list
li
.hide
{
...
...
template/m.yohobuy.com/partials/cart/chose-panel.phtml
View file @
f7aabc3
...
...
@@ -50,11 +50,11 @@
<span>数量</span>
<div
class=
"clearfix"
>
<a
class=
"btn btn-minus"
href=
"javascript:void(0);"
>
<span
class=
"iconfont"
>
625
;</span>
<span
class=
"iconfont
{{#if promotionId}}disabled{{/if}}
"
>
625
;</span>
</a>
<input
id=
"good-num"
class=
"good-num
"
type=
"text"
value=
"1"
>
<input
id=
"good-num"
class=
"good-num
{{#if promotionId}}disabled{{/if}}"
type=
"text"
value=
"1"
{
{#if
promotionId
}
}disabled=
"true"
{
{/if
}
}
>
<a
class=
"btn btn-plus"
href=
"javascript:void(0);"
>
<span
class=
"iconfont"
>
624
;</span>
<span
class=
"iconfont
{{#if promotionId}}disabled{{/if}}
"
>
624
;</span>
</a>
</div>
<span
class=
"left-num"
></span>
...
...
Please
register
or
login
to post a comment