Learning WeChat Mini Programs (6)

The realization of the last part of the details page
There is a problem here, because the tab is configured in the global, so the problem of not being able to jump appears from the beginning, and this is solved here.

Check whether the location to be jumped is located in the TabBar, if so, use wx.switchTab to jump to the interface (if it is a tab configured in app.json)
Insert picture description here

There is also a kind of jump that uses the navigator in the component to achieve.
Insert picture description here
Here to avoid sending the request again, we save the data that the movie interface has requested to get in the global, and then get it through getApp()
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_46013619/article/details/104731136