mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-12-24 04:41:06 +08:00
手机浏览跳转h5
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user