Commit af70d5be by xuzhenghua

宝箱入口/渠道合作

parent b7c81fd1
...@@ -28,6 +28,7 @@ class App extends Component { ...@@ -28,6 +28,7 @@ class App extends Component {
super(props) super(props)
this.state = { this.state = {
isShowActivityEntry: 0, isShowActivityEntry: 0,
isShowChannel: 0
} }
} }
...@@ -101,12 +102,14 @@ class App extends Component { ...@@ -101,12 +102,14 @@ class App extends Component {
// 获取宝箱阶段 // 获取宝箱阶段
getStage = () => { getStage = () => {
http.get(`${API.home}/activity/stage`).then(res => { let ccode = cookie.get('ccode')
http.get(`${API.home}/activity/stage?ccode=${ccode}`).then(res => {
const {code, data, msg} = res.data const {code, data, msg} = res.data
if (code === 200) { if (code === 200) {
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内 // treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
this.setState({ this.setState({
isShowActivityEntry: data.treasure_stage isShowActivityEntry: data.treasure_stage,
isShowChannel: data.is_show_site_window_by_channel
}) })
} else { } else {
Toast.info(msg, 2) Toast.info(msg, 2)
...@@ -294,12 +297,11 @@ class App extends Component { ...@@ -294,12 +297,11 @@ class App extends Component {
} }
} }
render() { render() {
return <> return <>
<Routes/> <Routes/>
{ {
!!this.state.isShowActivityEntry && !!this.state.isShowActivityEntry && !!this.state.isShowChannel &&
<Link className={'year19-index'} to="/box/boxActive"> <Link className={'year19-index'} to="/box/boxActive">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/treasure-active/m/global-entry.png" <img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/treasure-active/m/global-entry.png"
alt=""/> alt=""/>
......
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