浏览代码

搜索跳转加载问题修改

xuchunyang 8 年之前
父节点
当前提交
4a5bcb758e
共有 3 个文件被更改,包括 31 次插入6 次删除
  1. 16 4
      app/html/search-home.html
  2. 1 0
      app/html/search.html
  3. 14 2
      app/js/index.js

+ 16 - 4
app/html/search-home.html

@ -71,7 +71,7 @@
71 71
		 var selectblock = document.getElementById("div_select");
72 72
		 var searchVal = document.getElementById("searchval");
73 73
		 var key,bigClass=1;
74
		 searchVal.focus();
74
		 //searchVal.focus();
75 75
	    /*搜专家搜资源的下拉选择框*/
76 76
		selectblock.addEventListener('tap', function() {
77 77
			showblock.style.display = 'block';
@ -92,10 +92,22 @@
92 92
		
93 93
		/*点击热门搜索*/
94 94
		mui(".hotsearch").on('tap', 'li', function() {
95
			plus.nativeUI.showWaiting();
95
		
96 96
			key = this.innerHTML;
97
			plus.nativeUI.showWaiting();//显示原生等待框
98
            plus.webview.create("../html/search.html",'search.html',{},{key:key,bigClass:bigClass});
97
			//plus.nativeUI.showWaiting();//显示原生等待框
98
           // plus.webview.create("../html/search.html",'search.html',{},{key:key,bigClass:bigClass});
99
            mui.openWindow({
100
					url: '../html/search.html',
101
					id: '../html/search.html',
102
					show:{
103
				      //autoShow:false,
104
				      aniShow:"slide-in-right",
105
				    },
106
					extras:{
107
				      key:key,
108
				      bigClass:bigClass
109
				    }
110
				});
99 111
		});
100 112
		/*按键字搜索*/
101 113
		searchval.addEventListener("keyup", function() {

+ 1 - 0
app/html/search.html

@ -97,6 +97,7 @@
97 97
			}
98 98
			if(isiOS){
99 99
				box.style.top="90px";
100
				box.style.paddingTop="0px";
100 101
			}
101 102
		</script>
102 103
	</body>

+ 14 - 2
app/js/index.js

@ -22,8 +22,20 @@ mui('.list').on('tap','a',function(){
22 22
/*点击热门领域*/
23 23
mui('.gridbg').on('tap','li',function(){
24 24
	var subject = this.getAttribute("data-title");
25
	plus.nativeUI.showWaiting();//显示原生等待框
26
    webviewShow = plus.webview.create("../html/search.html",'search.html',{},{subject:subject,bigClass:1});//后台创建webview并打开show.html
25
	//plus.nativeUI.showWaiting();//显示原生等待框
26
    //webviewShow = plus.webview.create("../html/search.html",'search.html',{},{subject:subject,bigClass:1});//后台创建webview并打开show.html
27
    mui.openWindow({
28
		url: '../html/search.html',
29
		id: '../html/search.html',
30
		show:{
31
	      //autoShow:false,
32
	      aniShow:"slide-in-right",
33
	    },
34
		extras:{
35
	      subject:subject,
36
	      bigClass:1
37
	    }
38
	});
27 39
})
28 40

29 41