Browse Source

在微信分享好友文章分享内容

jack 8 years ago
parent
commit
20a193f09e
1 changed files with 7 additions and 7 deletions
  1. 7 7
      app/js/professorArticle.js

+ 7 - 7
app/js/professorArticle.js

94
							zlist += ',';
94
							zlist += ',';
95
						}
95
						}
96
					}
96
					}
97
					oImgShare=baseUrl + '/data/article/' + $info.articleImg;
98
					//console.log(oImg)
97
					//console.log(oImg)
99
					//alert(oImg)
98
					//alert(oImg)
100
					($info.professor.resources) ? proZlist.innerHTML = zlist: proZlist.innerText = '';
99
					($info.professor.resources) ? proZlist.innerHTML = zlist: proZlist.innerText = '';
108
					proticleName= $info.articleTitle;
107
					proticleName= $info.articleTitle;
109
					if($info.articleContent) {
108
					if($info.articleContent) {
110
						main_content.innerHTML = $info.articleContent;
109
						main_content.innerHTML = $info.articleContent;
110
						oImgShare=main_content.innerText;
111
						var oImg = main_content.getElementsByTagName("img");
111
						var oImg = main_content.getElementsByTagName("img");
112
						for(var i = 0; i < oImg.length; i++) {
112
						for(var i = 0; i < oImg.length; i++) {
113
							(function(n) {
113
							(function(n) {
192
				var share = buildShareService();
192
				var share = buildShareService();
193
				if(share) {
193
				if(share) {
194
					shareMessage(share, "WXSceneSession", {
194
					shareMessage(share, "WXSceneSession", {
195
						content: "",
196
						title: proticleName,
195
						content: oImgShare,
196
						title: "【科袖文章】"+proticleName,
197
						href: baseUrl + "/ekexiu/shareArticalinfor.html?articleId="+proId ,
197
						href: baseUrl + "/ekexiu/shareArticalinfor.html?articleId="+proId ,
198
						thumbs: [oImgShare]
198
						thumbs: [baseUrl + "/images/logo180.png"]
199
					});
199
					});
200
				}
200
				}
201
			} else if(e.index == 2) {
201
			} else if(e.index == 2) {
202
				var share = buildShareService();
202
				var share = buildShareService();
203
				if(share) {
203
				if(share) {
204
					shareMessage(share, "WXSceneTimeline", {
204
					shareMessage(share, "WXSceneTimeline", {
205
						content: "",
206
						title: proticleName,
205
						content: oImgShare,
206
						title: "【科袖文章】"+proticleName,
207
						href: baseUrl + "/ekexiu/shareArticalinfor.html?articleId="+proId ,
207
						href: baseUrl + "/ekexiu/shareArticalinfor.html?articleId="+proId ,
208
						thumbs: [oImgShare]
208
						thumbs: [baseUrl + "/images/logo180.png"]
209
					});
209
					});
210
				}
210
				}
211
			}
211
			}