为toPage增加reload、back方式

This commit is contained in:
TOP糯米 2023-03-07 11:41:17 +08:00
parent 1644642e54
commit 17e6f493ba
1 changed files with 8 additions and 0 deletions

View File

@ -163,6 +163,14 @@ function toPage(url, options, type) {
...options
};
switch (type) {
case "reload":
let pages = getCurrentPages();
currentPage = pages[pages.length - 1];
currentPage.onShow(currentPage.options);
break;
case "back":
uni.navigateBack({ delta: 1 });
break;
case "relaunch":
uni.reLaunch(params);
break;