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
fdf98450
Commit
fdf98450
authored
Dec 06, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pull
parent
2c26e5ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
src/components/coupons/myCoupons/index.js
+3
-3
src/store/userAction.js
+6
-4
No files found.
src/components/coupons/myCoupons/index.js
View file @
fdf98450
...
...
@@ -79,7 +79,7 @@ class UseCoupon extends PureComponent {
}
}
if
(
state
.
from
===
'/order'
)
{
const
coupon
=
data
.
data
/*
const coupon = data.data
if (coupon['ctype'] == 2
&& coupon['limit_course'] != this.state.courseId) {
...
...
@@ -93,7 +93,7 @@ class UseCoupon extends PureComponent {
valid_coupons: [...this.state.valid_coupons, coupon],
redeemCode: ''
})
}
}
*/
Toast
.
info
(
'兑换成功'
)
this
.
getAllCoupons
()
}
...
...
@@ -143,7 +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
)
let
PzCoupon
=
Array
.
isArray
(
expansion
.
data
)
?
expansion
.
data
:
[]
if
(
expansion
.
code
==
200
)
{
Array
.
isArray
(
expansion
.
data
)
&&
(
expansion
.
data
=
expansion
.
data
.
map
(
item
=>
(
item
.
ctype
=
4
,
item
)))
...
...
src/store/userAction.js
View file @
fdf98450
...
...
@@ -15,10 +15,12 @@ const accountLogin = user => dispatch => {
}
const
quickLogin
=
user
=>
dispatch
=>
{
return
http
.
post
(
`
${
API
[
'passport-api'
]}
/quick_login`
,
user
)
.
then
(
res
=>
{
return
storeUser
(
res
,
dispatch
)
})
return
http
.
post
(
`
${
API
[
'passport-api'
]}
/quick_login`
,
{
...
user
,
plat
:
5
}).
then
(
res
=>
{
return
storeUser
(
res
,
dispatch
)
})
}
const
storeUser
=
(
res
,
dispatch
)
=>
{
...
...
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