Small micro-channel program page setup data to other pages in the current

If the data is used in other pages globalData, so you can directly modify the page globalData data in the current.
If other pages are used data storage, then direct the page to modify the current data storage.

A scene from the page to jump :( B page)
after completion of certain operations in the page jump B (or return) to the page A, the page B while if successfully performed an operation to change a value of the page A, If no action is successful, you do not need to change the value of the a page.

    var pages = getCurrentPages()    //获取加载的页面( 页面栈 )
    var currentPage = pages[pages.length - 1]  // 获取当前页面
    var prevPage = pages[pages.length - 2]    //获取上一个页面
    console.log(prevPage)

Guess you like

Origin blog.csdn.net/qq_42363090/article/details/93031110