Home > Mobile >  WeChat developer tool tip always read a property & # x27; Oldpwd & # x27; Problems of undefined
WeChat developer tool tip always read a property & # x27; Oldpwd & # x27; Problems of undefined

Time:09-17

Help people greatly, WeChat developer tools have been prompt always read a property 'oldpwd of undefined problems
 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 oldpwd

Var oldpwd=this. Data. Oldpwd;
.
  • Related