Commit af70d5be by xuzhenghua

宝箱入口/渠道合作

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