wangchuanjin 7 年之前
父节点
当前提交
97a7a3a091

+ 6 - 2
src/jfw/modules/app/src/web/staticres/jyapp/js/wxEntsesearch.js

@@ -340,9 +340,13 @@ var EntSearch = {
         $("#entsearchPage .jydqsure").removeClass("jydqsure_active");
         $("#entsearchPage .jydqsure").removeClass("jydqsure_active");
 		EntSearch.resetSx();
 		EntSearch.resetSx();
 		if(flag){
 		if(flag){
-			setTimeout(function(){
+			if(mySysIsIos()){
 				$("#entsearchPage #ent_searchinput").focus();
 				$("#entsearchPage #ent_searchinput").focus();
-			},100);
+			}else{
+				setTimeout(function(){
+					$("#entsearchPage #ent_searchinput").focus();
+				},100);
+			}
 		}
 		}
 	},
 	},
 	afterFocus: function(){
 	afterFocus: function(){

+ 7 - 2
src/jfw/modules/app/src/web/staticres/jyapp/js/wxSupersearch.js

@@ -516,10 +516,15 @@ var SuperSearch = {
 		$("#supersearchPage input[name=super_searchinput]").val("");
 		$("#supersearchPage input[name=super_searchinput]").val("");
 		var thisClass = this;
 		var thisClass = this;
 		if(flag){
 		if(flag){
-			setTimeout(function(){
+			if(mySysIsIos()){
 				$("#supersearchPage input[name=super_searchinput]").focus();
 				$("#supersearchPage input[name=super_searchinput]").focus();
 				thisClass.afterFocus();
 				thisClass.afterFocus();
-			},100);
+			}else{
+				setTimeout(function(){
+					$("#supersearchPage input[name=super_searchinput]").focus();
+					thisClass.afterFocus();
+				},100);
+			}
 		}
 		}
 		this.getIndustry();
 		this.getIndustry();
 		this.resetSx();//重置筛选
 		this.resetSx();//重置筛选

+ 3 - 0
src/web/staticres/js/common.js

@@ -356,6 +356,9 @@ function moveEnd(obj) {
 		obj.selectionStart = obj.selectionEnd = len;
 		obj.selectionStart = obj.selectionEnd = len;
 	}
 	}
 }
 }
+function mySysIsIos(){
+	return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
+}
 $(function(){
 $(function(){
 	//自定义tap
 	//自定义tap
     $(document).on("touchstart", function(e) {
     $(document).on("touchstart", function(e) {

+ 6 - 2
src/web/staticres/js/wxEntsesearch.js

@@ -333,9 +333,13 @@ var EntSearch = {
         $("#entsearchPage .jydqsure").removeClass("jydqsure_active");
         $("#entsearchPage .jydqsure").removeClass("jydqsure_active");
 		EntSearch.resetSx();
 		EntSearch.resetSx();
 		if(flag){
 		if(flag){
-			setTimeout(function(){
+			if(mySysIsIos()){
 				$("#entsearchPage #ent_searchinput").focus();
 				$("#entsearchPage #ent_searchinput").focus();
-			},100);
+			}else{
+				setTimeout(function(){
+					$("#entsearchPage #ent_searchinput").focus();
+				},100);
+			}
 		}
 		}
 	},
 	},
 	afterFocus: function(){
 	afterFocus: function(){

+ 7 - 2
src/web/staticres/js/wxSupersearch.js

@@ -501,10 +501,15 @@ var SuperSearch = {
 		$("#supersearchPage input[name=super_searchinput]").val("");
 		$("#supersearchPage input[name=super_searchinput]").val("");
 		var thisClass = this;
 		var thisClass = this;
 		if(flag){
 		if(flag){
-			setTimeout(function(){
+			if(mySysIsIos()){
 				$("#supersearchPage input[name=super_searchinput]").focus();
 				$("#supersearchPage input[name=super_searchinput]").focus();
 				thisClass.afterFocus();
 				thisClass.afterFocus();
-			},100);
+			}else{
+				setTimeout(function(){
+					$("#supersearchPage input[name=super_searchinput]").focus();
+					thisClass.afterFocus();
+				},100);
+			}
 		}
 		}
 		this.getIndustry();
 		this.getIndustry();
 		this.resetSx();//重置筛选
 		this.resetSx();//重置筛选