getcurrentpages专题

uni-app小程序、app返回上级页面并向上级页面传参(1.$on/$emit,2. 页面栈getCurrentPages())--问题记录

e m i t , emit, emit,on 方法 onBackPress(e) { //监听返回事件api、与methods同级uni.$emit("handClick",{//点击返回的这个页面触发一个事件,使用uni.$emit(“handClick”,{})rightText: this.rightText, //传递的参数checkedBoxArray: this.checkedB

微信小程序页面栈实验及getCurrentPages方法的使用

创建两个页面一个模拟微博展示页,另一个模拟微博编辑页:  微博展示页代码如下: // pages/weibo/weibo.jsPage({/*** 页面的初始数据*/data: {weibos:[]},writeweibo:function(event){wx.navigateTo({url: '/pages/writeweibo/writeweibo',})}}) <!--