feat: 登录成功返回页

This commit is contained in:
wangtaocs
2024-11-28 10:19:54 +08:00
parent dd7a4795fc
commit b157d6f1bc

View File

@@ -97,6 +97,16 @@ const handleWechatLogin = async () => {
title: "登录成功",
icon: "success",
});
const pages = getCurrentPages();
if (pages.length > 1) {
uni.navigateBack();
} else {
uni.reLaunch({
url: "/pages/index/index",
});
}
}
} catch (error: any) {
console.error("微信登录失败", error);