Commit ef4c2170 by zhanghaozhe

bug修复

parent 51dfdf21
......@@ -52,10 +52,21 @@ class GiveCourseAssistance extends Component {
this.requestHeadItems()
let baseCode = decodeURIComponent(Base64.decode(this.state.code)).split(',')
this.setState({
baseCode: baseCode[0],
getBtnStatus: this.props.user.data.uid === baseCode[0] ? '2' : '1'
})
}
componentWillUpdate(nextProps) {
const {user} = this.props
if (nextProps.user.hasError !== user.hasError) {
this.setState({
getBtnStatus: nextProps.user.data.uid === this.state.baseCode[0] ? '2' : '1'
})
}
}
componentWillUnmount() {
window.cancelAnimationFrame(this.animationId)
this.swiper && this.swiper.destroy()
......@@ -245,7 +256,7 @@ class GiveCourseAssistance extends Component {
<div className="btn-get-wrap">
{
getBtnStatus === 1
getBtnStatus === '1'
?
<button type="button" className="btn-get" disabled={disabled} onClick={this.getCourse}>
免费领取
......
......@@ -51,14 +51,17 @@
position: relative;
text-align: left;
.course-title a {
color: #353535;
@include px2px(font-size, 26);
.course-title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.course-title a {
color: #353535;
@include px2px(font-size, 26);
}
.course-teacher {
@include px2px(font-size, 24);
color: #666;
......@@ -132,6 +135,7 @@
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
img {
width: px2rem(18);
height: px2rem(18);
......@@ -159,11 +163,13 @@
border-radius: px2rem(3);
margin: px2rem(20) px2rem(10) 0 px2rem(10);
padding: px2rem(18) px2rem(15) px2rem(20) px2rem(15);
.set-prize-title {
width: 100%;
text-align: center;
color: #F75E18;
@include px2px(font-size, 28);
img {
width: px2rem(19);
height: px2rem(19);
......@@ -171,12 +177,14 @@
vertical-align: sub;
}
}
.set-prize-content {
text-align: left;
color: #6E1517;
@include px2px(font-size, 24);
display: flex;
flex-wrap: wrap;
p {
margin-top: px2rem(12);
}
......@@ -274,7 +282,7 @@
border-radius: 50%;
}
tbody .ismylist td{
tbody .ismylist td {
background-color: #ad4700;
color: #fff;
}
......@@ -316,6 +324,7 @@
.code-title {
color: #333;
@include px2px(font-size, 36);
i {
color: #f00;
@include px2px(font-size, 36);
......@@ -328,6 +337,7 @@
height: px2rem(150);
margin: px2rem(10) auto 0 auto;
}
.btmmess {
color: #666;
padding-bottom: px2rem(15);
......
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