confirmUpdate: function (e) {
The console. The log (e);
Var oldpwd=this. Date. Oldpwd;
Var newpwd=this. Date. Newpwd;
Var newpwd2=this. Date. Newpwd2;
If (oldpwd=='| | newpwd==' | | newpwd2==' ') {
Wx. ShowToast ({
Title: 'password cannot be empty,
Icon: 'none',
Duration: 1000
})
} else if (newpwd!={newpwd2)
Wx. ShowToast ({
Title: 'two inconsistent password',
Icon: 'none',
Duration: 1000
})
} else {
Wx. Request ({
Url: ` ${app. GlobalData. ApiUrl}/updateContact/${this. Data. UserID} `,
Method: "POST",//OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
//the header: {},//set the request header
Success: the function (res) {
//success
Wx. HideLoading ();
If (res) data) success) {
Wx. ShowToast ({
Title: 'success',
Icon: 'success',
Success: the function () {
SetTimeout ()=& gt; {
Wx. SwitchTab ({
Url: "/pages/user/user"
});
}, 1500)
}
})
}
}
The error code
I really don't understand,
CodePudding user response:
That is lost to define oldpwdVar oldpwd=this. Data. Oldpwd;
.