1. Discovery, shopping cart, my page all require the user to log in before requesting data, if there is no login to display the authorization button.
2. My three pages all set whether to display the login button by setting hasLogin:app.globalData in data. For example, after I click on the authorized login on the discovery page,
I change the value in app.globalData, but the data of the other two pages are not updated. I need to use setData to update the hasLogin of their two pages, and I re-determine whether to log in in the onShow of these three pages. Then go to the value of setData hasLogin, but it doesn"t feel good to do so. How can I update it?
3. Generally speaking, I go to onLoad to request background data, but without authorization, I should not make a request to enter Discovery, Shopping cart, or my page. The request in the onLoad will not take effect until the user is authorized to log in before the request can be initiated. If I am authorized in the discovery page, in the event of authorization, I can only trigger a data re-request for the discovery page. How can I initiate a request in a page where the onload of other initialized pages is no longer executed after clicking authorization on one page?
also ask the bosses to give us some advice, thank you!