Quellcode durchsuchen

收藏资源图片、专家浏览信息图片、资源详情关键字搜索

luyanan vor 8 Jahren
Ursprung
Commit
7bd9100738
5 geänderte Dateien mit 53 neuen und 32 gelöschten Zeilen
  1. 1 1
      app/html/searchListNew.html
  2. 35 25
      app/js/attentions2.js
  3. 3 3
      app/js/index.js
  4. 1 2
      app/js/proinfobrow.js
  5. 13 1
      app/js/resourceShow.js

+ 1 - 1
app/html/searchListNew.html

@ -14,7 +14,7 @@
14 14
		<!-- 主页面标题 -->
15 15
		<header class="mui-bar mui-bar-nav toptitbox">
16 16
			<a class="mui-action-back mui-icon mui-icon-left-nav topback leftnav"></a>
17
			<div class="searchboxNew searchboxNewT">
17
			<div class="searchboxNew searchboxNewT" id="searB">
18 18
				<form onsubmit="return false;">
19 19
					<input type="search" class="mui-input-clear searchtxtNew" placeholder="请输入专家姓名、机构、研究方向" id="searchval" />
20 20
				</form>

+ 35 - 25
app/js/attentions2.js

@ -138,33 +138,42 @@ function datalistEach(datalistd) {
138 138
       
139 139
		/*获取头像*/
140 140
		if(item.resource.images.length) {
141
			var img = baseUrl + "/images/resource/" + item.resource.resourceId + "_s.jpg";
141
			var img = baseUrl + '/data/resource/' + item.resource.images[0].imageSrc.replace(/.jpg/,"_s.jpg"); 
142 142
		} else {
143 143
			var img = "../images/default-resource.jpg";
144 144
		}
145
		
146 145
		/*判断用户是否认证*/
147
		var icont = '';
148
		var oSty = autho(item.resource.editProfessor.authType, item.resource.editProfessor.orgAuth, item.resource.editProfessor.authStatus);
149
		icont='<em class="authicon ' + oSty.sty + '"></em>'
150

151
		var title = item.resource.editProfessor.title || "";
152
		var office = item.resource.editProfessor.office || "";
153
		var orgName = item.resource.editProfessor.orgName || "";
154
		var address = item.resource.editProfessor.address || "";
155

156
		if(title != "") {
157
			title = title + " , ";
158
		}
159
		if(office != "") {
160
			office = office + " , ";
161
		}
162
		if(orgName != "") {
163
			orgName = orgName;
164
		}
165
		if(address != "") {
166
			address = " | " + address;
167
		}
146
		if(item.resource.editProfessor) {
147
			var oSty = autho(item.resource.editProfessor.authType,item.resource.editProfessor.orgAuth, item.resource.editProfessor.authStatus);
148
			oName=item.resource.editProfessor.name;
149
		}else {
150
			var oSty={};
151
			oSty.sty="";
152
			oSty.title="";
153
			if(item.resource.organization.authStatus==3) {	
154
				oSty.sty="authicon-com-ok";
155
				oSty.title="科袖认证企业";	
156
			}
157
			oName=item.resource.organization.name;
158
		 }
159

160
//		var title = item.resource.editProfessor.title || "";
161
//		var office = item.resource.editProfessor.office || "";
162
//		var orgName = item.resource.editProfessor.orgName || "";
163
//		var address = item.resource.editProfessor.address || "";
164
//
165
//		if(title != "") {
166
//			title = title + " , ";
167
//		}
168
//		if(office != "") {
169
//			office = office + " , ";
170
//		}
171
//		if(orgName != "") {
172
//			orgName = orgName;
173
//		}
174
//		if(address != "") {
175
//			address = " | " + address;
176
//		}
168 177

169 178
		var li = document.createElement('li');
170 179
		li.className = 'mui-table-view-cell mui-media';
@ -174,8 +183,9 @@ function datalistEach(datalistd) {
174 183
			'<div class="mui-media-body">' +
175 184
			'<span class="listtit">' + item.resource.resourceName + '</span>' +
176 185
			'<p class="mui-ellipsis listtit2">' + item.resource.supportedServices + '</p>' +
177
			'<span class="listtit">' + item.resource.editProfessor.name + icont + '</span>' +
178
			'<p class="listtit3"><span>' + title + '</span><span>' + office + '</span><span>' + orgName + '</span><span>' + address + '</span></p>' +
186
			'<span class="listtit">' +oName+ '<em class="authicon '+oSty.sty+'" title="'+oSty.title+'"></em>'+
187
//			'<span class="listtit">' + item.resource.editProfessor.name + icont + '</span>' +
188
//			'<p class="listtit3"><span>' + title + '</span><span>' + office + '</span><span>' + orgName + '</span><span>' + address + '</span></p>' +
179 189
			'</div></a></li>';
180 190
		table.appendChild(li, table.firstChild);
181 191
		

+ 3 - 3
app/js/index.js

@ -181,14 +181,14 @@ mui('.gridbg').on('tap', 'li', function() {
181 181
	//plus.nativeUI.showWaiting();//显示原生等待框
182 182
	//webviewShow = plus.webview.create("../html/search.html",'search.html',{},{subject:subject,bigClass:1});//后台创建webview并打开show.html
183 183
	mui.openWindow({
184
		url: '../html/search.html',
185
		id: '../html/search.html',
184
		url: '../html/searchListNew.html',
185
		id: '../html/searchListNew.html',
186 186
		show: {
187 187
			//autoShow:false,
188 188
			aniShow: "slide-in-right",
189 189
		},
190 190
		extras: {
191
			subject: subject,
191
			key: subject,
192 192
			bigClass: 1
193 193
		}
194 194
	});

+ 1 - 2
app/js/proinfobrow.js

@ -149,8 +149,7 @@ mui.plusReady(function() {
149 149
				var string = '<li class="mui-table-view-cell mui-media listitem" resouseId=' + $data[i].resourceId + '>'
150 150
				string += '<a class="proinfor"><div class="mui-media-object mui-pull-left ResImgBox ResImgBox2">'
151 151
				if($data[i].images.length) {
152
					string += '<img class="resImg headRadius" src="' + baseUrl + '/images/resource/' + $data[i].resourceId + '.jpg">'
153
152
					string += '<img class="resImg headRadius" src="'+ baseUrl+'/data/resource/' + $data[i].images[0].imageSrc + '" />'
154 153
				} else {
155 154
156 155
					string += '<img class="resImg headRadius" src="../images/default-resource.jpg">'

+ 13 - 1
app/js/resourceShow.js

@ -173,6 +173,16 @@ mui.plusReady(function() {
173 173
			});
174 174
		})
175 175
	}
176
	//关键词标签点击进去搜索
177
	mui(".tagList").on("tap","li",function(){
178
		var tagText = this.getElementsByTagName("span")[0].innerText;
179
		console.log(tagText)
180
		plus.nativeUI.showWaiting();
181
		plus.webview.create("../html/searchListNew.html", 'searchListNew.html', {}, {
182
			key: tagText,
183
			/*qiFlag: 2*/
184
		});
185
	})
176 186
	/*资源里面相关文章*/
177 187
	function relatedArticles() {
178 188
		mui.ajax(baseUrl + '/ajax/resource/articles', {
@ -366,10 +376,11 @@ mui.plusReady(function() {
366 376
	//相关文章详情
367 377
	mui('#likeArtical').on('tap', 'li', function() {
368 378
		var artId = this.getAttribute("data-id");
379
		var professorId = othisInfo.getAttribute("data-id");
369 380
		plus.nativeUI.showWaiting();
370 381
		plus.webview.create("../html/professorArticle.html", 'professorArticle.html', {}, {
371 382
			articleId: artId,
372
			ownerid:professorId
383
			ownerid: professorId
373 384
		});
374 385
	});
375 386
	//感兴趣的资源详情
@ -625,6 +636,7 @@ mui.plusReady(function() {
625 636
					title: oresourceName.innerHTML,
626 637
					href: baseUrl + "/ekexiu/shareResinfor.html?resourceId=" + resourceId,
627 638
					thumbs: [firstImg.querySelectorAll("img")[0].getAttribute("src").replace(/.jpg/,"_s.jpg") ]
639
					
628 640
				});
629 641
			}
630 642
		}