Mini Program conditional rendering does not work after binding global variables

as shown in the figure, binding in conditional rendering is a global variable in app.js, which means login status, but conditional rendering does not work after successful login, which makes me confused

.

get the value of app.globalData in user.js ,

 

Thank you for the invitation. I was busy yesterday and didn't reply in time. The
code is not posted enough. At least post your login functions and operation variables. Looking at this picture, I can only outline my analysis

.
  • first of all, the data used for rendering in wxml must be the corresponding value in the data object in js before initializing rendering
  • after dynamically modifying the value of app.globalData.isLogin, you must use the setData method in user.js to re-render. It is invalid to modify data directly
  • .
  • deal with asynchronous problems
Menu