var pages = getCurrentPages(); //当前页面
var beforePage = pages[pages.length - 2]; //前一页
if (beforePage.route == 'subPackagesClient/pages/cookBook/cookBookAdd/cookBookAdd') {
let boxes=beforePage.data.boxes//前一页的boxes数据
boxes[index1].seasoningBox[index2]={...boxList[index],input:'0g'}
beforePage.setData({
boxes
})
wx.navigateBack({
delta: 1
});
}
小程序选择数据传回上一页并返回
于 2023-07-19 11:58:56 首次发布