Commit 848b92fe by xuzhenghua

设置密码

parent 5fb385f7
......@@ -12,6 +12,8 @@ import { encrypt } from "src/components/passport/encryption"
import { isEmpty } from "lodash"
import { connect } from "react-redux"
import { setCurrentUser } from 'src/store/userAction'
import jsCookie from 'js-cookie'
class SetPassword extends Component {
......@@ -52,7 +54,7 @@ class SetPassword extends Component {
name='agreement'
id='agreement'
className={classnames([
this.props.values.agreement ? 'iconfont iconiconfront-3' : 'disagree'
this.props.values.agreement ? 'iconfont iconRectangleCopy' : 'disagree'
])}
/>
同意<span>《七月在线用户使用协议》</span>
......@@ -124,8 +126,9 @@ function forgotPasswordReset(values, props) {
}
function bindMobileSetPassword(values, props) {
let uid = jsCookie.get('uid')
http.post(`${API['passport-api']}/bind_mobile/set_pwd_new`, {
uid: props.user.data.uid,
uid: props.user.data.uid || uid,
password: encrypt(values.password)
})
.then(res => {
......
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