export default function getDetect() {
let platForm = navigator.platform;
let isWin = platForm === 'Win32' || platForm === 'Windows';
let isMac =
platForm === 'Mac68K' ||
platForm === 'MacPPC' ||
platForm === 'Macintosh' ||
platForm === 'MacIntel';
let isLinux = platForm.indexOf('Linux') > -1;
let detectType = 'other';
if (isMac){
detectType = 'mac'
}
if (isWin){
detectType = 'windows'
}
if (isLinux){
detectType = 'linux'
}
return detectType;
}
获取操作系统信息
于 2021-02-19 10:51:08 首次发布