提交对首页跳转登录页的问题

This commit is contained in:
2024-08-02 16:41:52 +08:00
parent 01e3d60b6c
commit 6f253ba5b9
7 changed files with 30 additions and 88 deletions

View File

@@ -238,4 +238,12 @@ export const getPixelRatio = () => {
export function isValidPhoneNumber(phoneNumber) {
return /^1\d{10}$/.test(phoneNumber);
}
/** 获取当前页面url */
export function getPageUrl() {
const pages = getCurrentPages() //获取加载的页面
const currentPage = pages[pages.length-1] //获取当前页面的对象
const url = currentPage.route //当前页面url
return url
}