Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
ff979272
Commit
ff979272
authored
Nov 03, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
优惠券
parents
93992565
1ef670f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
src/components/coupons/myCoupons/index.js
+6
-5
src/components/detail/index.js
+9
-9
No files found.
src/components/coupons/myCoupons/index.js
View file @
ff979272
...
...
@@ -143,6 +143,7 @@ class UseCoupon extends PureComponent {
const
[
expansionCoupons
,
selectCoupons
]
=
coupons
const
{
data
:
select
}
=
selectCoupons
const
{
data
:
expansion
}
=
expansionCoupons
let
PzCoupon
=
this
.
state
.
valid_coupons
.
concat
(
expansion
.
data
)
if
(
expansion
.
code
==
200
)
{
Array
.
isArray
(
expansion
.
data
)
&&
(
expansion
.
data
=
expansion
.
data
.
map
(
item
=>
(
item
.
ctype
=
4
,
item
)))
...
...
@@ -154,10 +155,11 @@ class UseCoupon extends PureComponent {
}
if
(
select
.
code
===
200
)
{
const
inuse_coupon
=
select
.
data
[
'inuse_coupon'
]
this
.
setState
({
valid_coupons
:
inuse_coupon
let
PzCoupon2
=
inuse_coupon
?
[...
inuse_coupon
,
...
select
.
data
.
valid_coupons
]
:
select
.
data
.
valid_coupons
,
:
select
.
data
.
valid_coupons
this
.
setState
({
valid_coupons
:
PzCoupon
.
concat
(
PzCoupon2
),
invalid_coupons
:
select
.
data
.
invalid_coupons
,
selectedCouponId
:
inuse_coupon
.
length
?
inuse_coupon
[
0
].
id
:
0
})
...
...
@@ -165,8 +167,6 @@ class UseCoupon extends PureComponent {
}
else
{
Toast
.
info
(
data
.
msg
)
}
})
}
...
...
@@ -352,6 +352,7 @@ function Content({coupons, ...rest}) {
{
coupons
.
map
(
item
=>
{
return
(
item
.
id
&&
<
Coupon
key
=
{
item
.
id
}
{...
item
}
...
...
src/components/detail/index.js
View file @
ff979272
...
...
@@ -704,15 +704,15 @@ class Detail extends Component {
*/
}
{
/*双十一期间不需要显示 不要删除*/
}
{
isCent
&&
!
course_info
.
is_aist
&&
(
course_info
.
group_status
===
3
||
course_info
.
group_status
===
4
)
&&
<
Group
courseInfo
=
{
course_info
}
history
=
{
this
.
props
.
history
}
countdown
=
{
countdown
}
invitedFriends
=
{
this
.
invitedFriends
}
/
>
}
{
/*{*/
}
{
/*isCent && !course_info.is_aist && (course_info.group_status === 3 || course_info.group_status === 4) &&*/
}
{
/*<Group*/
}
{
/*courseInfo={course_info}*/
}
{
/*history={this.props.history}*/
}
{
/*countdown={countdown}*/
}
{
/*invitedFriends={this.invitedFriends}*/
}
{
/*/>*/
}
{
/*}*/
}
{
/*
* 砍价
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment