Pārlūkot izejas kodu

搜索页面搜索没内容提示

xuchunyang 8 gadi atpakaļ
vecāks
revīzija
8f1e8a2e7a
2 mainītis faili ar 22 papildinājumiem un 7 dzēšanām
  1. 9 0
      app/html/search.html
  2. 13 7
      app/js/searchhome.js

+ 9 - 0
app/html/search.html

@ -51,6 +51,15 @@
51 51
				<ul class="mui-table-view mui-table-view-chevron list">
52 52
53 53
				</ul>
54
				<div class="nodatabox" style="display:none; background: #efeff4;" id="nodatabox">
55
			        <div class="nodata">
56
			            <div class="picbox"><span class="defpic"></span></div>
57
			            <div class="txtbox">
58
			            	<p class="currword">抱歉!没找到相关匹配的内容。</p>
59
			                <p class="currtip">请重新修改搜索关键字、或筛选条件后再进行搜索</p>
60
			            </div>
61
			        </div>
62
			    </div>
54 63
			</div>
55 64
		</div>
56 65

+ 13 - 7
app/js/searchhome.js

@ -20,7 +20,7 @@ var provinceVal = document.getElementById("provinceval");
20 20
var addressVal = document.getElementById("addressval");
21 21
var subjectid = document.getElementById("subjectid");
22 22
var industryid = document.getElementById("industryid");
23

23
var nodatabox = document.getElementById("nodatabox");
24 24

25 25
mui.init({
26 26
		pullRefresh: {
@ -99,8 +99,6 @@ mui.plusReady(function(){
99 99
/*搜专家搜资源的下拉选择框*/
100 100
selectblock.addEventListener('tap', function() {
101 101
	showblock.style.display = 'block';
102
//	console.log(selectblock.style.width);
103
//	console.log(showblock.style.width);
104 102
});
105 103

106 104
mui("#li_show").on('tap', 'li', function() {
@ -275,6 +273,7 @@ function expert(key, subject, industry, province, address, authentication, pageS
275 273
				   }, 1000);
276 274
				}
277 275
				if(data.success && data.data.data != '') {
276
					nodatabox.style.display = 'none';
278 277
					var datalist = data.data.data;
279 278
					console.log(data.data.total)
280 279
					datalistEach(datalist);
@ -284,7 +283,8 @@ function expert(key, subject, industry, province, address, authentication, pageS
284 283
	                	mui('#pullrefresh3').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新	
285 284
	                }
286 285
				} else {
287
					plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
286
					//plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
287
					nodatabox.style.display = 'block';
288 288
					mui('#pullrefresh3').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新
289 289
				}
290 290
				
@ -319,6 +319,7 @@ function expert(key, subject, industry, province, address, authentication, pageS
319 319
				   }, 1000);
320 320
				}
321 321
				if(data.success && data.data.data != '') {
322
					nodatabox.style.display = 'none';
322 323
					var datalist = data.data.data;
323 324
					resourcesEach(datalist);
324 325
					mui('#pullrefresh3').pullRefresh().refresh(true);
@ -327,7 +328,8 @@ function expert(key, subject, industry, province, address, authentication, pageS
327 328
	                	mui('#pullrefresh3').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新	
328 329
	                }
329 330
				} else {
330
					plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
331
					//plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
332
					nodatabox.style.display = 'block';
331 333
					mui('#pullrefresh3').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新
332 334
				}
333 335
			},
@ -364,6 +366,7 @@ function expert2(key, subject, industry, province, address, authentication, page
364 366
			success: function(data) {
365 367
				plus.nativeUI.closeWaiting();
366 368
				if(data.success && data.data.data != '') {
369
					nodatabox.style.display = 'none';
367 370
					mui('#pullrefresh3').pullRefresh().enablePullupToRefresh(); //启用上拉刷新
368 371
					var datalist = data.data.data;
369 372
					var dice1 = data.data.total; //总条数
@ -387,7 +390,8 @@ function expert2(key, subject, industry, province, address, authentication, page
387 390
				} else {
388 391
					mui('#pullrefresh3').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新
389 392
					table.innerHTML = '';
390
					plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
393
					//plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
394
					nodatabox.style.display = 'block';
391 395
				}
392 396
			},
393 397
			error: function() {
@ -413,6 +417,7 @@ function expert2(key, subject, industry, province, address, authentication, page
413 417
			success: function(data) {
414 418
				plus.nativeUI.closeWaiting();
415 419
				if(data.success && data.data.data != '') {
420
					nodatabox.style.display = 'none';
416 421
					mui('#pullrefresh3').pullRefresh().enablePullupToRefresh(); //启用上拉刷新
417 422
					var datalist = data.data.data;
418 423
					var dice1 = data.data.total; //总条数
@ -433,7 +438,8 @@ function expert2(key, subject, industry, province, address, authentication, page
433 438
				} else {
434 439
					mui('#pullrefresh3').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新
435 440
					table.innerHTML = '';
436
					plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
441
					//plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
442
					nodatabox.style.display = 'block';
437 443
				}
438 444
			},
439 445
			error: function() {