Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
wenjiekong
9 years ago
Commit
8f8f607fc99a66b762b94059f816ecc6a51767d2
1 parent
fc0364a9
students js save
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
public/js/product/students.page.js
public/js/product/students.page.js
View file @
8f8f607
...
...
@@ -464,7 +464,11 @@ $identityWrap.delegate('.backForm', 'click', function() {
$identityForm
.
removeClass
(
'hide'
).
siblings
().
addClass
(
'hide'
);
});
$
(
'.enable .normal'
).
on
(
'click'
,
function
(
e
)
{
$
(
'.enable .info'
).
on
(
'click'
,
function
(
e
)
{
if
(
$
(
this
).
children
(
'.normal'
).
length
!==
1
)
{
return
;
}
e
.
preventDefault
();
requestCoupon
(
$
(
this
).
closest
(
'a'
).
data
(
'id'
));
redirect
.
gunangSrc
=
$
(
this
).
closest
(
'a'
).
get
(
0
).
href
;
...
...
@@ -580,10 +584,13 @@ $(function() {
success
:
function
(
res
)
{
var
code
=
res
.
code
,
i
,
text
;
text
,
$a
;
if
(
code
===
200
)
{
for
(
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
$a
=
$
(
'[data-id=\''
+
res
.
data
[
i
].
couponId
+
'\']'
);
text
=
''
;
if
(
res
.
data
[
i
].
status
===
1
)
{
...
...
@@ -593,24 +600,28 @@ $(function() {
'</div>'
;
}
if
(
res
.
data
[
i
].
status
===
2
)
{
$a
.
removeClass
(
'enable'
);
text
=
'<div class="empty">'
+
'<p>已抢光</p>'
+
'<p class="guang">去逛逛</p>'
+
'</div>'
;
}
if
(
res
.
data
[
i
].
status
===
3
)
{
$a
.
removeClass
(
'enable'
);
text
=
'<div class="got">'
+
'<p>已领取</p>'
+
'<p class="guang">去使用</p>'
+
'</div>'
;
}
if
(
res
.
data
[
i
].
status
===
4
)
{
$a
.
removeClass
(
'enable'
);
text
=
'<div class="normal">'
+
'<p>已过期</p>'
+
'<p class="guang">去逛逛</p>'
+
'</div>'
;
}
$
(
'[data-id=\''
+
res
.
data
[
i
].
couponId
+
'\']'
).
find
(
'.info'
).
html
(
text
);
$a
.
find
(
'.info'
).
html
(
text
);
}
}
...
...
Please
register
or
login
to post a comment