Commit e27e99c5 by xuzhenghua

bug修改

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