Commit e27e99c5 by xuzhenghua

bug修改

parent 93f9506b
......@@ -172,7 +172,7 @@ class Index extends Component {
{
this.state.islive &&
<LiveRoom isShow={this.state.isShow} colseBox={this.colseBox}
roomMess={this.state.roomMess}></LiveRoom>
roomMess={this.state.roomMess} getIndexData={this.getIndexData}></LiveRoom>
}
</div>
......@@ -282,13 +282,17 @@ function ScrollBox(props) {
<h2 className="item-title">{item.live_title}</h2>
<p className="item-teacher">讲师:{item.live_teacher_name}</p>
{
item.is_prepare &&
item.is_prepare && item.live_status === 0 &&
<p className="item-time">时间:{item.live_start_time}</p>
}
{
!item.is_prepare &&
!item.is_prepare && item.live_status === 0 &&
<p className='item-btn'>预约</p>
}
{
(item.live_status === 1 || item.live_status === 10) &&
<p className='item-btn'>正在直播</p>
}
</div>
</div>
</li>
......
......@@ -211,10 +211,10 @@
}
.item-btn {
width: 49px;
padding: 0 5px;
height: 20px;
text-align: center;
line-height: 20px;
line-height: 18px;
background: linear-gradient(60deg, $bg_active 0%, $bg_0080FF 100%);
border-radius: 10px;
font-size: 14px;
......
......@@ -82,6 +82,7 @@ class LiveRoom extends Component {
success: true,
toSubscribe: false
})
this.props.getIndexData()
}
} else if (res.data.data.status === 1) {
......@@ -275,10 +276,10 @@ class LiveRoom extends Component {
}
</div>
}
{
this.state.success &&
<div className='success'>预约成功</div>
}
{/*{*/}
{/*this.state.success &&*/}
{/*<div className='success'>预约成功</div>*/}
{/*}*/}
</div>
);
}
......
......@@ -66,6 +66,7 @@
display: flex;
flex-flow: column;
justify-content: space-between;
width: 100%;
}
.v-list-item {
......
......@@ -55,13 +55,11 @@ class BtnStatus extends Component {
// this.props.getCourses()
document.location.reload()
} else {
// window.location.href = '/shopcart'
this.props.history.replace('/shopcart');
}
} else if (res.data.code === 15001) {
// window.location.href = '/shopcart'
this.props.history.replace('/shopcart');
} else {
Toast.info(res.data.msg, 2);
......@@ -139,7 +137,6 @@ class BtnStatus extends Component {
getBargainInfo = () => {
const {user} = this.props
const uid = user && user.data && user.data.uid
if (!uid) return
let data = {
courseId: getParam('id')
}
......
......@@ -130,7 +130,7 @@ class Cart extends Component {
tobuy = () => {
http.get(`${api['pay-api']}/m/cart/addtopreorder/[${this.state.courseIdarr}]`).then((res) => {
if (res.data.errno == 0) {
this.props.history.push('/order')
this.props.history.push(`/order?id=[${this.state.courseIdarr}]`)
} else {
Toast.info(res.data.msg, 2);
}
......
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