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
53062673
Commit
53062673
authored
Sep 11, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coupon-bug
parent
ffaaaa03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/components/coupons/index.js
+2
-2
src/components/coupons/myCoupons/index.js
+3
-3
No files found.
src/components/coupons/index.js
View file @
53062673
...
@@ -8,7 +8,7 @@ import './coupons.scss'
...
@@ -8,7 +8,7 @@ import './coupons.scss'
class
coupons
extends
Component
{
class
coupons
extends
Component
{
render
()
{
render
()
{
const
{
match
}
=
this
.
props
;
const
{
match
,
location
}
=
this
.
props
;
return
(
return
(
<
div
className
=
{
'coupons-box'
}
>
<
div
className
=
{
'coupons-box'
}
>
<
HeaderBar
title
=
'优惠券'
arrow
=
{
true
}
/
>
<
HeaderBar
title
=
'优惠券'
arrow
=
{
true
}
/
>
...
@@ -32,7 +32,7 @@ class coupons extends Component {
...
@@ -32,7 +32,7 @@ class coupons extends Component {
<
div
className
=
"coupons-container"
>
<
div
className
=
"coupons-container"
>
<
Switch
>
<
Switch
>
<
Redirect
exact
from
=
'/coupons'
to
=
{{
<
Redirect
exact
from
=
'/coupons'
to
=
{{
pathname
:
'coupons/my-coupon'
,
state
:
{
pathname
:
'coupons/my-coupon'
,
s
earch
:
location
.
search
,
s
tate
:
{
from
:
this
.
props
.
location
.
state
&&
this
.
props
.
location
.
state
.
from
from
:
this
.
props
.
location
.
state
&&
this
.
props
.
location
.
state
.
from
}
}
}}
/
>
}}
/
>
...
...
src/components/coupons/myCoupons/index.js
View file @
53062673
...
@@ -7,7 +7,7 @@ import { http, getParam } from '@/utils'
...
@@ -7,7 +7,7 @@ import { http, getParam } from '@/utils'
import
{
WithFullSize
}
from
'@/HOCs'
import
{
WithFullSize
}
from
'@/HOCs'
import
{
Toast
}
from
'antd-mobile'
import
{
Toast
}
from
'antd-mobile'
import
{
isEmpty
}
from
'lodash'
import
{
isEmpty
}
from
'lodash'
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
@
connect
()
@
connect
()
class
UseCoupon
extends
PureComponent
{
class
UseCoupon
extends
PureComponent
{
...
@@ -48,7 +48,7 @@ class UseCoupon extends PureComponent {
...
@@ -48,7 +48,7 @@ class UseCoupon extends PureComponent {
}
}
exchange
=
()
=>
{
exchange
=
()
=>
{
const
{
location
:
{
state
=
{}}
}
=
this
.
props
;
const
{
location
:
{
state
=
{}}
}
=
this
.
props
;
if
(
this
.
state
.
redeemCode
!==
''
)
{
if
(
this
.
state
.
redeemCode
!==
''
)
{
http
.
post
(
`
${
API
.
home
}
/m/coupon/exchange`
,
{
http
.
post
(
`
${
API
.
home
}
/m/coupon/exchange`
,
{
code
:
this
.
state
.
redeemCode
code
:
this
.
state
.
redeemCode
...
@@ -86,7 +86,7 @@ class UseCoupon extends PureComponent {
...
@@ -86,7 +86,7 @@ class UseCoupon extends PureComponent {
if
(
state
.
from
===
'/my'
)
{
if
(
state
.
from
===
'/my'
)
{
this
.
getMyCoupons
()
this
.
getMyCoupons
()
}
}
if
(
state
.
from
===
'/order'
)
{
if
(
state
.
from
===
'/order'
)
{
this
.
getAllCoupons
()
this
.
getAllCoupons
()
}
}
}
else
{
}
else
{
...
...
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