mirror of
https://github.com/PlayEdu/h5.git
synced 2025-12-29 17:59:52 +08:00
自动跳转pc
This commit is contained in:
@@ -104,3 +104,10 @@ export function setCategoryName(token: string) {
|
||||
export function clearCategoryName() {
|
||||
window.localStorage.removeItem("playedu-h5-categoryName");
|
||||
}
|
||||
|
||||
export function isMobile() {
|
||||
let flag = window.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