Commit 848b92fe by xuzhenghua

设置密码

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