// js 编程风格
var userAgent = r.headersIn['User-Agent'];
// Windows Phone must come first because its UA also contains "Android"
if (/windows phone/i.test(userAgent)) {
// Windows Phone
window.location.href = 'https://m.hi23.com'; // 移动版网站的URL
}
// iOS detection
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
// iOS
window.location.href = 'https://m.hi23.com'; // 移动版网站的URL
}
// Android detection
if (/Android/.test(userAgent)) {
// Android
window.location.href = 'https://m.hi23.com'; // 移动版网站的URL
}
// r.headersIn['User-Agent']
var userAgent = r.headersIn['User-Agent'];
// 检查userAgent字符串中是否包含特定的手机标识
var isMobile = /Mobile|iPhone|iPad|iPod|Android|mobile|iphone|ipad|ipod|android/i.test(userAgent);
if (isMobile) {
// 如果是移动设备,跳转到移动版网页
r.uri = 'https://m.hi23.com';
}