Skip to content

Commit

Permalink
登录页面完善
Browse files Browse the repository at this point in the history
  • Loading branch information
z-9527 committed Jul 23, 2018
1 parent e09629e commit 59b322c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/routes/Login/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import BGParticle from '../../utils/BGParticle'
import { Form, Input, Row, Col, Icon, message } from 'antd'
import { Form, Input, Row, Col, notification, message } from 'antd'
import './style.css'
import { randomNum, calculateWidth } from '../../utils/utils'
import PromptBox from '../../components/PromptBox'
Expand Down Expand Up @@ -311,6 +311,7 @@ class Login extends React.Component {

componentWillUnmount () {
this.particle.destory()
notification.destroy()
}
//载入页面时的一些处理
initPage = () => {
Expand All @@ -327,6 +328,11 @@ class Login extends React.Component {
//为什么写在then里?id为backgroundBox的DOM元素是在loading为false时才有,而上面的setState可能是异步的,必须等到setState执行完成后才去获取dom
this.particle = new BGParticle('backgroundBox')
this.particle.init()
notification.open({
message:<ul><li>初始账号:admin</li><li>初始密码:admin</li></ul>,
duration:0,
className:'login-notification'
})
})
}
//切换showbox
Expand Down

0 comments on commit 59b322c

Please sign in to comment.