Browse Source

地区修改

xuchunyang 8 years ago
parent
commit
52c54970db
1 changed files with 7 additions and 93 deletions
  1. 7 93
      app/js/searchhome.js

+ 7 - 93
app/js/searchhome.js

16
var table = document.body.querySelector('.list');
16
var table = document.body.querySelector('.list');
17
var yyhy = document.getElementById("yyhy");
17
var yyhy = document.getElementById("yyhy");
18
var xsly = document.getElementById("xsly");
18
var xsly = document.getElementById("xsly");
19
//var provinceVal = document.getElementById("provinceval");
20
//var addressVal = document.getElementById("addressval");
21
var subjectid = document.getElementById("subjectid");
19
var subjectid = document.getElementById("subjectid");
22
var industryid = document.getElementById("industryid");
20
var industryid = document.getElementById("industryid");
23
var nodatabox = document.getElementById("nodatabox");
21
var nodatabox = document.getElementById("nodatabox");
65
	console.log(address);
63
	console.log(address);
66
	console.log(province);
64
	console.log(province);
67
	console.log(authentication);*/
65
	console.log(authentication);*/
66
	plus.nativeUI.showWaiting();
68
	expert(key, subject, industry, province, address, authentication, 10, 1);
67
	expert(key, subject, industry, province, address, authentication, 10, 1);
69
})
68
})
70

69

138
	}
137
	}
139
})
138
})
140

139

141
/*省会*/
142
/*mui(".provinceval").on('tap', 'a', function() {
143
	key = searchVal.value;
144
	province = this.innerText;
145
	document.querySelector('#provinceval li a.active').classList.remove('active');
146
	this.classList.add("active");
147
	if(province == "全国") {
148
		province = "";
149
		address = "";
150
		document.getElementById("addressid").innerText = "全国";
151
		addressVal.innerHTML = "";
152
		plus.nativeUI.showWaiting();
153
		mui('.mui-popover').popover('hide');
154
		expert(key, subject, industry, province, address, authentication, 10, 1);
155
	} else {
156
		mui.ajax(baseUrl + '/ajax/dataDict/qaCity', {
157
			data: {
158
				"dictCode": "ADDRESS",
159
				province: province
160
			},
161
			dataType: 'json', //数据格式类型
162
			type: 'GET', //http请求类型
163
			timeout: 10000,
164
			success: function(data) {
165
				if(province == "北京市" || province == "上海市" || province == "天津市" || province == "重庆市" ){
166
					var finallist = '';
167
				}else{
168
					var finallist = '<li class="mui-table-view-cell"><a class="active">全省</a></li>';
169
				}
170
				console.log(data.success)
171
				console.log(JSON.stringify(data.data))
172
				if(data.success && data.data != "") {
173
					mui.each(data.data, function(i, n) {
174
						finallist += '<li class="mui-table-view-cell"><a >' + n.caption + '</a></li>';
175
					});
176
					addressVal.innerHTML = finallist;
177
					addressVal.firstChild.childNodes.item(0).classList.add('active');
178
				}
179

180
			},
181
			error: function() {
182
				plus.nativeUI.toast("服务器链接超时", toastStyle);
183
			}
184
		});
185
	}
186
});*/
187

188
/*市检索*/
189
/*mui("#addressval").on('tap', 'a', function() {
190
	key = searchVal.value;
191
	address = this.innerText;
192
	document.getElementById("addressid").innerText = address;
193
	document.querySelector('#addressval li a.active').classList.remove('active');
194
	this.classList.add("active");
195
	if(address == "全省") {
196
		address = "";
197
		document.getElementById("addressid").innerText = province;
198
	}
199
	//console.log(province);
200
	//console.log(address);
201
	plus.nativeUI.showWaiting();
202
	mui('.mui-popover').popover('hide');
203
	expert(key, subject, industry, province, address, authentication, 10, 1);
204
})*/
205

206
/*应用行业*/
140
/*应用行业*/
207
mui(".yyhy").on('tap', 'a', function() {
141
mui(".yyhy").on('tap', 'a', function() {
208
	pageNo = 1
142
	pageNo = 1
285
					mui('#pullrefresh3').pullRefresh().refresh(true);
219
					mui('#pullrefresh3').pullRefresh().refresh(true);
286
	                mui('#pullrefresh3').pullRefresh().scrollTo(0,0);
220
	                mui('#pullrefresh3').pullRefresh().scrollTo(0,0);
287
	                if(data.data.total<data.data.pageSize){
221
	                if(data.data.total<data.data.pageSize){
288
	                	mui('#pullrefresh3').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新	
222
	                	mui('#pullrefresh3').pullRefresh().endPullupToRefresh(true);//不能上拉
223
	                }else{
224
	                	mui('#pullrefresh3').pullRefresh().endPullupToRefresh(false); //能上拉
289
	                }
225
	                }
290
				} else {
226
				} else {
291
					//plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
227
					//plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
331
					mui('#pullrefresh3').pullRefresh().refresh(true);
267
					mui('#pullrefresh3').pullRefresh().refresh(true);
332
	                mui('#pullrefresh3').pullRefresh().scrollTo(0,0,0);
268
	                mui('#pullrefresh3').pullRefresh().scrollTo(0,0,0);
333
	                if(data.data.total<data.data.pageSize){
269
	                if(data.data.total<data.data.pageSize){
334
	                	mui('#pullrefresh3').pullRefresh().disablePullupToRefresh(); //没有数据禁止上拉刷新	
270
	                	mui('#pullrefresh3').pullRefresh().endPullupToRefresh(true);//不能上拉
271
	                }else{
272
	                	mui('#pullrefresh3').pullRefresh().endPullupToRefresh(false); //能上拉
335
	                }
273
	                }
336
				} else {
274
				} else {
337
					//plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
275
					//plus.nativeUI.toast("抱歉,没有找到对应的搜索", toastStyle);
597
}
535
}
598

536

599
mui.plusReady(function(){
537
mui.plusReady(function(){
600
//省
601
/*mui.ajax(baseUrl + '/ajax/dataDict/qaCity', {
602
	data: {
603
		"dictCode": "PROVINCE"
604
	},
605
	dataType: 'json', //数据格式类型
606
	type: 'GET', //http请求类型
607
	timeout: 10000,
608
	success: function(data) {
609
		var finallist = '<li class="mui-table-view-cell"><a class="active">全国</a></li>';
610
		console.log(data.success)
611
		console.log(JSON.stringify(data.data))
612
		if(data.success && data.data != "") {
613
			mui.each(data.data, function(i, n) {
614
				finallist += '<li class="mui-table-view-cell"><a >' + n.caption + '</a></li>';
615
			});
616
			provinceVal.innerHTML = finallist;
617
		}
618

619
	},
620
	error: function() {
621
		plus.nativeUI.toast("服务器链接超时", toastStyle);
622
	}
623
});*/
624
//应用行业
538
//应用行业
625
mui.ajax(baseUrl + '/ajax/dataDict/qaDictCode', {
539
mui.ajax(baseUrl + '/ajax/dataDict/qaDictCode', {
626
	data: {
540
	data: {