Commit db7b733d by zhanghaozhe

Merge branch 'coupon-bug'

parents 719c5e4d 0f7d7f1b
import React, {Component} from 'react'
import {NavLink, Route, Switch, Redirect} from "react-router-dom"
import React, { Component } from 'react'
import { NavLink, Route, Switch, Redirect } from "react-router-dom"
import myCoupons from "./myCoupons"
import myPatch from './myPatch'
import {HeaderBar} from "@/common";
import { HeaderBar } from "@/common";
import './coupons.scss'
......@@ -15,13 +15,21 @@ class coupons extends Component {
<section id='coupons'>
<div className='tab'>
<div>
<NavLink to={{pathname: `${match.url}/my-coupon`, state: {...this.props.location.state}}}
<NavLink to={{
pathname: `${match.url}/my-coupon`,
search: location.search,
state: {...this.props.location.state}
}}
replace
activeClassName='tab-active'
>我的优惠券</NavLink>
</div>
<div>
<NavLink to={{pathname: `${match.url}/my-patch`, state: {...this.props.location.state}}}
<NavLink to={{
pathname: `${match.url}/my-patch`,
search: location.search,
state: {...this.props.location.state}
}}
replace
activeClassName='tab-active'
>碎片合成</NavLink>
......@@ -36,7 +44,7 @@ class coupons extends Component {
from: this.props.location.state && this.props.location.state.from
}
}}/>
<Route path={`${this.props.match.path}/my-coupon`} component={myCoupons}/>
<Route path={`${this.props.match.path}/my-coupon`} component={myCoupons}/>
<Route path={`${this.props.match.path}/my-patch`} component={myPatch}/>
</Switch>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment