Browse Source

在专家浏览页面点击资源进入资源详情页面

lipengtao 8 years ago
parent
commit
b42942e023
1 changed files with 20 additions and 11 deletions
  1. 20 11
      app/js/proinfobrow.js

+ 20 - 11
app/js/proinfobrow.js

@ -11,13 +11,15 @@ mui.plusReady(function() {
11 11
	/*点击咨询*/
12 12
	ozixun.addEventListener('tap', function() {
13 13
		var flag = 'professor';
14
		var nwaiting = plus.nativeUI.showWaiting();//显示原生等待框
15
		webviewShow = plus.webview.create("../html/consultapply.html",'consultapply.html',{},
16
		{'proId': proId,'flag': flag});
17
		
18
	    webviewShow.addEventListener("loaded", function() {
19
	        
20
	    }, false);
14
		var nwaiting = plus.nativeUI.showWaiting(); //显示原生等待框
15
		webviewShow = plus.webview.create("../html/consultapply.html", 'consultapply.html', {}, {
16
			'proId': proId,
17
			'flag': flag
18
		});
19
20
		webviewShow.addEventListener("loaded", function() {
21
22
		}, false);
21 23
	});
22 24
	//查询学术领域
23 25
	var subjectShow = function(data) {
@ -113,8 +115,8 @@ mui.plusReady(function() {
113 115
			var $data = odata;
114 116
			var html = [];
115 117
			for(var i = 0; i < odata.length; i++) {
116
				var string = '<li class="mui-table-view-cell mui-media">'
117
				string += '<a class="proinfor" href="resinforupdate.html">'
118
				var string = '<li class="mui-table-view-cell mui-media" resouseId=' + $data[i].resourceId + '>'
119
				string += '<a class="proinfor">'
118 120
				if($data[i].images.length) {
119 121
					string += '<img class="mui-media-object mui-pull-left resimg" src="../images/resource/' + $data[i].resourceId + '.jpg">'
120 122
@ -143,7 +145,7 @@ mui.plusReady(function() {
143 145
			timeout: 10000, //超时设置
144 146
			success: function(data) {
145 147
				plus.nativeUI.closeWaiting();
146
				plus.webview.currentWebview().show("slide-in-right",150);
148
				plus.webview.currentWebview().show("slide-in-right", 150);
147 149
				var $data = data.data;
148 150
				personalMaterial[0].innerText = $data.name;
149 151
				//基本信息
@ -268,7 +270,14 @@ mui.plusReady(function() {
268 270
	})
269 271
270 272
	personalMessage();
271
273
	/*进入资源详细页面*/
274
	mui("#resourceList").on('tap', 'li', function() {
275
		var resouId = this.getAttribute("resouseId");
276
		plus.nativeUI.showWaiting();
277
		plus.webview.create("../html/resinforbrow.html", 'resinforbrow.html', {}, {
278
			resourceId: resouId
279
		});
280
	});
272 281
	/*咨询成功,返回专家信息*/
273 282
	window.addEventListener('backproinfo', function(event) {
274 283
		var proid = event.detail.proId;