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'
class
coupons
extends
Component
{
render
()
{
const
{
match
}
=
this
.
props
;
const
{
match
,
location
}
=
this
.
props
;
return
(
<
div
className
=
{
'coupons-box'
}
>
<
HeaderBar
title
=
'优惠券'
arrow
=
{
true
}
/
>
...
...
@@ -32,7 +32,7 @@ class coupons extends Component {
<
div
className
=
"coupons-container"
>
<
Switch
>
<
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
}
}}
/
>
...
...
src/components/coupons/myCoupons/index.js
View file @
53062673
...
...
@@ -7,7 +7,7 @@ import { http, getParam } from '@/utils'
import
{
WithFullSize
}
from
'@/HOCs'
import
{
Toast
}
from
'antd-mobile'
import
{
isEmpty
}
from
'lodash'
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
@
connect
()
class
UseCoupon
extends
PureComponent
{
...
...
@@ -48,7 +48,7 @@ class UseCoupon extends PureComponent {
}
exchange
=
()
=>
{
const
{
location
:
{
state
=
{}}
}
=
this
.
props
;
const
{
location
:
{
state
=
{}}
}
=
this
.
props
;
if
(
this
.
state
.
redeemCode
!==
''
)
{
http
.
post
(
`
${
API
.
home
}
/m/coupon/exchange`
,
{
code
:
this
.
state
.
redeemCode
...
...
@@ -86,7 +86,7 @@ class UseCoupon extends PureComponent {
if
(
state
.
from
===
'/my'
)
{
this
.
getMyCoupons
()
}
if
(
state
.
from
===
'/order'
)
{
if
(
state
.
from
===
'/order'
)
{
this
.
getAllCoupons
()
}
}
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