jack 7 years ago
parent
commit
11d0b67e3e
2 changed files with 10 additions and 4 deletions
  1. 10 3
      app/js/resourceShow.js
  2. 0 1
      app/js/searchListNew.js

+ 10 - 3
app/js/resourceShow.js

@ -23,7 +23,7 @@ var oattenSpan = document.getElementById("attenSpan"); //关注用户按钮
23 23
var professorId;
24 24
var orgId;
25 25
var resourceId
26
26
var imgFlag;
27 27
mui.plusReady(function() {
28 28
	var userid = plus.storage.getItem('userid');
29 29
	var self = plus.webview.currentWebview();
@ -152,6 +152,7 @@ mui.plusReady(function() {
152 152
							document.getElementById("likeResource").parentNode.style.display="none";
153 153
						}
154 154
						if(mydata.images.length) {
155
							imgFlag=1;
155 156
							var lastImg = document.getElementById("lastImg");;
156 157
							lastImg.innerHTML = '<a class="tab-re"><img src="'+ baseUrl+'/data/resource/' + mydata.images[mydata.images.length-1].imageSrc + '" /></a>';
157 158
							
@ -172,6 +173,8 @@ mui.plusReady(function() {
172 173
							oresorcePic.insertBefore(lastImg,oresorcePic.firstChild);
173 174
							oresorcePic.appendChild(firstImg,oresorcePic.lastChild);
174 175
						}else {
176
							document.getElementById('slider').style.display="none";
177
							imgFlag=2;
175 178
						}
176 179
						plus.nativeUI.closeWaiting();
177 180
						plus.webview.currentWebview().show("slide-in-right", 150);
@ -621,6 +624,10 @@ mui.plusReady(function() {
621 624
//		for(var i=0;i<pictureS.length;i++){
622 625
//		   imageStr+=pictureS[i].src+";";
623 626
//		}
627
		var oUrl=baseUrl + "/images/logo180.png";
628
		if(imgFlag==1) {
629
			oUrl=firstImg.querySelectorAll("img")[0].getAttribute("src").replace(/.jpg/,"_s.jpg");
630
		}
624 631
		if(oFen == "微信好友") {
625 632
			var share = buildShareService("weixin");
626 633
			if(share) {
@ -628,7 +635,7 @@ mui.plusReady(function() {
628 635
					content: oapplication.innerHTML,
629 636
					title: oresourceName.innerHTML,
630 637
					href: baseUrl + "/e/r.html?id=" + resourceId ,
631
					thumbs: [firstImg.querySelectorAll("img")[0].getAttribute("src").replace(/.jpg/,"_s.jpg")]
638
					thumbs: [oUrl]
632 639
				});
633 640
			}
634 641
		} else if(oFen == "微信朋友圈") {
@ -638,7 +645,7 @@ mui.plusReady(function() {
638 645
					content: oapplication.innerHTML,
639 646
					title: oresourceName.innerHTML,
640 647
					href: baseUrl + "/e/r.html?id=" + resourceId  ,
641
					thumbs: [firstImg.querySelectorAll("img")[0].getAttribute("src").replace(/.jpg/,"_s.jpg") ]
648
					thumbs: [oUrl]
642 649
				});
643 650
			}
644 651
		} else if(oFen == "新浪微博") {

+ 0 - 1
app/js/searchListNew.js

@ -188,7 +188,6 @@ var search = {
188 188
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
189 189

190 190
			} else {
191
				alert(22)
192 191
				mui('#pullrefresh').pullRefresh().disablePullupToRefresh(true);
193 192

194 193
			}