TypeError: Cannot read property ‘username‘ of undefined

TypeError: Cannot read property ‘username’ of undefined
Recently, onLoad() was used in the uni-App development project of Android app. During the life cycle, the value of Username needed to be changed, but TypeError: TypeError: Cannot read property ‘username’ of undefined was frequently reported



causes this to always point to undefined, which may be because the arrow function is strictly limited to the point of this, or change back later, it is ok;

Read More: