微信小程序获取当前路径

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

猜你喜欢

转载自www.cnblogs.com/xiaozhou223/p/12742992.html