Commit 670ddccd by zhanghaozhe

周年庆

parent e3c43726
...@@ -423,7 +423,7 @@ class Anniversary2020 extends Component { ...@@ -423,7 +423,7 @@ class Anniversary2020 extends Component {
} }
draw = debounce((i) => { draw = debounce((i) => {
if (this.isGotoLogin()) { if (this.state.activityData.stage === 1 || this.isGotoLogin()) {
return return
} }
const {activityData, prizeData, isDrawing} = this.state const {activityData, prizeData, isDrawing} = this.state
...@@ -722,9 +722,10 @@ class Anniversary2020 extends Component { ...@@ -722,9 +722,10 @@ class Anniversary2020 extends Component {
prizeData.prizes && !!prizeData.prizes.length && prizeData.prizes.map((item, index) => { prizeData.prizes && !!prizeData.prizes.length && prizeData.prizes.map((item, index) => {
return <li key={index} return <li key={index}
className={classnames([ className={classnames([
index === 4 ? (user.hasError || prizeData.odd_times ? 'available' : 'unavailable') : '',
{ {
active: drawingItemId === item.id, active: drawingItemId === item.id,
available: index === 4 && (user.hasError || prizeData.odd_times),
unavailable: index === 4 && (activityData.stage === 1 || !prizeData.odd_times),
}, },
])} onClick={this.draw.bind(this, index)}> ])} onClick={this.draw.bind(this, index)}>
{ {
...@@ -733,7 +734,12 @@ class Anniversary2020 extends Component { ...@@ -733,7 +734,12 @@ class Anniversary2020 extends Component {
<img src={item.img_name} alt=""/> <img src={item.img_name} alt=""/>
</div> </div>
: activityData.stage === 1 : activityData.stage === 1
? <div className={'draw'} style={{lineHeight: '350%'}}>715日开始</div> ? <div className={'draw pre'}>
<div>715日开始</div>
{
prizeData.odd_times !== undefined && <div>剩余{prizeData.odd_times || 0}次机会</div>
}
</div>
: user.hasError : user.hasError
? <div className="draw" style={{ ? <div className="draw" style={{
height: '100%', height: '100%',
...@@ -830,7 +836,7 @@ class Anniversary2020 extends Component { ...@@ -830,7 +836,7 @@ class Anniversary2020 extends Component {
</ul> </ul>
<div className="invite"> <div className="invite">
{ {
activityData.stage === 1 ? <button className={'invite'}>715日开始</button> : activityData.stage === 1 ? <button className={'invite unavailable'}>715日开始</button> :
<Link to={'/anniversary_2020/invitation'} onClick={(e) => { <Link to={'/anniversary_2020/invitation'} onClick={(e) => {
if (user.hasError) { if (user.hasError) {
e.preventDefault() e.preventDefault()
...@@ -860,7 +866,7 @@ class Anniversary2020 extends Component { ...@@ -860,7 +866,7 @@ class Anniversary2020 extends Component {
<div className="func"> <div className="func">
{ {
activityData.stage === 1 activityData.stage === 1
? <div className="btn"> ? <div className="btn no-chance">
<button>715日开始</button> <button>715日开始</button>
</div> </div>
: <> : <>
...@@ -938,7 +944,7 @@ class Anniversary2020 extends Component { ...@@ -938,7 +944,7 @@ class Anniversary2020 extends Component {
</thead> </thead>
<tbody> <tbody>
{ {
_rankList.map((item, index) => { _rankList.map((item, index) => {
return <tr key={index}> return <tr key={index}>
<td> <td>
{ {
...@@ -963,7 +969,7 @@ class Anniversary2020 extends Component { ...@@ -963,7 +969,7 @@ class Anniversary2020 extends Component {
</table> </table>
} }
{ {
!isShowAllRankList && <div className="btn"> !!_rankList.length && !isShowAllRankList && <div className="btn">
<button onClick={() => { <button onClick={() => {
this.setState({ this.setState({
isShowAllRankList: true, isShowAllRankList: true,
......
...@@ -427,6 +427,18 @@ ...@@ -427,6 +427,18 @@
div:nth-child(2) { div:nth-child(2) {
font-size: 12px; font-size: 12px;
} }
&.pre {
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: center;
height: 100%;
div:nth-child(1) {
font-size: 14px;
}
}
} }
.prize { .prize {
...@@ -585,6 +597,11 @@ ...@@ -585,6 +597,11 @@
.invite { .invite {
text-align: center; text-align: center;
&.unavailable {
background: #999;
color: #fff;
}
button { button {
@include button; @include button;
width: 160px; width: 160px;
...@@ -812,7 +829,7 @@ ...@@ -812,7 +829,7 @@
width: 100%; width: 100%;
button { button {
padding: 0 5%; padding: 0 3%;
font-size: 13px; font-size: 13px;
border-radius: 2px; border-radius: 2px;
margin-right: 0; margin-right: 0;
......
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