I want your help urgent!! #123
-
I want to build an app ok for 1.0 . So the idea is on the first page it will show the normal content but after 24 hours it would go to page 2 and remain there forever. So can you please give me the code it's not listed in the documentation . Please help me |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, I offer a simple idea. Prepare three pages, page, page1 and page2. page is the home page of the application without any UI widgets. Record the time of opening the Mini Program for the first time in page.js, and carry out persistent storage, obtain the time using the Time sensor, persistent storage refer to Data Persistence. Then each time we enter the Mini Program, we will get the time again and compare it with the time we store to decide which page to jump to, and use reloadPage when jumping. |
Beta Was this translation helpful? Give feedback.
Hello, I offer a simple idea.
Prepare three pages, page, page1 and page2. page is the home page of the application without any UI widgets.
Record the time of opening the Mini Program for the first time in page.js, and carry out persistent storage, obtain the time using the Time sensor, persistent storage refer to Data Persistence.
Then each time we enter the Mini Program, we will get the time again and compare it with the time we store to decide which page to jump to, and use reloadPage when jumping.