微信小程序获取当前路径

const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const url = `/${currentPage.route}`;

 

posted @ 2020-04-21 10:49  Mr▪小zhou  阅读(291)  评论(0编辑  收藏  举报