Merge pull request '修改密码' (#125) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/125
This commit is contained in:
luyuan 2020-11-11 17:37:55 +08:00
commit 1971fb8370
2 changed files with 5 additions and 1 deletions

View File

@ -444,7 +444,7 @@ export async function editpassword(data?: any): Promise<any> {
} }
newdata.memberid=data.memberid newdata.memberid=data.memberid
newdata.password=data.password newdata.password=data.password
newdata.topassword=data.repassword newdata.topassword=data.topassword
console.log(newdata) console.log(newdata)
const res = await post<Liveaddrule>('resetPassword',newdata) const res = await post<Liveaddrule>('resetPassword',newdata)
if(res.code==0){ if(res.code==0){

View File

@ -753,11 +753,14 @@ export default defineComponent({
original?: string; original?: string;
password?: string; password?: string;
topassword?: string; topassword?: string;
memberid?: number;
} }
const passwordForm: PassWord = reactive({ const passwordForm: PassWord = reactive({
original: "", original: "",
password: "", password: "",
topassword: "", topassword: "",
memberid:0
}); });
/** /**
* 密码对话框清空数据 * 密码对话框清空数据
@ -781,6 +784,7 @@ export default defineComponent({
* @return { void } * @return { void }
*/ */
function updateUserPassword(): void { function updateUserPassword(): void {
passwordForm.memberid = userinfo.value.memberid
console.log(toRaw(passwordForm)); console.log(toRaw(passwordForm));
if ( if (
toRaw(passwordForm).password === toRaw(passwordForm).topassword toRaw(passwordForm).password === toRaw(passwordForm).topassword