luyanan 7 years ago
parent
commit
45810a4e20

+ 68 - 3
css/share.css

@ -5,7 +5,8 @@ html,body {outline: 0;margin:0;padding:0px;background: #F4F6F8;-webkit-text-size
5 5
/*.contentBody2 *{-webkit-user-select: none;}*/
6 6
.iconfontnew{display: inline-block;width: 18px;height: 18px;*margin-right: .3em;line-height: 18px;vertical-align: text-top;
7 7
  background-position: center center; background-repeat: no-repeat;background-size: cover;}
8
.icon-address{width:11px;height:14px;background-image: url("../images/personal_icon_dizhi_nor@3x.png");background-size:cover;line-height: 14px;}
8
.icon-address{width:11px;height:14px;background-image: url("../images/personal_icon_dizhi_nor@3x.png");line-height: 14px;}
9
.icon-shoucang{background-image: url("../images/h5_img/article_button_shoucang_nor@3x.png");}
9 10
/*input输入相关*/
10 11
.frmbtn {width: 100%;margin: 4% auto;font-size: 14px;line-height: 24px;padding:2%;border: 1px solid #FF9900;border-radius: 6px;color: #FF9900;outline: none;}
11 12
.frmactive {color: #fff;background-color: #FF9900;border: 1px solid #FF9900;}
@ -64,9 +65,11 @@ html,body {outline: 0;margin:0;padding:0px;background: #F4F6F8;-webkit-text-size
64 65
			display:         flex; 
65 66
	        -webkit-align-items: center;
66 67
	                align-items: center;}
68
.flex-pright{padding-right: 64px;}
67 69
/*文章浏览*/
68 70
.topFu{background: rgba(0,0,0,.6);padding:10px 15px;position: fixed;right:0;left:0;z-index:200;}
69 71
.topLogo{width:60px;height:30px;background: url(../images/home_icon_logo_orange.png);background-size: cover;}
72
.goSpan{display: inline-block;position: absolute;top: 50%;margin-top: -15px;right: 0;}
70 73
.goSpan span{background: #ff9900;display:inline-block;text-align: center;width:48px;cursor:pointer;color:#fff;font-size:16px;border-radius:4px;padding:4px;}
71 74
.goSpan .attenSpan{position: relative;padding-left: 14px;background-image:url(../images/g_article_icon_jia_nor.png);background-size:12px 12px;background-position: 8px center;background-repeat: no-repeat;}
72 75
.goSpan .attenedSpan{background:#ccc;padding-left:16px;}
@ -87,7 +90,7 @@ html,body {outline: 0;margin:0;padding:0px;background: #F4F6F8;-webkit-text-size
87 90
#articleContent ul>li>p,#articleContent ol>li>p{margin: 0;}
88 91
ul.tagList{padding:0;margin:18px 0 8px;overflow: hidden;}
89 92
ul.tagList>li{list-style:none;float: left;margin-right:10px;margin-bottom:10px;padding:4px 12px;color: #666;background:#EFEFEF;}
90
ul.tagList>li .h2Font{color: #666;}
93
ul.tagList>li .h2Font{font-size: 14px;color: #666;line-height: 16px;}
91 94
.madiaBlock{clear:both;}.madiaBlock:before,.madiaBlock:after{display:table;content:""}.madiaBlock:after{clear: both;}
92 95
.madiaBlock ul.mui-table-view{margin:10px 0;overflow: hidden;}
93 96
.madiaBlock ul.mui-table-view li{position: relative;cursor: pointer;}
@ -114,10 +117,13 @@ ul.tagList>li .h2Font{color: #666;}
114 117
.madiaBlock .madiaInfo .h2Font{font-size: 14px;margin: 0;line-height: 22px;color:#999999;}
115 118
.madiaBlock .madiaInfo .ellipsisSty-2{max-height: 44px;}
116 119
.madiaBlock .madiaInfo .time{font-size:14px;color:#999;}
120
.madiaBlock ul.mui-table-view.noactiveTab>li{padding: 0;position: relative;}
117 121
/*点赞模块*/
118 122
.thumbBlock{text-align: center;margin:30px 0;}
119 123
.thumbBlock .thumbBtn{display:inline-block;position:relative;padding:10px 24px;padding-left:44px;font-size:16px;color:#fff;background:url(../images/g_article_icon_dianzan_nor.png) no-repeat 24px center;background-size:16px 16px;background-color:#ff9900;border-radius:30px;cursor: pointer;}
120 124
.thumbBlock .thumbBtn.thumbedBtn{background: #e0e0e0;}
125
.thumbBlock .stepBtn{display:inline-block;position:relative;padding:10px;padding-left:30px;font-size:16px;color:#666;background:url(../images/h5_img/g_article_icon_cai_nor.png) no-repeat 10px center;background-size:16px 16px;cursor: pointer;}
126
.thumbBlock .stepBtn.stepedBtn{opacity: .6;}
121 127
/*留言*/
122 128
.madiaBlock .commentBlock li{padding:4px 0;}
123 129
.commentBlock .flexCenter{min-height:38px;}
@ -241,7 +247,7 @@ ul.mui-table-view>li:last-child:after{background: none;}
241 247
.infocon .starShow{position: absolute;right: 0;top:50%; margin-top:-8px;overflow: hidden;}
242 248
.infocon .starShow>li{float: left;margin:0 2px;display: inline-block;width: 14px;height: 14px;background-image: url(../images/favoricon.png);background-size: 100% auto;background-position:0 0;}
243 249
.infocon .starShow>li.evastar{background-position:0 -14px;} 
244
.commentsArea .madiaHead.useHeadMsg{top:10px;margin-top:0;}
250
.commentBlock .madiaHead.useHeadMsg{top:10px;margin-top:0;}
245 251
246 252
/*下载按钮及公众二维码*/
247 253
.shareEcode{padding:20px 6px;background: #FFFFFF;}
@ -388,3 +394,62 @@ ul.mui-table-view>li:last-child:after{background: none;}
388 394
.advertItem .swiper-pagination-bullet{width:6px; height:6px;}
389 395
.advertsub{position: relative;display: block;}
390 396
.advertsub:after{content:"广告";font-size:10px;color:#fff;background:rgba(0,0,0,0.3);position:absolute;padding:0 4px;right:0;bottom:0px;}
397
398
/*问答 2017.12.26*/
399
.qa-count{position: relative;padding:6px 15px;background:#fff;}    
400
.qa-count>span{position:absolute;top:50%;display:inline-block;width:32px; height:32px;margin-top:-16px;background:url(../images/zan_qa_icon_hig@3x.png);background-size:cover}
401
.qa-count>p{padding-left:40px;margin: 0;line-height: 32px;font-size:15px;}
402
.qa-count>p>em{color:#FF9900;font-weight:bold;}
403
.qa-owner{overflow: hidden;min-height:40px;margin: 6px 0 2px;}
404
.searchTab .qa-owner{min-height:40px;}
405
.qa-owner .owner-head{position:absolute;top:50%;background-position: center;background-size: cover;}
406
.qa-owner .owner-head.useHead{width:32px;height:32px;margin-top:-16px;background-image: url(../images/default-photo.jpg);border-radius: 50%;}
407
.qa-owner .owner-info{padding-left:38px;width:100%;}
408
.owner-name{float: left;}
409
.owner-name .h1Font{font-size:16px;line-height: 30px;}
410
.owner-tit{margin-left:10px;float: left;max-width:70%;color:#888888;font-size: 14px;}
411
.qa-con{font-size:14px;line-height: 22px;color:#666;}
412
.mui-table-view.partLine{background: none;}
413
.mui-table-view.partLine>.mui-table-view-cell{margin-bottom: 10px;background: #fff; padding: 11px 15px;}
414
.mui-table-view.partLine>.mui-table-view-cell:after{content:none;}
415
.qa-btnlink{margin-bottom: 10px;background:#fff;}
416
.qa-btnlink .mui-media-object.btnLinkIcon{width:22px; height:22px;margin-top:-11px;left: 8px;}
417
.qa-btnlink .madiaBlock{overflow: hidden;}
418
.qa-top{border-bottom: 1px solid #e5e5e5;}
419
.qa-top .flexCenter{padding:0 15px;min-height:68px;}
420
.qa-top .unlogin{font-size:14px;color:#ff9900;line-height:68px;text-align: center;}
421
.qa-top .onlogin{position: relative;}
422
.showDetail>.qa-top{margin:0 -15px;padding:0 15px;min-height:48px;}
423
.showDetail>.qa-top .flex-pright{padding-right:26px;}
424
.searchTab .qa-btnlink .mui-media{text-align: center;}
425
.searchTab .qa-btnlink .mui-media-body.btnLink{display: inline-block;font-size:15px;line-height: 24px;padding-left:36px;}
426
.searchTab .qa-btnlink .mui-table-view-cell{padding:8px 15px;height:auto}
427
.searchTab .qa-btnlink .mui-table-view-cell>div{position:relative;display: inline-block;}
428
.show-item{overflow: hidden;}
429
.show-item>span{padding-right:10px;}
430
.qa-title{padding:15px;border-bottom:1px solid #e5e5e5;font-size: 16px;}
431
.request-qa .yaoqing{position: absolute;right: 15px;top:50%;margin-top:-16px;padding:6px 14px;color:#fff;background: #ff9900;border-radius:4px;}
432
.request-qa .yiyaoqing{background: #ccc;padding:6px 7px;}
433
.searchTab .mui-table-view.myAllneeds>.mui-table-view-cell{height: auto;}
434
.searchTab .mui-table-view.myAllneeds .madiaInfo{padding-left: 0;}
435
436
.list-main ul {display: block;padding: 0;list-style-type: none;font-size: 0;}
437
.list_content{background: #fff;padding:6px 15px;overflow: hidden;margin-bottom: 10px;}
438
.list-hold-count{padding:0 15px;border-bottom:1px solid #e5e5e5;background:#fff;line-height:42px;overflow: hidden;}
439
.list-hold-count>span{float: left;}
440
.list-hold-count>ul{float: right;}
441
.list-hold-count>ul>li{float:left;display: inline-block;}
442
.list-hold-count>ul>li>span{position: relative;top:5px;display:inline-block;font-size:14px;line-height:24px;padding:0 10px;border:1px solid #e5e5e5}
443
.list-hold-count>ul>li.active>span{background: #ff9900;color:#fff;border-color: #ff9900}
444
.list-hold .qa-owner{margin: 0;}
445
.item_detail .h1Font{font-weight:normal;font-size:18px;line-height:24px;color:#000}
446
.item_detail .list_con{font-size: 15px;color: #333;line-height: 24px;margin: 6px 0;text-align:justify}
447
.list_image,.item-btn{overflow: hidden;}
448
.list_image li,.item-btn li{display: inline-block; overflow: hidden; width: 33.3%; -webkit-box-sizing: border-box;box-sizing: border-box;position: relative;}
449
.list_image li>.imgspan{display: block;width: 98%;height:90px;background-size: cover;background-position: center;}
450
451
.item-btn{margin:6px -16px -15px -15px;border-top:1px solid #e5e5e5;}
452
.item-btn li{border-right:1px solid #e5e5e5;height: 46px;}
453
.item-btn li>span{display: inline-block;width: 100%;text-align: center;color:#666;font-size:14px;padding:8px 0;}
454
.item-btn li.answered>span{color:#FF0000}
455
.item-btn li.collectBtn>span{position:absolute;width:20px;left:50%;margin-left:-10px;top:8px;height:4px;}

+ 9 - 52
e/a.html

@ -13,8 +13,10 @@
13 13
<script type="text/javascript" src="../js/public/swiper.min.js"></script>	
14 14
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
15 15
<script type="text/javascript" src="../js/public/shareCom.js"></script>	
16
<script type="text/javascript" src="../js/public/shareLeaveWord.js"></script>	
16 17
<script type="text/javascript" src="../js/public/openApp.js"></script>	
17
<script type="text/javascript">
18
<script type="text/javascript">
19
	addscript("ad_article_h5_ding");
18 20
	addscript("ad_article_h5_top");
19 21
	addscript("ad_article_h5_bottom");
20 22
</script>
@ -50,6 +52,10 @@
50 52
					</div>
51 53
				</li>
52 54
			</ul>
55
		</div>
56
		<!--广告模块-->
57
		<div class="madiaBlock advertItem advertItem-ding">
58
			
53 59
		</div>
54 60
		<!--文章内容区-->
55 61
		<div class="showMain" id="articleContent">
@ -126,7 +132,7 @@
126 132
		var shareTitle;
127 133
		var appid = '';
128 134
		var articleId = GetQueryString("id");
129
		leword(500, 1);//liuyan
135
		module.lWord(articleId,1);
130 136
		wlog("article", articleId, 3)
131 137
		//进入发布者详情页面
132 138
		$("#personAL").on("click", function() {
@ -158,10 +164,6 @@
158 164
			var OdataId=this.getAttribute("data-id");
159 165
			location.href="http://" + window.location.host + "/e/p.html?id=" + OdataId;
160 166
		})
161
		$(".commentBlock").on("click","li>.flexCenter",function(){
162
			var OdataId=this.getAttribute("data-id");
163
			location.href="http://" + window.location.host + "/e/p.html?id=" + OdataId;
164
		})
165 167
		$("#companyList").on("click","li", function() {
166 168
			var OdataId=this.getAttribute("data-id");
167 169
			location.href="http://" + window.location.host + "/e/c.html?id=" + OdataId;
@ -505,52 +507,7 @@
505 507
			"articleId": oArticleModule.articleId
506 508
		}, "get", oArticleModule.correlationCompany);
507 509
		oArticleModule.oAjaxGet("/ajax/article/find", {pageSize:5}, "get", oArticleModule.correlationArticle);
508
		//留言
509
		function leword(row, aa){
510
			$.ajax({
511
				url:"../ajax/leaveWord/ql",
512
				data: {
513
					"articleId":articleId,
514
					"rows":row	},
515
				dataType: 'json', //服务器返回json格式数据
516
				type: 'get', //HTTP请求类型
517
				timeout: 10000, //超时时间设置为10秒;
518
				traditional: true,
519
				success: function(data) {
520
					if(data.success) {
521
						console.log(data)
522
						document.getElementsByClassName('commentBlock')[0].innerHTML = ""
523
						if(data.data.length == 0) {
524
							return;
525
						}
526
						document.getElementById("olisten").parentNode.classList.remove("displayNone");
527
						for(var i = 0; i < data.data.length; i++) {
528
							var oText = ""
529
							var userType = autho(data.data[i].professor.authType, data.data[i].professor.orgAuth, data.data[i].professor.authStatus);
530
							var baImg = "../images/default-photo.jpg";
531
							if(data.data[i].professor.hasHeadImage == 1) {
532
								baImg = "/images/head/" + data.data[i].professor.id + "_l.jpg";
533
							}
534
							var li = document.createElement("li");
535
							li.innerHTML = '<div class="flexCenter clearfix" data-id="' + data.data[i].professor.id + '">' +
536
								'<div class="madiaHead useHead useHeadMsg" style="background-image:url(' + baImg + ')"></div>' +
537
								'<div class="madiaInfo">' +
538
								'<p><span class="h1Font" data-id="' + data.data[i].professor.id + '">' + data.data[i].professor.name + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em></p>' +
539
								'<p class="h2Font">' + data.data[i].content + '</p>' +
540
								'<p class="operateSpan">' +
541
								'<span class="commenttime">' + commenTime(data.data[i].createTime) + '</span>' +
542
//								'<span data-id="' + data.data[i].id + '" class="dele">' + oText + '</span>' +
543
								'</p>' +
544
								'</div>'
545
							document.getElementsByClassName("commentBlock")[0].appendChild(li);
546
						}
547
	
548
					}
549
				},
550
				error: function() {
551
				}
552
			});
553
		}
510
		
554 511
		//浏览量
555 512
		$.ajax({
556 513
			"url" : "../ajax/article/pageViews",

+ 243 - 0
e/da.html

@ -0,0 +1,243 @@
1
<!DOCTYPE html>
2
<html>
3
4
	<head>
5
		<meta charset="UTF-8">
6
		<title>回答分享-科袖网</title>
7
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
		<link rel="stylesheet" href="../css/reset.css" />
9
		<link rel="stylesheet" href="../css/common.css" />
10
		<link rel="stylesheet" href="../css/share.css" />
11
		<style>
12
			html,body {background: #FFFFFF;}
13
		</style>
14
		<script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
15
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
16
		<script type="text/javascript" src="../js/public/shareCom.js"></script>
17
		<script type="text/javascript" src="../js/public/shareLeaveWord.js"></script>
18
		<script type="text/javascript" src="../js/public/openApp.js"></script>
19
	</head>
20
21
	<body>
22
		<div class="contentBody2">
23
			<div class="showDetail">
24
				<div class="qa-top flexCenter">
25
					<div class="h1Font hWeight flex-pright" id="questTit"></div>
26
				</div>
27
28
				<div class="madiaBlock">
29
					<ul class="mui-table-view noactiveTab">
30
						<li class="mui-table-view-cell">
31
							<div class="flexCenter flex-pright" id="ownerCon">
32
								<!--<div class="madiaHead useHead"></div>
33
									<div class="madiaInfo">
34
										<p><span class="h1Font">张某某</span><em class="authicon authicon-pro" title="科袖认证专家"></em></p>
35
										<p class="ellipsisSty h2Font">职称/职位,所在机构</p>
36
									</div>-->
37
							</div>
38
							<div class="goSpan">
39
								<span class="attenSpan">关注</span>
40
							</div>
41
						</li>
42
					</ul>
43
				</div>
44
				<!--文章内容区-->
45
				<div class="showMain" id="answerCnt"></div>
46
				<div class="h3Font" style="margin-top: 10px;" id="answerTime"></div>
47
				<!--点赞模块-->
48
				<div class="thumbBlock">
49
					<span class="thumbBtn">赞 <span id="snum"></span></span>
50
					<span class="stepBtn">踩</span>
51
				</div>
52
				<!--留言-->
53
				<div class="madiaBlock">
54
					<div class="madiaTit" id="olisten">留言</div>
55
					<ul class="mui-table-view commentBlock noactiveTab">
56
57
					</ul>
58
				</div>
59
			</div>
60
			<div class="shareEcode">
61
				<img class="Ecodecon" src="../images/ecordCard.jpg" />
62
				<div class="Ecodeinfo">
63
					<a href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app"><button class="frmbtn frmactive">下载移动客户端</button></a>
64
				</div>
65
			</div>
66
		</div>
67
		<script type="text/javascript">
68
			$(document).ready(function() {
69
				var imgUrl = "http://www.ekexiu.com/images/logo180.png",
70
					lineLink = document.location.href,
71
					descContent = "",
72
					shareTitle,
73
					appid = '';
74
				var answerId = GetQueryString("id");
75
				module.lWord(answerId,4);
76
				var oAjax = function(url, dataS, otype, oFun) {
77
						$.ajax({
78
							url: url,
79
							dataType: 'json',
80
							type: otype,
81
							data: dataS,
82
							success: function(res) {
83
								if(res.success) {
84
									oFun(res)
85
								}
86
							}
87
						});
88
					},
89
					getConmain = function() {
90
						oAjax('/ajax/question/answer', {
91
							"id": answerId
92
						}, "get", function(res) {
93
							var $da = res.data
94
							document.getElementById("answerTime").innerHTML = commenTime($da.createTime);
95
							document.getElementById("snum").innerHTML = $da.agree;
96
							if($da.cnt) {
97
								document.getElementById("answerCnt").innerHTML = $da.cnt;
98
								descContent = $da.cnt.substr(0, 70);
99
							}
100
							proinfo($da.uid)
101
							questioninfo($da.qid)
102
						})
103
					},
104
					proinfo = function(uid) {
105
						oAjax("/ajax/professor/baseInfo/" + uid, {}, "get", function(res) {
106
							var dataStr = res.data
107
							var baImg = "../images/default-photo.jpg";
108
							if(dataStr.hasHeadImage == 1) {
109
								baImg = "/images/head/" + dataStr.id + "_l.jpg";
110
							}
111
							var userType = autho(dataStr.authType, dataStr.orgAuth, dataStr.authStatus);
112
							var os = "";
113
							if(dataStr.title) {
114
								if(dataStr.orgName) {
115
									os = dataStr.title + "," + dataStr.orgName;
116
								} else {
117
									os = dataStr.title;
118
								}
119
							} else {
120
								if(dataStr.office) {
121
									if(dataStr.orgName) {
122
										os = dataStr.office + "," + dataStr.orgName;
123
									} else {
124
										os = dataStr.office;
125
									}
126
								} else {
127
									if(dataStr.orgName) {
128
										os = dataStr.orgName;
129
									}
130
								}
131
							}
132
							var str = '<div class="madiaHead useHead" style="background-image:url(' + baImg + ')"></div>' +
133
								'<div class="madiaInfo">' +
134
								'<p><span class="h1Font">' + dataStr.name + '</span><em class="authicon ' + userType.sty + ' title="' + userType.title + '"></em></p>' +
135
								'<p class="ellipsisSty h2Font">' + os + '</p>' +
136
								'</div>'
137
							document.getElementById("ownerCon").innerHTML = str
138
							document.getElementById("ownerCon").setAttribute("data-id", uid);
139
						});
140
					},
141
					questioninfo = function(qid) {
142
						oAjax("/ajax/question/qo", {
143
							"id": qid,
144
						}, "get", function(res) {
145
							document.getElementById("questTit").innerHTML = res.data.title;
146
							document.getElementById("questTit").setAttribute("data-id", qid);
147
							
148
							shareTitle = res.data.title;
149
							document.title = res.data.title;
150
						});
151
152
					}
153
154
				getConmain()
155
156
				var this_ = "../html/qa-answer-show.html?anid=" + answerId;
157
				wcFresh(this_);
158
				$("body").on("click", ".goSpan,.collectBtn,.thumbBtn,.stepBtn", function() {
159
					isInstalled(this_, true);
160
					$(this).addClass("activeThis");
161
				})
162
163
				$("#ownerCon").on("click", function() {
164
					var id = this.getAttribute("data-id");
165
					location.href = "http://" + window.location.host + "/e/p.html?id=" + id;
166
				})
167
				$("#questTit").on("click", function() {
168
					var id = this.getAttribute("data-id");
169
					location.href = "http://" + window.location.host + "/e/wen.html?id=" + id;
170
				})
171
				/*微信分享*/
172
				$.ajax({
173
					url: "../ajax/weixin/jsapiTicket",
174
					type: 'get',
175
					dataType: 'json',
176
					contentType: "application/x-www-form-urlencoded; charset=utf-8",
177
					data: {
178
						'url': location.href.split('#')[0]
179
					},
180
					success: function(data) {
181
						if(data.data) {
182
							wx.config({
183
								debug: false, //调试模式好犀利
184
								appId: data.data.appId,
185
								timestamp: data.data.timestamp,
186
								nonceStr: data.data.nonceStr,
187
								signature: data.data.signature,
188
								jsApiList: [ // 所有要调用的 API 都要加到这个列表中
189
									"onMenuShareAppMessage",
190
									"onMenuShareTimeline",
191
									"onMenuShareQQ",
192
									"onMenuShareQZone",
193
									"scanQRCode",
194
								]
195
							});
196
							wx.ready(function() {
197
								// 在这里调用 API
198
								wx.onMenuShareAppMessage({ //分享给朋友
199
									title: shareTitle, // 分享标题
200
									desc: descContent, // 分享描述
201
									link: lineLink, // 分享链接
202
									imgUrl: imgUrl, // 分享图标
203
									success: share_success_callback,
204
									cancel: share_cancel_callback
205
								});
206
								wx.onMenuShareTimeline({ //分享到朋友圈
207
									title: shareTitle, // 分享标题
208
									desc: descContent, // 分享描述
209
									link: lineLink, // 分享链接
210
									imgUrl: imgUrl, // 分享图标
211
									success: share_success_callback,
212
									cancel: share_cancel_callback
213
								});
214
								wx.onMenuShareQQ({ //分享到QQ
215
									title: shareTitle, // 分享标题
216
									desc: descContent, // 分享描述
217
									link: lineLink, // 分享链接
218
									imgUrl: imgUrl, // 分享图标
219
									success: share_success_callback,
220
									cancel: share_cancel_callback
221
								});
222
								wx.onMenuShareQZone({ //分享到QQ空间
223
									title: shareTitle, // 分享标题
224
									desc: descContent, // 分享描述
225
									link: lineLink, // 分享链接
226
									imgUrl: imgUrl, // 分享图标
227
									success: share_success_callback,
228
									cancel: share_cancel_callback
229
								});
230
							});
231
							//分享成功后的回调函数	
232
							function share_success_callback() {}
233
							//用户取消分享后执行的回调函数	
234
							function share_cancel_callback() {}
235
						}
236
					}
237
				});
238
239
			})
240
		</script>
241
	</body>
242
243
</html>

+ 4 - 51
e/l.html

@ -14,6 +14,7 @@
14 14
<script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
15 15
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
16 16
<script type="text/javascript" src="../js/public/shareCom.js"></script>	
17
<script type="text/javascript" src="../js/public/shareLeaveWord.js"></script>
17 18
<script type="text/javascript" src="../js/public/openApp.js"></script>	
18 19
</head>
19 20

@ -93,6 +94,8 @@ $(document).ready(function() {
93 94
	var appid = '';
94 95
	
95 96
	var paperId = GetQueryString("id");
97
	module.lWord(paperId,2);
98
	
96 99
	isAgreeNum()
97 100
	function isAgreeNum() {
98 101
		var data = {"id": paperId}
@ -113,57 +116,6 @@ $(document).ready(function() {
113 116
			}
114 117
		});
115 118
	}
116
	leword();
117
	function leword(){
118
			$.ajax({
119
				url:"/ajax/leaveWord/ql/paper",
120
				data: {
121
					"paperId":paperId,
122
					"rows":100	},
123
				dataType: 'json', //服务器返回json格式数据
124
				type: 'get', //HTTP请求类型
125
				timeout: 10000, //超时时间设置为10秒;
126
				traditional: true,
127
				success: function(data) {
128
					if(data.success) {
129
						console.log(data)
130
						if(data.data.length == 0) {
131
							return;
132
						}
133
						$("#leword").show();
134
						for(var i = 0; i < data.data.length; i++) {
135
							var oText = ""
136
							var userType = autho(data.data[i].professor.authType, data.data[i].professor.orgAuth, data.data[i].professor.authStatus);
137
							var baImg = "../images/default-photo.jpg";
138
							if(data.data[i].professor.hasHeadImage == 1) {
139
								baImg = "/images/head/" + data.data[i].professor.id + "_l.jpg";
140
							}
141
							var li = document.createElement("li");
142
							li.innerHTML = '<div class="flexCenter clearfix" data-id="' + data.data[i].professor.id + '">' +
143
								'<div class="madiaHead useHead" style="background-image:url(' + baImg + ')"></div>' +
144
								'<div class="madiaInfo">' +
145
								'<p><span class="h1Font" data-id="' + data.data[i].professor.id + '">' + data.data[i].professor.name + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em></p>' +
146
								'</div>' +
147
								'</div>' +
148
								'<div class="madiaInfo">' +
149
								'<p class="h2Font">' + data.data[i].content + '</p>' +
150
								'<p class="operateSpan">' +
151
								'<span class="commenttime">' + commenTime(data.data[i].createTime) + '</span>' +
152
//								'<span data-id="' + data.data[i].id + '" class="dele">' + oText + '</span>' +
153
								'</p>' +
154
								'</div>'
155
							document.getElementsByClassName("commentBlock")[0].appendChild(li);
156
						}
157
	
158
					}
159
				},
160
				error: function() {
161
				}
162
			});
163
		}
164
	$(".commentBlock").on("click","li>.flexCenter",function(){
165
		location.href="http://" + window.location.host + "/e/p.html?id=" + $(this).attr("data-id");
166
	})
167 119
	
168 120
	var this_="../html/paperShow.html?paperId="+paperId;
169 121
	wcFresh(this_);
@ -235,6 +187,7 @@ $(document).ready(function() {
235 187
			//$.MsgBox.Alert('提示', '链接服务器超时')
236 188
		}
237 189
	});
190
	
238 191
	$("#aboutAuthors").on("click","li",function(){
239 192
		var oDataId = $(this).attr("data-id");
240 193
		if(oDataId.substring(0,1)!="#"){

+ 388 - 0
e/wen.html

@ -0,0 +1,388 @@
1
<!DOCTYPE html>
2
<html>
3
4
	<head>
5
		<meta charset="UTF-8">
6
		<title>问题分享-科袖网</title>
7
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
		<link rel="stylesheet" href="../css/reset.css" />
9
		<link rel="stylesheet" href="../css/common.css" />
10
		<link rel="stylesheet" href="../css/share.css" />
11
		<style>
12
			html,
13
			body {
14
				margin: 0;
15
				padding: 0px;
16
				background: #F4F6F8;
17
			}
18
		</style>
19
		<script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
20
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
21
		<script type="text/javascript" src="../js/public/shareCom.js"></script>
22
		<script type="text/javascript" src="../js/public/openApp.js"></script>
23
	</head>
24
25
	<body>
26
		<div class="contentBody2">
27
			<div class="list-main scroll-view">
28
				<section class="list_content">
29
					<ul class="tagList"></ul>
30
					<div class="item_detail" id="questionId">
31
						<h3 class="h1Font" id="questionTit"></h3>
32
						<div class="list_con" id="questionCnt"></div>
33
						<ul class="list_image"></ul>
34
						<div class="item_info">
35
							<span class="time h3Font" id="questionTime"></span>
36
						</div>
37
						<ul class="item-btn">
38
							<li class="go-answer"><span>回答</span></li>
39
							<li class="invite-answer"><span>邀请回答</span></li>
40
							<li class="collectBtn"><span class="iconfontnew icon-shoucang"></span></li>
41
						</ul>
42
					</div>
43
				</section>
44
				<section class="list-hold">
45
					<div class="list-hold-count">
46
						<span>全部 <em id="replyCount"></em> 个回答</span>
47
						<ul>
48
							<li class="active" data-type="1"><span>默认</span></li>
49
							<li data-type="2"><span>最新</span></li>
50
						</ul>
51
					</div>
52
					<ul class="mui-table-view myAllneeds partLine" id="curAnswers">
53
54
					</ul>
55
				</section>
56
			</div>
57
58
			<div class="shareEcode">
59
				<img class="Ecodecon" src="../images/ecordCard.jpg" />
60
				<div class="Ecodeinfo">
61
					<a href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app"><button class="frmbtn frmactive">下载移动客户端</button></a>
62
				</div>
63
			</div>
64
		</div>
65
		<script type="text/javascript">
66
			$(document).ready(function() {
67
				var imgUrl = "http://www.ekexiu.com/images/logo180.png",
68
					lineLink = document.location.href,
69
					descContent = "",
70
					shareTitle,
71
					appid = '';
72
				var questionId = GetQueryString("id");
73
				var rows = 5,
74
					ifkong = 1,
75
					ifAl = 1, //是否是首次加载
76
					dataO = {
77
						time: "",
78
						id: "",
79
						score: ""
80
					};
81
				var pkey = [],
82
					byway;
83
				var oAjax = function(url, dataS, otype, oFun) {
84
						$.ajax({
85
							url: url,
86
							dataType: 'json',
87
							type: otype,
88
							data: dataS,
89
							success: function(res) {
90
								if(res.success) {
91
									oFun(res)
92
								}
93
							}
94
						});
95
					},
96
					getConmain = function() {
97
						oAjax('/ajax/question/qo', {
98
							"id": questionId
99
						}, "get", function(res) {
100
							var $da = res.data
101
							document.getElementById("questionId").setAttribute("data-id", $da.id);
102
							document.getElementById("questionTit").innerHTML = $da.title;
103
							document.getElementById("questionTime").innerHTML = commenTime($da.createTime);
104
							document.getElementById("replyCount").innerHTML = $da.replyCount;
105
106
							if($da.cnt) {
107
								document.getElementById("questionCnt").innerHTML = $da.cnt;
108
								descContent = $da.cnt.substr(0, 70);
109
							}
110
111
							shareTitle = $da.title;
112
							document.title = $da.title;
113
114
							if($da.keys != undefined && $da.keys.length != 0) {
115
								var subs = new Array();
116
								if($da.keys.indexOf(',')) {
117
									subs = $da.keys.split(',');
118
								} else {
119
									subs[0] = $da.keys;
120
								}
121
								var pstr = ""
122
								if(subs.length > 0) {
123
									for(var i = 0; i < subs.length; i++) {
124
										pstr += '<li><span class="h2Font">' + subs[i] + '</span></li>'
125
									};
126
									document.getElementsByClassName("tagList")[0].innerHTML = pstr;
127
								} else {
128
									document.getElementsByClassName("tagList")[0].style.display = "none";
129
								}
130
							}
131
							if($da.img) {
132
								var subs = new Array();
133
								if($da.img.indexOf(',')) {
134
									subs = $da.img.split(',');
135
								} else {
136
									subs[0] = $da.img;
137
								}
138
								var pstr = ""
139
								if(subs.length > 0) {
140
									for(var i = 0; i < subs.length; i++) {
141
										var imgu = "/data/question" + subs[i]
142
										pstr += '<li><span class="imgspan" style="background-image: url(' + imgu + ');"></span></li>'
143
									};
144
									document.getElementsByClassName("list_image")[0].innerHTML = pstr;
145
								} else {
146
									document.getElementsByClassName("list_image")[0].style.display = "none";
147
								}
148
149
								imgUrl = "http://www.ekexiu.com/data/question" + subs[0];
150
							}
151
152
						})
153
					},
154
					answerList = function() {
155
						var byway = document.querySelector('.list-hold-count>ul').querySelector("li.active").getAttribute("data-type");
156
						var typeurl, dataStr = {};
157
						if(byway == 1) {
158
							typeurl = "/ajax/question/answer/qes/byScore"
159
							dataStr = {
160
								"qid": questionId,
161
								"score": dataO.score,
162
								"id": dataO.id,
163
								"rows": rows
164
							}
165
						} else if(byway == 2) {
166
							typeurl = "/ajax/question/answer/qes/byTime"
167
							dataStr = {
168
								"qid": questionId,
169
								"time": dataO.time,
170
								"id": dataO.id,
171
								"rows": rows
172
							}
173
						}
174
						oAjax(typeurl, dataStr, "get", function(res) {
175
							var aimId = "curAnswers",
176
								newStr = "暂无回答"
177
							var $info = res.data;
178
							if(!ifkong) {
179
								removeAfter(aimId)
180
							}
181
							if($info.length == 0 && ifkong && ifAl) {
182
								insertAfter(newStr, aimId);
183
								ifkong = 0
184
							}
185
							if($info.length > 0) {
186
								for(var i = 0; i < $info.length; i++) {
187
									var liStr = document.createElement("li");
188
									liStr.className = "mui-table-view-cell";
189
									liStr.setAttribute("data-id", $info[i].id);
190
									document.getElementById(aimId).appendChild(liStr);
191
									answerModule($info[i], liStr);
192
								}
193
							}
194
						})
195
					},
196
					insertAfter = function(newStr, targetE) {
197
						var parent = document.getElementById(targetE).parentNode;
198
						var kong = document.createElement("div");
199
						kong.className = "con-kong";
200
						kong.innerHTML = newStr;
201
						if(parent.lastChild.className == "con-kong") {
202
							return
203
						} else {
204
							parent.insertBefore(kong, document.getElementById(targetE).nextSibling);
205
						}
206
207
					},
208
					removeAfter = function(targetE) {
209
						var parent = document.getElementById(targetE).parentNode;
210
						if(parent.lastChild.className == "con-kong") {
211
							parent.removeChild(parent.querySelector(".con-kong"));
212
						} else {
213
							return
214
						}
215
					},
216
					answerModule = function(dataStr, liStr) {
217
						var hd = "",
218
							hl = "";
219
						if(dataStr.agree > 0) {
220
							hd = '<span>' + dataStr.agree + ' 赞</span>'
221
						}
222
						liStr.setAttribute("data-id", dataStr.id);
223
						liStr.className = "mui-table-view-cell";
224
						liStr.innerHTML = '<div class="madiaInfo">' +
225
							'<div class="flexCenter qa-owner"></div>' +
226
							'<p class="qa-con mui-ellipsis-5">' + dataStr.cnt + '</p>' +
227
							'<div class="showli mui-ellipsis">' +
228
							'<span>' + commenTime(dataStr.createTime) + '</span>' + hd + '<span class="leaveMsgCount"></span>' +
229
							'</div>' +
230
							'</div>'
231
						var $str = $(liStr)
232
						proinfo(dataStr.uid, $str);
233
						leaveMsgCount(dataStr.id, $str);
234
					},
235
					leaveMsgCount = function(id, $str) {
236
						oAjax("/ajax/leavemsg/count", {
237
							sid: id,
238
							stype: "4"
239
						}, "get", function(data) {
240
							if(data.success) {
241
								if(data.data > 0) {
242
									$str.find(".leaveMsgCount").html(data.data + "留言");
243
								}
244
							}
245
						})
246
					},
247
					proinfo = function(pid, $str) {
248
						oAjax("/ajax/professor/baseInfo/" + pid, {}, "get", function(res) {
249
							var dataStr = res.data
250
							var baImg = "../images/default-photo.jpg";
251
							if(dataStr.hasHeadImage == 1) {
252
								baImg = "/images/head/" + dataStr.id + "_l.jpg";
253
							}
254
							var userType = autho(dataStr.authType, dataStr.orgAuth, dataStr.authStatus);
255
							var os = "";
256
							if(dataStr.title) {
257
								if(dataStr.orgName) {
258
									os = dataStr.title + "," + dataStr.orgName;
259
								} else {
260
									os = dataStr.title;
261
								}
262
							} else {
263
								if(dataStr.office) {
264
									if(dataStr.orgName) {
265
										os = dataStr.office + "," + dataStr.orgName;
266
									} else {
267
										os = dataStr.office;
268
									}
269
								} else {
270
									if(dataStr.orgName) {
271
										os = dataStr.orgName;
272
									}
273
								}
274
							}
275
							var str = '<div class="owner-head useHead" style="background-image:url(' + baImg + ')"></div>' +
276
								'<div class="owner-info">' +
277
								'<div class="owner-name"><span class="h1Font">' + dataStr.name + '</span><em class="authicon ' + userType.sty + '" title="' + userType.title + '"></em></div>' +
278
								'<div class="owner-tit ellipsisSty h2Font">' + os + '</div>' +
279
								'</div>'
280
281
							$str.find(".qa-owner").html(str);
282
						});
283
					}
284
285
				getConmain();
286
				answerList();
287
288
				var this_ = "../html/qa-question-show.html?quid=" + questionId;
289
				wcFresh(this_);
290
				$("body").on("click", ".collectBtn,.go-answer,.invite-answer", function() {
291
					isInstalled(this_, true);
292
					$(this).addClass("activeThis");
293
				})
294
295
				$(".list-hold-count>ul").on('click', 'li', function(e) {
296
					var sortlist = document.querySelector('.list-hold-count>ul').querySelectorAll("li");
297
					for(var i = 0; i < sortlist.length; i++) {
298
						sortlist[i].classList.remove('active');
299
					}
300
					this.classList.add('active');
301
					byway = this.getAttribute("data-type");
302
					document.getElementById("curAnswers").innerHTML = "";
303
					dataO = {
304
						time: "",
305
						id: "",
306
						score: ""
307
					}
308
					answerList()
309
				});
310
311
				$("#curAnswers").on("click", "li", function() {
312
					var id = this.getAttribute("data-id");
313
					location.href = "http://" + window.location.host + "/e/da.html?id=" + id;
314
				})
315
316
				/*微信分享*/
317
				$.ajax({
318
					url: "../ajax/weixin/jsapiTicket",
319
					type: 'get',
320
					dataType: 'json',
321
					contentType: "application/x-www-form-urlencoded; charset=utf-8",
322
					data: {
323
						'url': location.href.split('#')[0]
324
					},
325
					success: function(data) {
326
						if(data.data) {
327
							wx.config({
328
								debug: false, //调试模式好犀利
329
								appId: data.data.appId,
330
								timestamp: data.data.timestamp,
331
								nonceStr: data.data.nonceStr,
332
								signature: data.data.signature,
333
								jsApiList: [ // 所有要调用的 API 都要加到这个列表中
334
									"onMenuShareAppMessage",
335
									"onMenuShareTimeline",
336
									"onMenuShareQQ",
337
									"onMenuShareQZone",
338
									"scanQRCode",
339
								]
340
							});
341
							wx.ready(function() {
342
								// 在这里调用 API
343
								wx.onMenuShareAppMessage({ //分享给朋友
344
									title: shareTitle, // 分享标题
345
									desc: descContent, // 分享描述
346
									link: lineLink, // 分享链接
347
									imgUrl: imgUrl, // 分享图标
348
									success: share_success_callback,
349
									cancel: share_cancel_callback
350
								});
351
								wx.onMenuShareTimeline({ //分享到朋友圈
352
									title: shareTitle, // 分享标题
353
									desc: descContent, // 分享描述
354
									link: lineLink, // 分享链接
355
									imgUrl: imgUrl, // 分享图标
356
									success: share_success_callback,
357
									cancel: share_cancel_callback
358
								});
359
								wx.onMenuShareQQ({ //分享到QQ
360
									title: shareTitle, // 分享标题
361
									desc: descContent, // 分享描述
362
									link: lineLink, // 分享链接
363
									imgUrl: imgUrl, // 分享图标
364
									success: share_success_callback,
365
									cancel: share_cancel_callback
366
								});
367
								wx.onMenuShareQZone({ //分享到QQ空间
368
									title: shareTitle, // 分享标题
369
									desc: descContent, // 分享描述
370
									link: lineLink, // 分享链接
371
									imgUrl: imgUrl, // 分享图标
372
									success: share_success_callback,
373
									cancel: share_cancel_callback
374
								});
375
							});
376
							//分享成功后的回调函数	
377
							function share_success_callback() {}
378
							//用户取消分享后执行的回调函数	
379
							function share_cancel_callback() {}
380
						}
381
					}
382
				});
383
384
			})
385
		</script>
386
	</body>
387
388
</html>

+ 3 - 49
e/z.html

@ -14,6 +14,7 @@
14 14
<script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
15 15
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
16 16
<script type="text/javascript" src="../js/public/shareCom.js"></script>	
17
<script type="text/javascript" src="../js/public/shareLeaveWord.js"></script>
17 18
<script type="text/javascript" src="../js/public/openApp.js"></script>	
18 19
</head>
19 20

@ -102,6 +103,7 @@ $(document).ready(function() {
102 103
	var appid = '';
103 104
	
104 105
	var patentId = GetQueryString("id");
106
	module.lWord(patentId,3);
105 107
		isAgreeNum()
106 108
	function isAgreeNum() {
107 109
	var data = {"id": patentId}
@ -122,55 +124,7 @@ $(document).ready(function() {
122 124
		}
123 125
	});
124 126
}
125
	leword();
126
	function leword(){
127
			$.ajax({
128
				url:"/ajax/leaveWord/ql/patent",
129
				data: {
130
					"patentId":patentId,
131
					"rows":100	},
132
				dataType: 'json', //服务器返回json格式数据
133
				type: 'get', //HTTP请求类型
134
				timeout: 10000, //超时时间设置为10秒;
135
				traditional: true,
136
				success: function(data) {
137
					if(data.success) {
138
						console.log(data)
139
						if(data.data.length == 0) {
140
							return;
141
						}
142
						$("#leword").show();
143
						for(var i = 0; i < data.data.length; i++) {
144
							var oText = ""
145
							var userType = autho(data.data[i].professor.authType, data.data[i].professor.orgAuth, data.data[i].professor.authStatus);
146
							var baImg = "../images/default-photo.jpg";
147
							if(data.data[i].professor.hasHeadImage == 1) {
148
								baImg = "/images/head/" + data.data[i].professor.id + "_l.jpg";
149
							}
150
							var li = document.createElement("li");
151
							li.innerHTML = '<div class="flexCenter clearfix" data-id="' + data.data[i].professor.id + '">' +
152
								'<div class="madiaHead useHead" style="background-image:url(' + baImg + ')"></div>' +
153
								'<div class="madiaInfo">' +
154
								'<p><span class="h1Font" data-id="' + data.data[i].professor.id + '">' + data.data[i].professor.name + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em></p>' +
155
								'<p class="h2Font">' + data.data[i].content + '</p>' +
156
								'<p class="operateSpan">' +
157
								'<span class="commenttime">' + commenTime(data.data[i].createTime) + '</span>' +
158
//								'<span data-id="' + data.data[i].id + '" class="dele">' + oText + '</span>' +
159
								'</p>' +
160
								'</div>'
161
							document.getElementsByClassName("commentBlock")[0].appendChild(li);
162
						}
163
	
164
					}
165
				},
166
				error: function() {
167
				}
168
			});
169
		}
170
	$(".commentBlock").on("click","li>.flexCenter",function(){
171
		location.href="http://" + window.location.host + "/e/p.html?id=" + $(this).attr("data-id");
172
	})
173
	
127

174 128
	var this_="../html/patentShow.html?patentId="+patentId;
175 129
	wcFresh(this_);
176 130
	$("body").on("click",".goSpan,.thumbBtn",function(){

BIN
images/h5_img/article_button_shoucang_hig@3x.png


BIN
images/h5_img/article_button_shoucang_nor@3x.png


BIN
images/h5_img/g_article_icon_cai_nor.png


BIN
images/h5_img/g_article_icon_dianzan_nor.png


+ 0 - 3
js/public/shareCom.js

@ -61,12 +61,9 @@ function commenTime(startTime) {
61 61
	} else if(date3 >= 3600000 && date3 < 86400000) {
62 62
		return hours + "小时前";
63 63
	} else if(date3 >= 86400000) {
64

65 64
		if(nowTimg.getFullYear() == startTime.substring(0, 4)) {
66

67 65
			return startTime.substring(4, 6).replace(/\b(0+)/gi, "") + "月" + startTime.substring(6, 8).replace(/\b(0+)/gi, "") + "日 " + startTime.substring(8, 10) + ":" + startTime.substring(10, 12);
68 66
		} else {
69

70 67
			return startTime.substring(0, 4) + "年" + startTime.substring(4, 6).replace(/\b(0+)/gi, "") + "月" + startTime.substring(6, 8).replace(/\b(0+)/gi, "") + "日 " + startTime.substring(8, 10) + ":" + startTime.substring(10, 12);
71 68
		}
72 69
	}

+ 105 - 0
js/public/shareLeaveWord.js

@ -0,0 +1,105 @@
1
(function(window) {
2
	function ajaxRequist(url, obj, type, fn) {
3
		$.ajax({
4
			url:url,
5
			data: obj,
6
			dataType: 'json', 
7
			type: type,
8
			traditional: true,
9
			success: function(data) {
10
				if(data.success) {
11
					fn(data.data)
12
				}
13
			},
14
			error: function() {
15
				
16
			}
17
		});
18
	}
19
	var LeaveWord = function() {
20
		var self = this;
21
		self.sid = module.sid;
22
		self.stype = module.stype;
23
		self.init();
24
		self.bindEvent();
25
	}
26

27
	LeaveWord.prototype.init = function() {
28
		console.log(JSON.stringify(this))
29
		var self = this;
30
		ajaxRequist("/ajax/leavemsg/subject", {
31
			sid: self.sid,
32
			stype: self.stype,
33
			time: 0,
34
			id: 0,
35
			rows: 500
36
		}, "GET", function(data) {
37
			document.getElementsByClassName('commentBlock')[0].innerHTML = ""
38
			if(data.length == 0) {
39
				return;
40
			}
41
			document.getElementById("olisten").parentNode.classList.remove("displayNone");
42
			for(var i = 0; i < data.length; i++) {
43
				var oText = "",
44
					reply = "",
45
					re = '<span class="replyLew" style="margin-right:10px;" data-id="' + data[i].id + '">回复</span>' + '<span class="mui-icon iconfont plusbtn icon-appreciate"style="padding-left:10px;margin-right:10px;font-size:14px;" data-id="' + data[i].id + '" data-num="' + data[i].agreeCount + '"></span><span  class="zan"style="display:' + (data[i].agreeCount ? "inline-block" : "none") + '">' + data[i].agreeCount + ' 赞 </span>';
46
				if(data[i].reciver) {
47
					reply = " 回复 " + "<span class='reply2'></span>"
48
				}
49
				var baImg = "../images/default-photo.jpg";
50
				var li = document.createElement("li");
51
				li.innerHTML = '<div class="flexCenter clearfix">' +
52
					'<div class="madiaHead useHead useHeadMsg" style="background-image:url(' + baImg + ')" data-id="' + data[i].sender+ '"></div>' +
53
					'<div class="madiaInfo">' +
54
					'<p><span class="replay1"></span>' + reply + '</p>'+
55
					'<p class="h2Font">' + data[i].cnt + '</p>' +
56
					'<p class="operateSpan">' +
57
					'<span class="commenttime">' + commenTime(data[i].createTime) + '</span>' +
58
					'</p>' +
59
					'</div>'
60
				document.getElementsByClassName("commentBlock")[0].appendChild(li);
61
				if(data[i].reciver) {
62
					self.userInfo(data[i].sender, li, 1);
63
					self.userInfo(data[i].reciver, li, 2)
64
				} else {
65
					self.userInfo(data[i].sender, li, 1);
66
				}
67
			}
68
		})
69
	}
70
		
71
	LeaveWord.prototype.userInfo = function(uId, li, parNum) {
72
		ajaxRequist("/ajax/professor/editBaseInfo/" + uId, {}, "GET", function($data) {
73
			if(parNum == 1) {
74
				if($data.hasHeadImage == 1) {
75
					li.getElementsByClassName("useHead")[0].style.backgroundImage = "url(/images/head/" + $data.id + "_l.jpg)";
76
				}
77
			}
78
			var userType = autho($data.authType, $data.orgAuth, $data.authStatus);
79
			var str = '<span class="h1Font" >' + $data.name + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em>'
80
			if(parNum == 1) {
81
				li.getElementsByClassName("replay1")[0].innerHTML = str;
82
			} else {
83
				li.getElementsByClassName("reply2")[0].innerHTML = str;
84
			}
85
			if(li.getElementsByClassName("replyLew")[0])
86
				li.getElementsByClassName("replyLew")[0].setAttribute("name", "回复 " + $data.name + ":");
87
		})
88
	}
89
	LeaveWord.prototype.bindEvent = function() {
90
		$(".commentBlock").on("click",".useHead",function(){
91
			var OdataId=this.getAttribute("data-id");
92
			location.href="p.html?id=" + OdataId;
93
		})
94
	}
95
	
96
	var module = {
97
		lWord: function(sid, stype) {
98
			this.sid = sid;
99
			this.stype = stype;
100
			var lw = new LeaveWord();
101
			this.init = lw.init;
102
		}
103
	}
104
	window.module = module;
105
})(window)