A – B – A process.

// Data ={value: "} onShow(){console.log(this.value)} // Methods ={goB(){weby.navigateto ({url: B); }}
// Pages onLoad(options){} methods = {goBackA(){var pages = getCurrentPages(); Var prevPage = pages[pages.length-2]; var prevPage = pages[pages.length-2]; // Prev Page. SetData ({value:2}) weby.navigateBack ({delta: 1})}}

Began to feel is not very simple, native has

Unexpected situation happens, in page A onShow method printed value is empty, also can not fetch, but the page can render… Meng force

Finally in the company god remind to look at the preload method



The website address

A page is modified as follows

    this.$preload('preload',preloadData)
    wepy.navigateTo({ url: B);

Then perfect implementation, is not super simple. Specific preload usage reference https://www.cnblogs.com/l-yabiao/p/9136327.html

Just so-so writing. Give it a thumbs up