Commit ef4c2170 by zhanghaozhe

bug修复

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