// 获取加载的页面
const pages = getCurrentPages()
// 获取当前页面的对象
const currentPage = pages[pages.length-1]
//获取前一个页面的对象
const currentPage = pages[pages.length-2]
// 当前页面url
const url = currentPage.route
// 如果要获取url中所带的参数可以查看options
const options = currentPage.options