iframe
2024-05-31 08:12:32 阅读次数:27
// 浏览器
export const pcBrowser = (()=> {
const sUserAgent = window.navigator.userAgent.toLowerCase();
const bIsIpad = sUserAgent.match(/ipad/i) == 'ipad';
const bIsIphoneOs = sUserAgent.match(/iphone os/i) == 'iphone os';
const bIsMidp = sUserAgent.match(/midp/i) == 'midp';
const bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == 'rv:1.2.3.4';
const bIsUc = sUserAgent.match(/ucweb/i) == 'ucweb';
const bIsAndroid = sUserAgent.match(/android/i) == 'android';
const bIsCE = sUserAgent.match(/windows ce/i) == 'windows ce';
const bIsWM = sUserAgent.match(/windows mobile/i) == 'windows mobile';
return !(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM);
})()
import {pcBrowser} from './jsBridge'
if (pcBrowser && window.top.location == window.self.location && !/\/iframe|localhost/.test(window.top.location.href) && !/(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\./.test(window.top.location.origin)) {
window.location.href = `${window.location.origin}/#/iframe`
}
版权声明:本文内容来自第三方投稿或授权转载,原文地址:https://blog.51cto.com/u_15716707/6221426,作者:wx62ce30dccdeaa,版权归原作者所有。本网站转在其作品的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如因作品内容、版权等问题需要同本网站联系,请发邮件至ctyunbbs@chinatelecom.cn沟通。
上一篇:按钮设计
下一篇:【十进制与二进制如何转换?推荐一个超好用的公式编辑器】