var pages = getCurrentPages();
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
//直接调用上一个页面的setData()方法,把数据存到上一个页面中去
prevPage.setData({
hope_job:"test"
})
uni.navigateBack();
===========================
onShow:function(e){
let pages = getCurrentPages();
let currPage = pages[pages.length-1];
if (currPage.data.hope_job==""){
this.getHopeJob();
}else{
this.hope_job = currPage.data.hope_job
}
}