有没有好用的分发站源码?
表格们,支持IOS和安卓一个页面识别的,仿fir的那种太垃圾了
哎哟,一段js的判断问题,自己找个好看的
<script>
function judge() {
let str = (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) ? 'app': 'pc';
return str;
}
function isios() {
let str = (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad)/i)) ? 'ios': 'android';
return str;
}
if(judge()=='app'){
if(isios()=='ios')
window.location.href = "./i/index.html";
else
window.location.href = "./m/index.html";
}
if(judge()=='pc'){
window.location.href = "./web/index.html";
}
</script>