Commit 62ffb83b by wangshuo

返场内容控制

parent 6ce88374
......@@ -51,7 +51,7 @@ class BlessingPreheat extends Component {
timelineShareVisible: false,
showRecordList: false,
isFormal: false, // 1正式 0 预热
onlyShow: false, // 13号之后要展示内容的控制
onlyShow: false, // 14号返场
isServer: false,
serverUrl: '',
shareMark: false,
......@@ -105,6 +105,28 @@ class BlessingPreheat extends Component {
id: 'live'
},
],
encoreNavs: [
{
text: '精品特惠',
id: 'best-courses'
},
{
text: '幸运大抽奖',
id: 'lucky-draw'
},
{
text: '积福气',
id: 'lucky-value'
},
{
text: 'AI测试',
id: 'ai-test'
},
{
text: '大咖直播',
id: 'live'
},
],
index: 0,
userHasError: props.user.hasError,
isApp: false,
......@@ -255,11 +277,17 @@ class BlessingPreheat extends Component {
}
initNav = (isFormal) => {
const {formalNavs} = this.state
const {formalNavs, onlyShow, encoreNavs} = this.state
if (isFormal) {
this.setState({
navs: formalNavs
})
if(onlyShow) {
this.setState({
navs: encoreNavs
})
} else {
this.setState({
navs: formalNavs
})
}
}
}
......@@ -580,6 +608,22 @@ class BlessingPreheat extends Component {
index={index}
/>
{/* 精品课程特惠专区 */}
{
onlyShow && (
<>
<ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/>
<CourseList
isApp={isApp}
isFormal={isFormal}
isLogin={isLogin}
history={this.props.history}
toLogin={this.toLogin}
/>
</>
)
}
{/* 抽奖--正式 */}
{
isFormal === 1 &&
......
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