Merge pull request #4 from joviqiao/master

获取设备信息方法完善mac的判断
This commit is contained in:
贤心 2017-03-19 11:29:52 +08:00 committed by GitHub
commit b6ceae2e38

View File

@ -336,6 +336,8 @@ Lay.fn.device = function(key){
return 'windows'; return 'windows';
} else if(/linux/.test(agent)){ } else if(/linux/.test(agent)){
return 'linux'; return 'linux';
} else if(/mac/.test(agent)){
return 'mac';
} else if(/iphone|ipod|ipad|ios/.test(agent)){ } else if(/iphone|ipod|ipad|ios/.test(agent)){
return 'ios'; return 'ios';
} }