浏览代码

移动端调整

anderx 4 年之前
父节点
当前提交
572c88d803
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/main/java/com/kede/core/shiro/filter/ShiroFilterUtils.java

+ 5 - 3
src/main/java/com/kede/core/shiro/filter/ShiroFilterUtils.java

@@ -38,7 +38,11 @@ public class ShiroFilterUtils {
 	 * @return
 	 */
 	public boolean isMobileDevice(HttpServletRequest request) {
-		String[] deviceArray = new String[]{"android","blackBerry","windows phone","iphone","ipod","ipad"};
+//		phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone
+		String[] deviceArray = new String[]{
+				"phone","pad","pod","iphone","ipod","ios","ipad","android","Mobile",
+				"BlackBerry","IEMobile","MQQBrowser","JUC","Fennec",
+				"wOSBrowser","BrowserNG","WebOS","Symbian","Windows Phone"};
 		if(request.getHeader("User-Agent") != null){
 			String agent = request.getHeader("User-Agent");
 			for(int i = 0; i<deviceArray.length; i++){
@@ -62,8 +66,6 @@ public class ShiroFilterUtils {
 	/**
 	 * response 输出JSON
 	 * 
-	 * @param hresponse
-	 * @param resultMap
 	 * @throws IOException
 	 */
 	public void out(HttpServletResponse response, Result res) {