diff --git a/src/api/index.ts b/src/api/index.ts index 5fcc1f4..b596808 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -438,18 +438,20 @@ export async function transactioninfo(data?: any){ export async function editpassword(data?: any): Promise { console.log(data,111) const newdata={ - memberid:0, - password: "", + password:"", + newpassword: "", topassword: "" } - newdata.memberid=data.memberid - newdata.password=data.password + newdata.password = data.original + newdata.newpassword=data.password newdata.topassword=data.topassword console.log(newdata) - const res = await post('resetPassword',newdata) + const res = await put('/member/' + data.memberid,newdata) if(res.code==0){ message.success("修改成功") + }else{ + message.error(res.msg) } return res }