Commit 3d1032bd by zhanghaozhe

忘记密码

parent 4c0c60a9
......@@ -98,8 +98,9 @@ const formikConfig = {
function forgotPasswordReset(values, props) {
let key = sessionStorage.getItem('r_type') === 'email' ? 'email' : 'tel'
http.post(`${API['passport-api']}/account/up_pass_by_${key === 'email' ? 'email' : 'phone'}`, {
[key]: sessionStorage.getItem(key),
let requestKey = key === 'email' ? 'email' : 'phone'
http.post(`${API['passport-api']}/account/up_pass_by_${requestKey}`, {
[requestKey]: sessionStorage.getItem(key),
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