Commit 7354fb6f by xuzhenghua

pull

parent a39d99f8
......@@ -16,6 +16,7 @@ class UserBulletScreen extends Component {
this.getBulletScreenData(true)
}
componentWillUpdate() {}
componentWillUnmount() {
this.swiper && this.swiper.destroy()
}
......
......@@ -38,6 +38,7 @@ class Landing extends Component {
}
componentDidMount() {
this.getStage();
this.fetchPageData()
window.showFollowAlert = this.remind.bind(this, 'create')
document.title = '七月在线年终大回馈,幸运宝箱随你开,100%有奖!'
......@@ -61,7 +62,26 @@ class Landing extends Component {
}
}
createMeta = () => {
componentWillUnmount() {
this.shareTipPopup && this.shareTipPopup.remove()
}
// 获取活动以及宝箱的阶段
getStage = () => {
http.get(`${API.home}/activity/stage`).then(res => {
const {code, data, msg} = res.data
if (code === 200) {
if(Number(data.activity_stage) === 0) {
this.props.history.push('/');
return;
}
} else {
Toast.info(msg, 2)
}
})
}
createMeta = (title,dec,imgname) => {
let meta = document.createElement('meta');
meta.setAttribute('name', 'description')
meta.setAttribute('itemprop', 'description')
......
......@@ -309,6 +309,10 @@ class MyTreasure extends Component {
http.get(`${API.home}/activity/stage`).then(res => {
const {code, data} = res.data
if (code === 200) {
if(Number(data.activity_stage) === 0) {
this.props.history.push('/');
return;
}
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
if (data.treasure_stage === 0) {
this.startCountDown()
......
......@@ -131,6 +131,10 @@ export default class index extends Component {
http.get(`${API.home}/activity/stage`).then(res => {
const {code, data, msg} = res.data
if (code === 200) {
if(Number(data.activity_stage) === 0) {
this.props.history.push('/');
return;
}
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
this.setState({
activity_stage: data.activity_stage,
......@@ -168,6 +172,7 @@ export default class index extends Component {
</div>
<div className="banner-treasure__decorate"></div>
</div>
{/* 大咖直播 */}
<LiveRoom isAppUpdate={this.state.isAppUpdate}/>
......
......@@ -46,6 +46,11 @@ class YarnWish extends Component {
http.get(`${API.home}/activity/stage`).then(res => {
const {code, data} = res.data
if (code === 200) {
if(Number(data.activity_stage) === 0) {
this.props.history.push('/');
return;
}
this.setState({
activityStage: data.activity_stage // 0-不在活动时间 1-预热 2-正式 3-返场
})
......
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