WeChat applet to get the current path

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

 

Guess you like

Origin www.cnblogs.com/xiaozhou223/p/12742992.html