1. 下一步 (this.formList 是需要传给上一步的值)
- // 返回上一页
- setTimeout(() => {
- let pages = getCurrentPages();
- let prevPage = pages[pages.length - 2];
- prevPage.$vm.schoolName = this.formList;
- uni.navigateBack({
- delta: 1
- });
- }, 1000)
2. 返回上一步, 携带参数
- // 获取下一步返回的数据
- onShow() {
- let pages = getCurrentPages();
- if (pages[pages.length - 1].$vm.schoolName) {
- this.schoolName = pages[pages.length - 1].$vm.schoolName
- console.log(this.schoolName)
- }
- },