在uniapp通过getCurrentPages()页面栈调用之前页面方法,h5可生效但app真机调试找不到方法
javascript
let pages = getCurrentPages()
let beforePage = pages[pages.length - 3]
beforePage.refresh() //真机调试refresh为undefined
解决:
后面真机调试调用对象需要在$vm里获取
javascript
let pages = getCurrentPages()
let beforePage = pages[pages.length - 3]
beforePage.$vm.refresh()