feat(mp): 新增 navigate 工具函数

This commit is contained in:
iven
2026-05-13 23:29:56 +08:00
parent df1d85bfde
commit 675d5a3405

View File

@@ -0,0 +1,12 @@
import Taro from '@tarojs/taro';
const LOGIN_PAGE = '/pages/login/index';
export function navigateToLogin() {
Taro.navigateTo({
url: LOGIN_PAGE,
fail: () => {
Taro.reLaunch({ url: LOGIN_PAGE });
},
});
}