手机浏览跳转h5

This commit is contained in:
禺狨
2023-07-03 14:22:47 +08:00
parent d47f1a9250
commit 2949eaafda
3 changed files with 25 additions and 1 deletions

View File

@@ -104,3 +104,10 @@ export function changeAppUrl(str: string) {
return str + "/";
}
}
export function isMobile() {
let flag = navigator.userAgent.match(
/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
);
return flag;
}