feat:回退优化
This commit is contained in:
parent
56fc2f6beb
commit
12dd698d08
@ -1190,7 +1190,17 @@ const confirmLogout = () => {
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
// 获取页面栈
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length > 1) {
|
||||
// 有上一页,执行返回
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
// 没有上一页,跳转到square页面
|
||||
uni.reLaunch({
|
||||
url: "/pages/profile/myWorks",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 打开头像修改弹窗
|
||||
|
||||
Loading…
Reference in New Issue
Block a user