Commit 8b36ed50 by wangshuo

返场页面显示修改

parent 440ed7e9
...@@ -111,6 +111,10 @@ class BlessingPreheat extends Component { ...@@ -111,6 +111,10 @@ class BlessingPreheat extends Component {
id: 'best-courses' id: 'best-courses'
}, },
{ {
text: '大咖直播',
id: 'live'
},
{
text: '幸运大抽奖', text: '幸运大抽奖',
id: 'lucky-draw' id: 'lucky-draw'
}, },
...@@ -122,10 +126,6 @@ class BlessingPreheat extends Component { ...@@ -122,10 +126,6 @@ class BlessingPreheat extends Component {
text: 'AI测试', text: 'AI测试',
id: 'ai-test' id: 'ai-test'
}, },
{
text: '大咖直播',
id: 'live'
},
], ],
index: 0, index: 0,
userHasError: props.user.hasError, userHasError: props.user.hasError,
...@@ -142,8 +142,12 @@ class BlessingPreheat extends Component { ...@@ -142,8 +142,12 @@ class BlessingPreheat extends Component {
} }
componentDidMount() { componentDidMount() {
const _this = this;
this.fetchUserBlessing() this.fetchUserBlessing()
this.setInitialNavActiveStatus() setTimeout(function(){
// 这里有获取ID的步骤,由于运营过多的调整,导致顺序不定,所以包含ID的title必须要放到判断中(防止出现多个title),设置定时器是因为如果返回较慢 获取不到ID导致报错
_this.setInitialNavActiveStatus()
}, 0);
window.addEventListener('scroll', throttle(this.calcNavActive, 100)) window.addEventListener('scroll', throttle(this.calcNavActive, 100))
if (is_weixin()) { if (is_weixin()) {
wxShare({ wxShare({
...@@ -616,7 +620,7 @@ class BlessingPreheat extends Component { ...@@ -616,7 +620,7 @@ class BlessingPreheat extends Component {
index={index} index={index}
/> />
{/* 精品课程特惠专区 */} {/* 精品课程特惠专区--返场 */}
{ {
onlyShow && ( onlyShow && (
<> <>
...@@ -632,11 +636,21 @@ class BlessingPreheat extends Component { ...@@ -632,11 +636,21 @@ class BlessingPreheat extends Component {
) )
} }
{/* 大咖直播--返场 */}
{
onlyShow && <Live isFormal={isFormal} isLogin={isLogin}/>
}
{/* 抽奖--正式 */} {/* 抽奖--正式 */}
{ {
isFormal === 1 && isFormal === 1 &&
<> <>
<ListHeader id={'lucky-draw'} text="幸运大抽奖" styles={{margin: '30px 0 10px'}}/> <ListHeader id={'lucky-draw'} text="幸运大抽奖" styles={{margin: onlyShow ? '30px 0 10px' : '60px 0 10px'}}/>
{
onlyShow ? (
<p>活动已结束</p>
) : null
}
<div className="formal-draw-btns"> <div className="formal-draw-btns">
<button className="luck-draw__button" onClick={() => this.handleToShow('isRule')}>活动规则></button> <button className="luck-draw__button" onClick={() => this.handleToShow('isRule')}>活动规则></button>
<button className='prize-record' onClick={this.getMyPrizeRecord}>中奖记录></button> <button className='prize-record' onClick={this.getMyPrizeRecord}>中奖记录></button>
...@@ -648,6 +662,11 @@ class BlessingPreheat extends Component { ...@@ -648,6 +662,11 @@ class BlessingPreheat extends Component {
{/* 积福气 */} {/* 积福气 */}
<ListHeader id={'lucky-value'} text="积福气,享受更多福利" styles={{margin: '30px 0 15px'}}/> <ListHeader id={'lucky-value'} text="积福气,享受更多福利" styles={{margin: '30px 0 15px'}}/>
{
onlyShow ? (
<p>活动已结束</p>
) : null
}
<Link className="blessing__sort" to="/blessingRank"></Link> <Link className="blessing__sort" to="/blessingRank"></Link>
...@@ -664,11 +683,10 @@ class BlessingPreheat extends Component { ...@@ -664,11 +683,10 @@ class BlessingPreheat extends Component {
/> />
{/* 幸运大抽奖--预热 */} {/* 幸运大抽奖--预热 */}
<ListHeader id={'lucky-draw'} text="幸运大抽奖" styles={{margin: '30px 0 10px'}}/>
{ {
isFormal === 0 && isFormal === 0 &&
<> <>
<ListHeader id={'lucky-draw'} text="幸运大抽奖" styles={{margin: '30px 0 10px'}}/>
<p className="luck-draw__tip">- 将于111110点开启 -</p> <p className="luck-draw__tip">- 将于111110点开启 -</p>
<button className="luck-draw__button" onClick={() => this.handleToShow('isRule')}>活动规则></button> <button className="luck-draw__button" onClick={() => this.handleToShow('isRule')}>活动规则></button>
<LuckDraw/> <LuckDraw/>
...@@ -676,20 +694,6 @@ class BlessingPreheat extends Component { ...@@ -676,20 +694,6 @@ class BlessingPreheat extends Component {
} }
{/* 抽奖--正式 */}
{
isFormal === 1 &&
<>
<div className="formal-draw-btns">
<button className="luck-draw__button" onClick={() => this.handleToShow('isRule')}>活动规则></button>
<button className='prize-record' onClick={this.getMyPrizeRecord}>中奖记录></button>
</div>
<FormalDraw toLogin={this.toLogin}/>
</>
}
{/*定金--只在预热期间显示*/} {/*定金--只在预热期间显示*/}
{ {
isFormal === 0 && isFormal === 0 &&
...@@ -736,7 +740,11 @@ class BlessingPreheat extends Component { ...@@ -736,7 +740,11 @@ class BlessingPreheat extends Component {
<SharePopup isClose={isClose} toClose={() => this.handleToHide('shareMark')}/> <SharePopup isClose={isClose} toClose={() => this.handleToHide('shareMark')}/>
} }
<ListHeader id={'ai-test'} text="全国AI工程师水平测试" styles={{margin: '30px 0 15px'}}/> <ListHeader id={'ai-test'} text="全国AI工程师水平测试" styles={{margin: '30px 0 15px'}}/>
{
onlyShow ? (
<p>活动已结束</p>
) : null
}
<div className="test__record" onClick={() => this.handleToShow('showRecordList', true)}> <div className="test__record" onClick={() => this.handleToShow('showRecordList', true)}>
测试记录> 测试记录>
</div> </div>
...@@ -750,7 +758,11 @@ class BlessingPreheat extends Component { ...@@ -750,7 +758,11 @@ class BlessingPreheat extends Component {
<RankList></RankList> <RankList></RankList>
<Live isFormal={isFormal} isLogin={isLogin}/> {/* 大咖直播 -- 正式活动 */}
{
!onlyShow && <Live isFormal={isFormal} isLogin={isLogin}/>
}
{ {
addressPopupVisible && addressPopupVisible &&
<div className="address-mask"> <div className="address-mask">
......
#blessing-preheat { #blessing-preheat {
background: #5327FA; background: #5327FA;
padding-bottom: 30px;
} }
.test__record { .test__record {
......
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