fix(sharedWork): replace back nav with uni.reLaunch
remove the page stack navigation check, directly relaunch to the index page, add a fail toast for reLaunch failures
This commit is contained in:
@@ -106,13 +106,10 @@ const openAigcHome = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
const pages = getCurrentPages();
|
uni.reLaunch({
|
||||||
if (pages.length > 1) {
|
url: "/pages/index/index",
|
||||||
uni.navigateBack();
|
fail: () => showToast("返回首页失败"),
|
||||||
return;
|
});
|
||||||
}
|
|
||||||
|
|
||||||
openAigcHome();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCreateOwn = async () => {
|
const handleCreateOwn = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user