Преглед на файлове

广告统一整理,右侧广告滚动效果

luyanan преди 7 години
родител
ревизия
8b3e9002c0

+ 46 - 59
articalShow.html

@ -67,7 +67,7 @@
67 67
							</div>
68 68
						</div>
69 69
						<!--分享操作栏-->
70
						<div class="shareBlock clearfix">
70
						<div class="shareBlock clearfix summary">
71 71
							<div class="form-item shareInfo floatL">
72 72
								<a href="" class="useurl" > 
73 73
									<div class="madiaHead useHead userimg"></div>
@ -137,55 +137,58 @@
137 137
			</div>
138 138
			
139 139
			<div class="rightconBox floatR">
140
				<div class="conItem conItemG alignCenter displayNone" id="expert">
141
					<a href="" class="hrefgo"><div class="madiaHead useHead" id="Zimg"></div></a>
142
					<div class="proInfo">
143
						<div class="h3Font clearfix">
144
							<a href="" class="h1Font hrefgo" id="Zname"></a>
145
							<span class="authiconNew" title="科袖认证专家" id="ZauthFlag"></span>
140
				<div class="privateInfo">
141
					<div class="conItem conItemG alignCenter displayNone" id="expert">
142
						<a href="" class="hrefgo"><div class="madiaHead useHead" id="Zimg"></div></a>
143
						<div class="proInfo">
144
							<div class="h3Font clearfix">
145
								<a href="" class="h1Font hrefgo" id="Zname"></a>
146
								<span class="authiconNew" title="科袖认证专家" id="ZauthFlag"></span>
147
							</div>
148
							<p class="h2Font" id="Ztitle"></p>
149
							<p class="h2Font" id="ZorgName"></p>
146 150
						</div>
147
						<p class="h2Font" id="Ztitle"></p>
148
						<p class="h2Font" id="ZorgName"></p>
149
					</div>
150
					<div class="goSpan displayNone">
151
						<span class="attenSpan">关注</span>
152
					</div>
153
					<div class="form-item otherBlock currentBlock displayNone">
154
						<div class="aboutTit">最近文章</div>
155
						<div class="form-result currentArt">
156
							<ul class="recentlyList">
157
							</ul>
151
						<div class="goSpan displayNone">
152
							<span class="attenSpan">关注</span>
158 153
						</div>
159
					</divclass="form-item otherBlock currentBlock displayNone">	
160
				</div>
161
				<div class="conItem conItemG alignCenter displayNone" id="enterprise">
162
					<a href=""  class="qiyego">
163
						<div class="madiaHead cmpHead" id="Qimg">
164
							<div class="boxBlock">
165
								<img class="boxBlockimg" src="" id="companyImg">
154
						<div class="form-item otherBlock currentBlock displayNone">
155
							<div class="aboutTit">最近文章</div>
156
							<div class="form-result currentArt">
157
								<ul class="recentlyList">
158
								</ul>
159
							</div>
160
						</div>	
161
					</div>
162
					<div class="conItem conItemG alignCenter displayNone" id="enterprise">
163
						<a href=""  class="qiyego">
164
							<div class="madiaHead cmpHead" id="Qimg">
165
								<div class="boxBlock">
166
									<img class="boxBlockimg" src="" id="companyImg">
167
								</div>
168
							</div>
169
						</a>
170
						<div class="proInfo">
171
							<div class="h3Font clearfix">
172
								<a href=""  class="h1Font qiyego" id="Qname"></a>
173
								<span class="authiconNew" title="科袖认证企业" id="QauthFlag"></span>
166 174
							</div>
175
							<p class="h2Font ellipsisSty" id="Qindustry"></p>
176
							<p class="h2Font" id="QorgType"></p>
167 177
						</div>
168
					</a>
169
					<div class="proInfo">
170
						<div class="h3Font clearfix">
171
							<a href=""  class="h1Font qiyego" id="Qname"></a>
172
							<span class="authiconNew" title="科袖认证企业" id="QauthFlag"></span>
178
						<div class="goSpan">
179
							<span class="attenSpan">关注</span>
173 180
						</div>
174
						<p class="h2Font ellipsisSty" id="Qindustry"></p>
175
						<p class="h2Font" id="QorgType"></p>
176
					</div>
177
					<div class="goSpan">
178
						<span class="attenSpan">关注</span>
181
						<div class="form-item otherBlock currentBlock displayNone">
182
							<div class="aboutTit">最近文章</div>
183
							<div class="form-result currentArt">
184
								<ul class="recentlyList">
185
								</ul>
186
							</div>
187
						</div>	
179 188
					</div>
180
					<div class="form-item otherBlock currentBlock displayNone">
181
						<div class="aboutTit">最近文章</div>
182
						<div class="form-result currentArt">
183
							<ul class="recentlyList">
184
							</ul>
185
						</div>
186
					</div>	
187 189
				</div>
188
				<div id="scroll-fixed-ad">
190
				
191
				<div id="scroll-fixed-ad" calss="summary">
189 192
					<div class="conItem advertBox advertItem advertItem-A"></div>
190 193
					<div class="conItem advertBox advertItem advertItem-B"></div>
191 194
				</div>
@ -213,22 +216,6 @@
213 216
		addscript("ad_article_web_b");
214 217
		addscript("ad_article_web_c");
215 218
		addscript("ad_article_web_d");
216
		
217
		$('.wordHave').click(function(){$('html,body').animate({scrollTop: ($('.offmsg').outerHeight(true)+60)+'px'}, 800);}); //留言
218
		$('.shareWeixin').hover(function(){$('.shareCode').stop(true,false).fadeToggle();});//微信分享
219
		//微信分享
220
		var qrcode = new QRCode(document.getElementById("qrcode"), {
221
			width: 100,
222
			height: 100
223
		});
224
	
225
		function makeCode() {
226
			var hurl = window.location.host;
227
			var articleId = GetQueryString("articleId");
228
			var elurl = "http://" + hurl + "/e/a.html?id=" + articleId;
229
			qrcode.makeCode(elurl);
230
		}
231
		makeCode();
232 219
	});
233 220

234 221
	

+ 10 - 13
cmp-portal/js/cmp-articalList.js

@ -64,7 +64,7 @@ function articalList(pageSize, pageNo, isbind, num) {
64 64
				for(var i = 0; i < data.data.data.length; i++) {
65 65
					if(data.data.data[i].status == 1) {
66 66
						var li = '<li class="newbox"><a href="" target="_blank" class="newurl">';
67
						var li2 = '<ul class="h2Font clearfix"><li><span class="column"></span></li><li><span class="time"></span></li><li><span id="pageViews"></span></li><li><span id="articleAgree"></span></li><li><span id="comment"></span></li></ul>';
67
						var li2 = '<ul class="h2Font clearfix"><li><span class="column"></span></li><li><span class="time"></span></li><li><span id="pageViews"></span></li><li><span id="articleAgree"></span></li><li><span class="leaveMsgCount"></span></li></ul>';
68 68
						var li3 = '';
69 69
						var li4 = '';
70 70
					} else if(data.data.data[i].status == 0) {
@ -99,7 +99,7 @@ function articalList(pageSize, pageNo, isbind, num) {
99 99
					if(datalist.pageViews>0){
100 100
						$itemlist.find("#pageViews").text("阅读量 " + datalist.pageViews);
101 101
					}
102
					commentnum(datalist.articleId, $itemlist) //评论数
102
					leaveMsgCount(dataStr.articleId,1, $itemlist);
103 103
					if(datalist.articleImg) {
104 104
						$itemlist.find("#artimg").attr("style", "background-image: url(/data/article/" + datalist.articleImg + ");");
105 105
					}
@ -179,29 +179,26 @@ function articalList(pageSize, pageNo, isbind, num) {
179 179
			$.MsgBox.Alert('提示', '链接服务器超时')
180 180
		}
181 181
	});
182

183
	//查文章评论数
184
	function commentnum(articleId, $itemlist) {
182
	
183
	function leaveMsgCount(id,type, $str) {
185 184
		$.ajax({
186
			"url": "/ajax/leaveWord/lwCount",
185
			"url":"/ajax/leavemsg/count",
187 186
			"type": "GET",
188 187
			"dataType": "json",
189
			"async": false,
190 188
			"data": {
191
				"articleId": articleId
189
				sid:id,
190
				stype: type
192 191
			},
193 192
			"success": function(data) {
194 193
				if(data.success) {
195
					if(data.data>0){
196
						$itemlist.find("#comment").text("留言 " + data.data);
194
					if(data.data > 0) {
195
						$str.find(".leaveMsgCount").html("留言 " + data.data);
197 196
					}
198 197
				}
199
			},
200
			"error": function() {
201
				$.MsgBox.Alert('提示', '链接服务器超时')
202 198
			}
203 199
		});
204 200
	}
201
	
205 202
}
206 203

207 204
/*文章删除*/

+ 2 - 0
css/common.css

@ -219,9 +219,11 @@ header .icon2{ background:url(../images/index-icon.png) no-repeat; background-po
219 219
header .icon4{ background:url(../images/index-icon.png) no-repeat; background-position:-20px 0;}
220 220

221 221
/*广告位的设计规则及尺寸    底部(760*120) 侧栏(260*200)*/
222
.rightconBox .conItem.advertBox{padding:0;width:260px;background: none;}
222 223
.advertItem .swiper-pagination-bullet{width:6px; height:6px;}
223 224
.advertsub{position: relative;display: block;margin-bottom: 10px;}
224 225
.advertsub:after{content:"广告";font-size:10px;color:#fff;background:rgba(0,0,0,0.3);position:absolute;padding:0 4px;right:0;bottom:0px;}
225 226

226 227
.div2{top:80px;bottom:auto;z-index:999;position:fixed;_position:absolute}
227 228
.div3{z-index:999;position:fixed;_position:absolute}
229
.lastMo{height: 30px;}

+ 0 - 3
css/genindex.css

@ -326,9 +326,6 @@ ul.artAbout .frmadd{width:auto;position:absolute;right:0;top:0;background: #ff99
326 326
.conItem .otherBlock{padding-bottom: 30px;border-bottom:1px dashed #E5E5E5;margin-bottom: 30px;text-align: left;}
327 327
.conItem .otherBlock:last-child{padding:0;margin:0;border: 0;}
328 328
329
/*右侧新闻*/
330
.rightconBox .conItem.advertBox{padding:0;width:260px;background: none;}
331
332 329
.flexCenter{position: relative;width: 100%; min-height:90px;
333 330
		    display: -webkit-box;
334 331
			display: -webkit-flex;

+ 6 - 7
discover.html

@ -181,9 +181,9 @@
181 181
								<span id="agreeMecount">0</span>
182 182
							</div>
183 183
						</div>
184
						<div class="goSpan">
185
							<span class="pubArt">写文章</span>
186
							<span class="pubQuestion">提问题</span>
184
						<div class="goSpan clearfix">
185
							<span class="floatL pubArt">写文章</span>
186
							<span class="floatR pubQuestion">提问题</span>
187 187
						</div>
188 188
						<div class="goSpanLine">
189 189
							<span class="goarrow">我的关注与收藏</span>
@ -192,9 +192,9 @@
192 192
					<div class="unlogined">
193 193
						<div class="madiaHead useHead"></div>
194 194
						<div class="h3Font">Hi,欢迎您<br>登录后可以和大家交流哦~</div>
195
						<div class="goSpan">
196
							<span>登录</span>
197
							<span>注册</span>
195
						<div class="goSpan clearfix">
196
							<span class="floatL">登录</span>
197
							<span class="floatR">注册</span>
198 198
						</div>
199 199
					</div>	
200 200
				</div>
@ -233,7 +233,6 @@ $(function () {
233 233
	addscript("ad_discover_a");
234 234
	addscript("ad_discover_b");
235 235
	addscript("ad_discover_c");	
236
	adScroll()
237 236
});
238 237

239 238
</script>

+ 6 - 12
e/a.html

@ -16,9 +16,9 @@
16 16
<script type="text/javascript" src="../js/public/shareLeaveWord.js"></script>	
17 17
<script type="text/javascript" src="../js/public/openApp.js"></script>	
18 18
<script type="text/javascript">
19
	addscript("ad_article_h5_ding");
20
	addscript("ad_article_h5_top");
21
	addscript("ad_article_h5_bottom");
19
	addscript("ad_article_h5_a");
20
	addscript("ad_article_h5_b");
21
	addscript("ad_article_h5_c");
22 22
</script>
23 23
<style>
24 24
	html,body {background: #FFFFFF;}
@ -54,9 +54,7 @@
54 54
			</ul>
55 55
		</div>
56 56
		<!--广告模块-->
57
		<div class="madiaBlock advertItem advertItem-ding">
58
			
59
		</div>
57
		<div class="madiaBlock advertItem advertItem-A"></div>
60 58
		<!--文章内容区-->
61 59
		<div class="showMain" id="articleContent">
62 60
		</div>
@ -89,9 +87,7 @@
89 87
			<span class="thumbBtn">赞 <span id="snum"></span></span>
90 88
		</div>
91 89
		<!--广告模块-->
92
		<div class="madiaBlock swiper-container advertItem advertItem-top" style="margin:30px 0 10px">
93
		  
94
		</div>
90
		<div class="madiaBlock swiper-container advertItem advertItem-B" style="margin:30px 0 10px"></div>
95 91
		<!--您可能感兴趣的文章-->
96 92
		<div class="madiaBlock displayNone" id="article">
97 93
			<div class="madiaTit">您可能感兴趣的文章</div>
@ -117,9 +113,7 @@
117 113
	
118 114
	<div class="shareEcode">
119 115
		<!--广告模块-->
120
		<div class="madiaBlock swiper-container advertItem advertItem-bottom" style="margin:0 9px">
121
		  
122
		</div>
116
		<div class="madiaBlock swiper-container advertItem advertItem-C" style="margin:0 9px"></div>
123 117
		<img class="Ecodecon" src="../images/ecordCard.jpg" />
124 118
	</div>
125 119
</div>

+ 48 - 60
fw_template_r3254/article.html

@ -142,56 +142,61 @@
142 142
			</div>
143 143
			
144 144
			<div class="rightconBox floatR">
145
				<div class="conItem conItemG alignCenter displayNone" id="expert">
146
					<a href="" class="hrefgo"><div class="madiaHead useHead" id="Zimg"></div></a>
147
					<div class="proInfo">
148
						<div class="h3Font clearfix">
149
							<a href="" class="h1Font hrefgo" id="Zname"></a>
150
							<span class="authiconNew" title="科袖认证专家" id="ZauthFlag"></span>
145
				<div class="privateInfo">
146
					<div class="conItem conItemG alignCenter displayNone" id="expert">
147
						<a href="" class="hrefgo"><div class="madiaHead useHead" id="Zimg"></div></a>
148
						<div class="proInfo">
149
							<div class="h3Font clearfix">
150
								<a href="" class="h1Font hrefgo" id="Zname"></a>
151
								<span class="authiconNew" title="科袖认证专家" id="ZauthFlag"></span>
152
							</div>
153
							<p class="h2Font" id="Ztitle"></p>
154
							<p class="h2Font" id="ZorgName"></p>
151 155
						</div>
152
						<p class="h2Font" id="Ztitle"></p>
153
						<p class="h2Font" id="ZorgName"></p>
154
					</div>
155
					<div class="goSpan displayNone">
156
						<span class="attenSpan">关注</span>
157
					</div>
158
					<div class="form-item otherBlock currentBlock displayNone">
159
						<div class="aboutTit">最近文章</div>
160
						<div class="form-result currentArt">
161
							<ul class="recentlyList">
162
							</ul>
156
						<div class="goSpan displayNone">
157
							<span class="attenSpan">关注</span>
163 158
						</div>
164
					</divclass="form-item otherBlock currentBlock displayNone">	
165
				</div>
166
				<div class="conItem conItemG alignCenter displayNone" id="enterprise">
167
					<a href=""  class="qiyego">
168
						<div class="madiaHead cmpHead" id="Qimg">
169
							<div class="boxBlock">
170
								<img class="boxBlockimg" src="" id="companyImg">
159
						<div class="form-item otherBlock currentBlock displayNone">
160
							<div class="aboutTit">最近文章</div>
161
							<div class="form-result currentArt">
162
								<ul class="recentlyList">
163
								</ul>
164
							</div>
165
						</div>	
166
					</div>
167
					<div class="conItem conItemG alignCenter displayNone" id="enterprise">
168
						<a href=""  class="qiyego">
169
							<div class="madiaHead cmpHead" id="Qimg">
170
								<div class="boxBlock">
171
									<img class="boxBlockimg" src="" id="companyImg">
172
								</div>
171 173
							</div>
174
						</a>
175
						<div class="proInfo">
176
							<div class="h3Font clearfix">
177
								<a href=""  class="h1Font qiyego" id="Qname"></a>
178
								<span class="authiconNew" title="科袖认证企业" id="QauthFlag"></span>
179
							</div>
180
							<p class="h2Font ellipsisSty" id="Qindustry"></p>
181
							<p class="h2Font" id="QorgType"></p>
172 182
						</div>
173
					</a>
174
					<div class="proInfo">
175
						<div class="h3Font clearfix">
176
							<a href=""  class="h1Font qiyego" id="Qname"></a>
177
							<span class="authiconNew" title="科袖认证企业" id="QauthFlag"></span>
183
						<div class="goSpan">
184
							<span class="attenSpan">关注</span>
178 185
						</div>
179
						<p class="h2Font ellipsisSty" id="Qindustry"></p>
180
						<p class="h2Font" id="QorgType"></p>
181
					</div>
182
					<div class="goSpan">
183
						<span class="attenSpan">关注</span>
186
						<div class="form-item otherBlock currentBlock displayNone">
187
							<div class="aboutTit">最近文章</div>
188
							<div class="form-result currentArt">
189
								<ul class="recentlyList">
190
								</ul>
191
							</div>
192
						</div>	
184 193
					</div>
185
					<div class="form-item otherBlock currentBlock displayNone">
186
						<div class="aboutTit">最近文章</div>
187
						<div class="form-result currentArt">
188
							<ul class="recentlyList">
189
							</ul>
190
						</div>
191
					</div>	
192 194
				</div>
193
				<div class="conItem advertBox advertItem advertItem-A"></div>
194
				<div class="conItem advertBox advertItem advertItem-B"></div>
195
				
196
				<div id="scroll-fixed-ad">
197
					<div class="conItem advertBox advertItem advertItem-A"></div>
198
					<div class="conItem advertBox advertItem advertItem-B"></div>
199
				</div>
195 200
			</div>
196 201
		</div>
197 202
	</div>
@ -215,23 +220,6 @@
215 220
		addscript("ad_article_web_b");
216 221
		addscript("ad_article_web_c");
217 222
		addscript("ad_article_web_d");
218
		
219
		$('.wordHave').click(function(){$('html,body').animate({scrollTop: ($('.offmsg').outerHeight(true)+60)+'px'}, 800);}); //留言
220
		$('.shareWeixin').hover(function(){$('.shareCode').stop(true,false).fadeToggle();});//微信分享
221
		//微信分享
222
		var qrcode = new QRCode(document.getElementById("qrcode"), {
223
			width: 100,
224
			height: 100
225
		});
226
	
227
		function makeCode() {
228
			var hurl = window.location.host;
229
			var articleId = window.staticPageData.articleId;
230
			var elurl = "http://" + hurl + "/e/a.html?id=" + articleId;
231
			qrcode.makeCode(elurl);
232
		}
233
		makeCode();
234
		
235 223
	});
236 224

237 225
	

+ 3 - 20
fw_template_r3254/paper.html

@ -132,9 +132,7 @@
132 132
				</div>
133 133
			</div>
134 134
			<div class="rightconBox floatR">
135
				<div class="conItem advertBox advertItem" id="advertisement">
136
					<script src="/js/adverts/ad_pap.js"></script>
137
				</div>
135
				<div class="conItem advertBox advertItem"></div>
138 136
				<div class="conItem displayNone" id="patentrelate">
139 137
					<div class="form-item otherBlock currentBlock">
140 138
						<div class="aboutTit">相关专利</div>
@ -163,24 +161,9 @@
163 161
<script type="text/javascript" src="/js/paperShow1.js"></script>
164 162
<script type="text/javascript" src="/js/quickLogin.js"></script>
165 163
<script type="text/javascript">
166

167
	//分享关注按钮
168
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
169

170
	//微信分享
171
	var qrcode = new QRCode(document.getElementById("qrcode"), {
172
		width : 100,
173
		height : 100
164
	$(function () {	
165
		addscript("ad_common");
174 166
	});
175
	function makeCode(){
176
		var hurl = window.location.host;
177
		var paperId =  GetQueryString("paperId");
178
		var elurl = "http://" + hurl + "/e/l.html?id=" + paperId ; 
179
		qrcode.makeCode(elurl);
180
	}
181
	makeCode();
182

183
	
184 167
</script>
185 168
</body>
186 169
</html>

+ 3 - 21
fw_template_r3254/patent.html

@ -169,9 +169,7 @@
169 169
					<textarea class="frmcontype correctCon" placeholder="请具体说明您发现的问题,以便我们为您快速解决"></textarea>
170 170
					<button class="frmcontype btnModel correctSubmit" disabled>提交</button>
171 171
				</div>
172
				<div class="conItem advertBox advertItem" id="advertisement">
173
					<script src="js/adverts/ad_pap.js"></script>
174
				</div>
172
				<div class="conItem advertBox advertItem"></div>
175 173
				<div class="conItem displayNone" id="paperList">
176 174
					<div class="form-item otherBlock currentBlock">
177 175
						<div class="aboutTit">相关论文</div>
@ -201,25 +199,9 @@
201 199
<script type="text/javascript" src="/js/patentShow1.js"></script>
202 200
<script type="text/javascript" src="/js/quickLogin.js"></script>
203 201
<script type="text/javascript">
204

205
	//分享关注按钮
206
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
207
	$('.goSpan').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
208
	
209
	//微信分享
210
	var qrcode = new QRCode(document.getElementById("qrcode"), {
211
		width : 100,
212
		height : 100
202
	$(function () {	
203
		addscript("ad_common");
213 204
	});
214
	function makeCode(){
215
		var hurl = window.location.host;
216
		var patentId =  GetQueryString("patentId");
217
		var elurl = "http://" + hurl + "/e/z.html?id=" + patentId ; 
218
		qrcode.makeCode(elurl);
219
	}
220
	makeCode();
221

222
	
223 205
</script>
224 206
</body>
225 207
</html>

images/ad/find_img_xiazai_nor.png → images/find_img_xiazai_nor.png


+ 5 - 8
inform.html

@ -63,10 +63,7 @@
63 63
						</div>
64 64
					</div>
65 65
					<div class="rightconBox floatR">
66
						<div class="conItem advertBox advertItem">
67
							<script src="js/adverts/ad_pap.js"></script>
68
						</div>
69

66
						<div class="conItem advertBox advertItem"></div>
70 67
					</div>
71 68

72 69
				</div>
@ -83,10 +80,10 @@
83 80
		<script type="text/javascript" src="js/quickLogin.js"></script>
84 81
		<script type="text/javascript" src="js/informLeaveW.js"></script>
85 82
		<script type="text/javascript" src="js/inform.js"></script>
86
		<script type="text/javascript">
87
			$(function() {
88
				addscript("ad_inform_right");
89
			})
83
		<script type="text/javascript">
84
			$(function () {	
85
				addscript("ad_common");
86
			});
90 87
		</script>
91 88
	</body>
92 89


+ 0 - 6
js/adverts/ad_pap.js

@ -1,6 +0,0 @@
1
var Html = '';
2
	Html += '<a href="download.html" target="_blank">'+
3
				'<img src="images/ad/find_img_xiazai_nor.png" width="100%">'+
4
			'</a>'
5
	
6
document.write(Html);

+ 3 - 24
js/articalList.js

@ -87,7 +87,7 @@ function articalList(pageSize, pageNo, isbind, num) {
87 87
				for(var i = 0; i < data.data.data.length; i++) {
88 88
					if(data.data.data[i].status == 1) {
89 89
						var li = '<li class="newbox"><a href="" target="_blank" class="newurl">';
90
						var li2 = '<ul class="showliTop h2Font clearfix"><li><span class="time"></span></li><li><span id="pageViews"></span></li><li><span id="articleAgree"></span></li><li><span id="comment"></span></li></ul>';
90
						var li2 = '<ul class="showliTop h2Font clearfix"><li><span class="time"></span></li><li><span id="pageViews"></span></li><li><span id="articleAgree"></span></li><li><span class="leaveMsgCount"></span></li></ul>';
91 91
						var li3 = '';
92 92
						var li4 = '';
93 93
					} else if(data.data.data[i].status == 0) {
@ -122,7 +122,7 @@ function articalList(pageSize, pageNo, isbind, num) {
122 122
					if(datalist.pageViews>0){
123 123
						$itemlist.find("#pageViews").text("阅读量 " + datalist.pageViews);
124 124
					}
125
					commentnum(datalist.articleId, $itemlist) //留言数
125
					leaveMsgCount(dataStr.articleId,1,$itemlist);
126 126
					if(datalist.articleImg) {
127 127
						$itemlist.find("#artimg").attr("style", "background-image: url(/data/article/" + datalist.articleImg + ");");
128 128
					}
@ -193,28 +193,7 @@ function articalList(pageSize, pageNo, isbind, num) {
193 193
		}
194 194
	});
195 195
}
196
	//查文章留言数
197
	function commentnum(articleId, $itemlist) {
198
		$.ajax({
199
			"url": "/ajax/leaveWord/lwCount",
200
			"type": "GET",
201
			"dataType": "json",
202
			"async": false,
203
			"data": {
204
				"articleId": articleId
205
			},
206
			"success": function(data) {
207
				if(data.success) {
208
					if(data.data>0){
209
						$itemlist.find("#comment").text("留言 " + data.data);
210
					}
211
				}
212
			},
213
			"error": function() {
214
				$.MsgBox.Alert('提示', '链接服务器超时')
215
			}
216
		});
217
	}
196

218 197

219 198
/*文章删除*/
220 199
function newsDelet(_this) {

+ 193 - 174
js/articalShow.js

@ -1,21 +1,36 @@
1 1
/*文章预览*/
2
var articleId = GetQueryString("articleId");
3
module.lWord(articleId,1);
4
if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
5
 	location.href="http://" + window.location.host + "/e/a.html?id="+articleId;
6
}
7
var userid = $.cookie("userid");
8
var zjreturnId;
9
var wzreturnId;
10
var experarray = [];
11
var createTime,orderKey;
12
$(function() {
2
$(document).ready(function() {
3
	var articleId = GetQueryString("articleId");
4
	module.lWord(articleId,1,1);
5
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
6
	 	location.href="http://" + window.location.host + "/e/a.html?id="+articleId;
7
	}
8
	var userid = $.cookie("userid");
9
	var zjreturnId;
10
	var wzreturnId;
11
	var experarray = [];
12
	var createTime,orderKey;
13

13 14
	loginStatus();//判断个人是否登录
14 15
	articleshow();
15 16
	relevantExperts();
16 17
	relevantResources(); 
17
	adScroll()
18 18
	wlog("article",articleId,"1");
19
	$('.wordHave').click(function(){$('html,body').animate({scrollTop: ($('.offmsg').outerHeight(true)+60)+'px'}, 800);}); //留言
20
	$('.shareWeixin').hover(function(){$('.shareCode').stop(true,false).fadeToggle();});//微信分享
21
	//微信分享
22
	var qrcode = new QRCode(document.getElementById("qrcode"), {
23
		width: 100,
24
		height: 100
25
	});
26

27
	function makeCode() {
28
		var hurl = window.location.host;
29
		var elurl = "http://" + hurl + "/e/a.html?id=" + articleId;
30
		qrcode.makeCode(elurl);
31
	}
32
	makeCode();
33
	
19 34
	//判断是否登录转态
20 35
	if(userid && userid != "null" && userid != null){
21 36
		$(".ifLoginOn").removeClass("displayNone");
@ -62,8 +77,6 @@ $(function() {
62 77
						}
63 78
					}
64 79
				}
65
					
66
				
67 80
				
68 81
			},
69 82
			"error":function(){
@ -80,6 +93,8 @@ $(function() {
80 93
			"data" :{"articleId":articleId},
81 94
			"success" : function(data) {
82 95
				if (data.success){
96
					var articletitle = data.data.articleTitle + "-科袖网";
97
					document.title = articletitle;
83 98
					$("#articleTitle").text(data.data.articleTitle);
84 99
					$("#pageViews").text("阅读量 "+data.data.pageViews);
85 100
					$("#publishTime").text(commenTime(data.data.publishTime));
@ -114,18 +129,26 @@ $(function() {
114 129
					var weibopic ="http://"+window.location.host+"/data/article/" + data.data.articleImg;
115 130
					$("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+encodeURIComponent(weibotitle)+"&url="+encodeURIComponent(weibourl)+"&pic="+encodeURIComponent(weibopic)+"&content=utf-8"+"&ralateUid=6242830109&searchPic=false&style=simple");
116 131
				}
117
				
118
				var articletitle = data.data.articleTitle + "-科袖网";
119
				document.title = articletitle;
120 132
				window.setTimeout(function() {
121 133
					$('body').scrollTop(4);
122
					var oShareW = $('.share-nav').outerWidth(true);
123
					$('.shareBlock').scrollFix( {
134
					$('.shareBlock').scrollFix({
124 135
				        startTop:'body',
125
				        bottom: '0',
136
				        bottom: 0,
126 137
				        endPos : '.share-bottom',
127
						width: oShareW ,
128
				        zIndex : 997
138
						width: $('.share-nav').outerWidth(true),
139
				        zIndex : 999
140
				    });	
141
				    
142
				}, 300);
143
				//不随滚动条滚动的固定层广告代码
144
				window.setTimeout(function() {
145
					$('#scroll-fixed-ad').scrollFix({
146
				    	oflag:true,
147
				    	startTop:'#scroll-fixed-ad',
148
				    	startBottom:".privateInfo",
149
				        distanceTop: $("header").outerHeight(true) + 20,
150
				        endPos: 'footer',
151
				        zIndex: 998
129 152
				    });	
130 153
				}, 300);
131 154
			},
@ -134,7 +157,7 @@ $(function() {
134 157
			}
135 158
		});
136 159
	}
137
	
160

138 161
	//专家信息
139 162
	function expert(professorId){
140 163
	
@ -402,7 +425,6 @@ $(function() {
402 425
		data: {
403 426
			"articleId": articleId,
404 427
		},
405
		timeout: 10000, //超时设置
406 428
		success: function(data) {
407 429
			if(data.success) {
408 430
				
@ -424,7 +446,6 @@ $(function() {
424 446
		$.ajax({
425 447
			url: "/ajax/org/" +this.orgId,
426 448
			type: "GET",
427
			timeout: 10000,
428 449
			dataType: "json",
429 450
			context: $("#busList"),
430 451
			success: function(data) {
@ -593,168 +614,166 @@ $(function() {
593 614
		}			
594 615
	}
595 616
	
596
});
597

598
//文章点击点赞
599
$('.thumbBlock').on("click",".thunbgo",function(){
600
	if (userid && userid != "null" && userid != null) {
601
		addAgree();
602
	}else{
603
		quickLog();
604
		operatTab();
605
		closeLog();
617
	//文章点击点赞
618
	$('.thumbBlock').on("click",".thunbgo",function(){
619
		if (userid && userid != "null" && userid != null) {
620
			addAgree();
621
		}else{
622
			quickLog();
623
			operatTab();
624
			closeLog();
625
		}
626
	})
627
	
628
	/*判断文章是否被赞*/
629
	function isAgree(articleAgree) {
630
		var data = {"operateId": userid,"articleId": articleId}
631
		$.ajax({		
632
			url:"/ajax/article/isAgree",
633
			data:data,
634
			dataType: 'json', //数据格式类型
635
			type: 'get', //http请求类型
636
			
637
			async: false,
638
			success: function(data) {
639
				if(data.success){
640
					if(data.data!= null){
641
						$(".thumbBtn").html("已赞 <span>"+articleAgree+"</span>");
642
						$(".thumbBtn").addClass("thumbedBtn");
643
					}else{
644
						$(".thumbBtn").html("赞 <span>"+articleAgree+"</span>");
645
						$(".thumbBtn").addClass("thunbgo");
646
					}
647
				}
648
			},
649
			error: function() {
650
				$.MsgBox.Alert('提示',"服务器链接超时");
651
			}
652
		});
606 653
	}
607
})
608

609
/*判断文章是否被赞*/
610
function isAgree(articleAgree) {
611
	var data = {"operateId": userid,"articleId": articleId}
612
	$.ajax({		
613
		url:"/ajax/article/isAgree",
614
		data:data,
615
		dataType: 'json', //数据格式类型
616
		type: 'get', //http请求类型
617
		timeout: 10000,
618
		async: false,
619
		success: function(data) {
620
			if(data.success){
621
				if(data.data!= null){
622
					$(".thumbBtn").html("已赞 <span>"+articleAgree+"</span>");
654
	
655
	/*点赞*/
656
	function addAgree() {
657
		var data = {"operateId": userid,"articleId": articleId,"uname":$.cookie("userName")}
658
		$.ajax({		
659
			url:"/ajax/article/agree",
660
			data:data,
661
			dataType: 'json', //数据格式类型
662
			type: 'POST', //http请求类型
663
			async: false,
664
			success: function(data) {
665
				if(data.success){
666
					var articleAgreeval = $(".thumbBtn span").text();
667
					$(".thumbBtn").html("已赞 <span>"+(parseInt(articleAgreeval)+1)+"</span>");
623 668
					$(".thumbBtn").addClass("thumbedBtn");
624
				}else{
625
					$(".thumbBtn").html("赞 <span>"+articleAgree+"</span>");
626
					$(".thumbBtn").addClass("thunbgo");
669
					$(".thumbBtn").removeClass("thunbgo");
627 670
				}
671
			},
672
			error: function() {
673
				$.MsgBox.Alert('提示',"服务器链接超时");
628 674
			}
629
		},
630
		error: function() {
631
			$.MsgBox.Alert('提示',"服务器链接超时");
675
		});
676
	}
677
	
678
	//点击专家关注
679
	$("#expert").on('click','.attenSpan',function(){
680
		if(userid && userid != null && userid != "null") {
681
			if($(this).is('.attenedSpan')){
682
				cancelCollectionAbout($("#Zname").attr("dataid"),$(this), 1)
683
			} else {
684
				collectionAbout($("#Zname").attr("dataid"),$(this), 1);
685
			}	
686
		}else{
687
			quickLog();
688
			operatTab();
689
			closeLog();
632 690
		}
633
	});
634
}
635

636
/*点赞*/
637
function addAgree() {
638
	var data = {"operateId": userid,"articleId": articleId,"uname":$.cookie("userName")}
639
	$.ajax({		
640
		url:"/ajax/article/agree",
641
		data:data,
642
		dataType: 'json', //数据格式类型
643
		type: 'POST', //http请求类型
644
		timeout: 10000,
645
		async: false,
646
		success: function(data) {
647
			if(data.success){
648
				var articleAgreeval = $(".thumbBtn span").text();
649
				$(".thumbBtn").html("已赞 <span>"+(parseInt(articleAgreeval)+1)+"</span>");
650
				$(".thumbBtn").addClass("thumbedBtn");
651
				$(".thumbBtn").removeClass("thunbgo");
652
			}
653
		},
654
		error: function() {
655
			$.MsgBox.Alert('提示',"服务器链接超时");
691
	})
692
	$("#enterprise").on('click','.attenSpan',function(){
693
		if(userid && userid != null && userid != "null") {
694
			if($(this).is('.attenedSpan')){
695
				cancelCollectionAbout($("#Qname").attr("dataid"),$(this), 6)
696
			} else {
697
				collectionAbout($("#Qname").attr("dataid"),$(this),6);
698
			}	
699
		}else{
700
			quickLog();
701
			operatTab();
702
			closeLog();
656 703
		}
657
	});
658
}
659

660
//点击专家关注
661
$("#expert").on('click','.attenSpan',function(){
662
	if(userid && userid != null && userid != "null") {
663
		if($(this).is('.attenedSpan')){
664
			cancelCollectionAbout($("#Zname").attr("dataid"),$(this), 1)
665
		} else {
666
			collectionAbout($("#Zname").attr("dataid"),$(this), 1);
667
		}	
668
	}else{
669
		quickLog();
670
		operatTab();
671
		closeLog();
672
	}
673
})
674
$("#enterprise").on('click','.attenSpan',function(){
675
	if(userid && userid != null && userid != "null") {
676
		if($(this).is('.attenedSpan')){
677
			cancelCollectionAbout($("#Qname").attr("dataid"),$(this), 6)
678
		} else {
679
			collectionAbout($("#Qname").attr("dataid"),$(this),6);
680
		}	
681
	}else{
682
		quickLog();
683
		operatTab();
684
		closeLog();
685
	}
686
})
687
//点击文章收藏
688
$('#attention').on("click","em",function(){
689
	if (userid && userid != "null" && userid != null) {
690
		if($(this).is('.icon-collected')){
691
			cancelCollectionAbout(articleId,$(this),3)
704
	})
705
	//点击文章收藏
706
	$('#attention').on("click","em",function(){
707
		if (userid && userid != "null" && userid != null) {
708
			if($(this).is('.icon-collected')){
709
				cancelCollectionAbout(articleId,$(this),3)
710
			}else{
711
				collectionAbout(articleId,$(this),3)
712
			}	
692 713
		}else{
693
			collectionAbout(articleId,$(this),3)
694
		}	
695
	}else{
696
		quickLog();
697
		operatTab();
698
		closeLog();
699
	}
700
})
701

702

703
//文章浏览量
704
function pageViewsVal(){
705
	$.ajax({
706
		"url" : "/ajax/article/pageViews",
707
		"type" :  "POST" ,
708
		"dataType" : "json",
709
		"data" :{"articleId":articleId},
710
		"success" : function(data) {
711
			console.log(data);
712
			if (data.success){
713
			}
714
		},
715
		"error":function(){
716
			$.MsgBox.Alert('提示','链接服务器超时')
714
			quickLog();
715
			operatTab();
716
			closeLog();
717 717
		}
718
	});
719
}
720

721

722
window.onload=function(){
723
	pageViewsVal();//文章浏览量
724
}
725

726

727
//纠错反馈
728
$(".correctSubmit").on("click",function(){
729
	var cntCon=$(this).siblings(".correctCon").val();
730
	var cntUser="";
731
	if(userid && userid != null && userid != "null") {
732
		cntUser = userid;
733
	}
734
	if(cntCon.length>500){
735
		$.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
736
		return;
737
	}else{
718
	})
719
	
720
	
721
	//文章浏览量
722
	function pageViewsVal(){
738 723
		$.ajax({
739
			"url": "/ajax/feedback/error/article",
740
			"type": "POST",
741
			"dataType": "json",
742
			"async": true,
743
			"data": {
744
				"id": articleId,
745
				"cnt":cntCon,
746
				"user":cntUser
747
			},
748
			"success": function(data) {
749
				if(data.success) {
750
					backSuccessed();
724
			"url" : "/ajax/article/pageViews",
725
			"type" :  "POST" ,
726
			"dataType" : "json",
727
			"data" :{"articleId":articleId},
728
			"success" : function(data) {
729
				console.log(data);
730
				if (data.success){
751 731
				}
752 732
			},
753
			"error": function() {
754
				$.MsgBox.Alert('提示', '链接服务器超时')
733
			"error":function(){
734
				$.MsgBox.Alert('提示','链接服务器超时')
755 735
			}
756 736
		});
757 737
	}
758 738
	
759 739
	
760
})
740
	window.onload=function(){
741
		pageViewsVal();//文章浏览量
742
	}
743
	
744
	
745
	//纠错反馈
746
	$(".correctSubmit").on("click",function(){
747
		var cntCon=$(this).siblings(".correctCon").val();
748
		var cntUser="";
749
		if(userid && userid != null && userid != "null") {
750
			cntUser = userid;
751
		}
752
		if(cntCon.length>500){
753
			$.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
754
			return;
755
		}else{
756
			$.ajax({
757
				"url": "/ajax/feedback/error/article",
758
				"type": "POST",
759
				"dataType": "json",
760
				"async": true,
761
				"data": {
762
					"id": articleId,
763
					"cnt":cntCon,
764
					"user":cntUser
765
				},
766
				"success": function(data) {
767
					if(data.success) {
768
						backSuccessed();
769
					}
770
				},
771
				"error": function() {
772
					$.MsgBox.Alert('提示', '链接服务器超时')
773
				}
774
			});
775
		}
776
		
777
		
778
	})
779
});

+ 45 - 19
js/articalShow2.js

@ -1,20 +1,35 @@
1 1
/*文章预览*/
2
var articleId =window.staticPageData.articleId;
3
if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
4
 	location.href="http://" + window.location.host + "/e/a.html?id="+articleId;
5
}
6
module.lWord(articleId,1,1);
7
var userid = $.cookie("userid");
8
var zjreturnId;
9
var wzreturnId;
10
var experarray = [];
11
var createTime,orderKey;
12
$(function() {
2
$(document).ready(function() {
3
	var articleId =window.staticPageData.articleId;
4
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
5
	 	location.href="http://" + window.location.host + "/e/a.html?id="+articleId;
6
	}
7
	module.lWord(articleId,1,1);
8
	var userid = $.cookie("userid");
9
	var zjreturnId;
10
	var wzreturnId;
11
	var experarray = [];
12
	var createTime,orderKey;
13

13 14
	loginYesOrNo();//判断个人是否登录
14 15
	articleshow();
15 16
	relevantExperts();
16 17
	relevantResources(); 
17 18
	wlog("article",articleId,"1");
19
	$('.wordHave').click(function(){$('html,body').animate({scrollTop: ($('.offmsg').outerHeight(true)+60)+'px'}, 800);}); //留言
20
	$('.shareWeixin').hover(function(){$('.shareCode').stop(true,false).fadeToggle();});//微信分享
21
	//微信分享
22
	var qrcode = new QRCode(document.getElementById("qrcode"), {
23
		width: 100,
24
		height: 100
25
	});
26

27
	function makeCode() {
28
		var hurl = window.location.host;
29
		var elurl = "http://" + hurl + "/e/a.html?id=" + articleId;
30
		qrcode.makeCode(elurl);
31
	}
32
	makeCode();
18 33
	//判断是否登录转态
19 34
	if(userid && userid != "null" && userid != null){
20 35
		$(".ifLoginOn").removeClass("displayNone");
@ -80,6 +95,9 @@ $(function() {
80 95
			"data" :{"articleId":articleId},
81 96
			"success" : function(data) {
82 97
				if (data.success){
98
					var articletitle = data.data.articleTitle + "-科袖网";
99
					document.title = articletitle;
100
					$("#articleTitle").text(data.data.articleTitle);
83 101
					$("#pageViews").text("阅读量 "+data.data.pageViews);
84 102
					$("#publishTime").text(commenTime(data.data.publishTime));
85 103
					if(data.data.articleImg){
@ -112,18 +130,26 @@ $(function() {
112 130
					var weibopic ="http://"+window.location.host+"/data/article/" + data.data.articleImg;
113 131
					$("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+encodeURIComponent(weibotitle)+"&url="+encodeURIComponent(weibourl)+"&pic="+encodeURIComponent(weibopic)+"&content=utf-8"+"&ralateUid=6242830109&searchPic=false&style=simple");
114 132
				}
115
				
116
				var articletitle = data.data.articleTitle + "-科袖网";
117
				document.title = articletitle;
118 133
				window.setTimeout(function() {
119 134
					$('body').scrollTop(4);
120
					var oShareW = $('.share-nav').outerWidth(true);
121
					$('.shareBlock').scrollFix( {
135
					$('.shareBlock').scrollFix({
122 136
				        startTop:'body',
123
				        bottom: '0',
137
				        bottom: 0,
124 138
				        endPos : '.share-bottom',
125
						width: oShareW ,
126
				        zIndex : 997
139
						width: $('.share-nav').outerWidth(true),
140
				        zIndex : 999
141
				    });	
142
				    
143
				}, 300);
144
				//不随滚动条滚动的固定层广告代码
145
				window.setTimeout(function() {
146
					$('#scroll-fixed-ad').scrollFix({
147
				    	oflag:true,
148
				    	startTop:'#scroll-fixed-ad',
149
				    	startBottom:".privateInfo",
150
				        distanceTop: $("header").outerHeight(true) + 20,
151
				        endPos: 'footer',
152
				        zIndex: 998
127 153
				    });	
128 154
				}, 300);
129 155
			},

+ 3 - 25
js/cmpInforShow.js

@ -329,17 +329,17 @@ $(function() {
329 329
							strAdd += '<ul class="h2Font clearfix">';
330 330
							strAdd += '<li><span class="time">' + commenTime(data.data.data[i].publishTime) + '</span></li>';
331 331
							strAdd += sowU
332
							strAdd += '<li><span class="comment"></span></li>';
332
							strAdd += '<li><span class="leaveMsgCount"></span></li>';
333 333
							strAdd += '</ul></div>';
334 334
							strAdd += '</a></li>';
335 335

336 336
							var $strAdd = $(strAdd);
337 337
							$("#proArticel").append($strAdd);
338
							commentnum(data.data.data[i].articleId, $strAdd) //文章评论数
338
							leaveMsgCount(data.data.data[i].articleId,1,$strAdd);
339 339
							if(isbind==true && i==0){
340 340
								var $strAddO = $(strAdd);
341 341
								$("#showArticle").append($strAddO);
342
								commentnum(data.data.data[0].articleId,$strAddO)
342
								leaveMsgCount(data.data.data[0].articleId,1,$strAddO);
343 343
							}
344 344

345 345
						}
@ -378,28 +378,6 @@ $(function() {
378 378

379 379
	}
380 380

381
	//查文章评论数
382
	function commentnum(articleId, $itemlist) {
383
		$.ajax({
384
			"url": "/ajax/leaveWord/lwCount",
385
			"type": "GET",
386
			"dataType": "json",
387
			"async": false,
388
			"data": {
389
				"articleId": articleId
390
			},
391
			"success": function(data) {
392
				if(data.success) {
393
					if(data.data>0){
394
						$itemlist.find(".comment").text("留言 " + data.data);
395
					}
396
				}
397
			},
398
			"error": function() {
399
				$.MsgBox.Alert('提示', '链接服务器超时')
400
			}
401
		});
402
	}
403 381
	//关注企业数量
404 382
	function guanzhuNum() {
405 383
		$.ajax({

+ 24 - 4
js/common.js

@ -725,6 +725,24 @@ function cancelCollectionAbout(watchObject,sel,num) {
725 725
	});
726 726
}
727 727

728
function leaveMsgCount(id,type, $str) {//查看留言数
729
	$.ajax({
730
		"url":"/ajax/leavemsg/count",
731
		"type": "GET",
732
		"dataType": "json",
733
		"data": {
734
			sid:id,
735
			stype: type
736
		},
737
		"success": function(data) {
738
			if(data.success) {
739
				if(data.data > 0) {
740
					$str.find(".leaveMsgCount").html("留言 " + data.data);
741
				}
742
			}
743
		}
744
	});
745
}
728 746
//企业规模
729 747
var orgSizeShow = {
730 748
	'1': '50人以内',
@ -1293,14 +1311,16 @@ function adScroll(){
1293 1311
		var windowHeight = $(window).innerHeight();
1294 1312
		var footerHeight = $("footer").outerHeight(true);
1295 1313
		var containH = $("#container").outerHeight(true)-footerHeight
1296
		var scroTop = $(window).scrollTop();
1297
		(scroTop+offTop-120) < containH ? (scroTop > offTop ? 
1314
		var objHeight= $("#scroll-fixed-ad").outerHeight();
1315
		var scroTop = document.body.scrollTop || document.documentElement.scrollTop;
1316
		(scroTop-objHeight+offTop) < containH ? (scroTop > offTop ? 
1298 1317
			(scroObj.attr('class',"div1 div2"), c && (scroObj.style.top = scroTop - offTop + "px")) :scroObj.attr('class',"div1")):
1299 1318
					(scroObj.attr('class',"div1 div3"),scroObj.css("bottom",windowHeight + scroTop + footerHeight+ 10 - scrollHeight))
1300
	console.log("***"+(scroTop+offTop-120))
1319
//	console.log(containH+"***"+(scroTop+offTop-objHeight))
1320
	console.log(scroTop+"&&&&&"+offTop+"&&&"+objHeight)
1301 1321
	}
1302 1322
	var scroObj = $("#scroll-fixed-ad");
1303
	var offTop=scroObj.offset().top + 40;
1323
	var offTop= scroObj.offset().top + 40;
1304 1324
	if(scroObj == undefined) return !1;
1305 1325
	var c;
1306 1326
	c = window.ActiveXObject && !window.XMLHttpRequest;

+ 1 - 1
js/correctBack.js

@ -23,7 +23,7 @@ $(function() {
23 23
		var $footerHeight = $('footer').outerHeight(true);
24 24
		var $windowHeight = $(window).innerHeight();
25 25
		scrollTop > 50 ? $("#scrollUp").fadeIn(200).css("display","block") : $("#scrollUp").fadeOut(200);			
26
		$bottomTools.css("bottom", scrollHeight - scrollTop - $footerHeight > $windowHeight ? 30 : $windowHeight + scrollTop + $footerHeight + 30 - scrollHeight);
26
		$bottomTools.css("bottom", scrollHeight - scrollTop - $footerHeight > $windowHeight ? 20 : $windowHeight + scrollTop + $footerHeight + 20 - scrollHeight);
27 27
	});
28 28
	$('#scrollUp').click(function (e) {
29 29
		e.preventDefault();

+ 51 - 82
js/discover.js

@ -9,6 +9,40 @@ $(function() {
9 9
	var rows="20",fTime,fId,QTime,QId;
10 10
	var sortColumn=["3","7","10","4","5","6","8"]//发现栏目显示顺序
11 11
	
12
	hotNews();
13
    importNews();
14
	var linkNum=0;//栏目类别导航
15
	if(linkNum==0){
16
        firstListShow(true);
17
	}
18
	navmenu();
19
	//轮播加载页面
20
	$.ajax({
21
		"url":"/data/inc/col_banner.html",
22
		"dataType":"html",
23
		"success":function(result){
24
			$(".slide-box").html(result);
25
			bannerRotate.bannerInit();// 轮播
26
			for(var i=0;i<5;i++){
27
				var dataId=$(".slide-item").eq(i).attr("data-id");
28
				exculdeIds.push(dataId);
29
				// exculdeId2s.push(dataId);
30
			}
31
			$(".slide-list").on("click",".slide-item",function(){
32
				var columId=$(this).attr("data-col");
33
				$.ajax({
34
					"url":"/ajax/operation/statist/bannerClick",
35
					"type":"POST" ,
36
					"dataType":"json",
37
					"data":{"id":columId},
38
					"success" : function(data) {
39
						console.log(data)
40
					}
41
				})
42
			})
43
		}
44
	})
45
	
12 46
	if(userid && userid != null && userid != "null") {
13 47
		$(".privateInfo .onlogined").removeClass("displayNone")
14 48
		$(".privateInfo .unlogined").addClass("displayNone")
@ -234,41 +268,6 @@ $(function() {
234 268
		})
235 269
	}
236 270
	
237
	
238
	//轮播加载页面
239
	$.ajax({
240
		"url":"/data/inc/col_banner.html",
241
		"dataType":"html",
242
		"success":function(result){
243
			$(".slide-box").html(result);
244
			bannerRotate.bannerInit();// 轮播
245
			for(var i=0;i<5;i++){
246
				var dataId=$(".slide-item").eq(i).attr("data-id");
247
				exculdeIds.push(dataId);
248
				// exculdeId2s.push(dataId);
249
			}
250
			$(".slide-list").on("click",".slide-item",function(){
251
				var columId=$(this).attr("data-col");
252
				$.ajax({
253
					"url":"/ajax/operation/statist/bannerClick",
254
					"type":"POST" ,
255
					"dataType":"json",
256
					"data":{"id":columId},
257
					"success" : function(data) {
258
						console.log(data)
259
					}
260
				})
261
			})
262
		}
263
	})
264
	
265
	hotNews();
266
    importNews();
267
	var linkNum=0;//栏目类别导航
268
	if(linkNum==0){
269
        firstListShow(true);
270
	}
271
	navmenu();
272 271
	function navmenu(){
273 272
		var str='<li class="table-tab-slide table-tab-slide-active" data-col="0">推荐</li>'
274 273
		for(var i=0;i<sortColumn.length;i++){
@ -505,6 +504,17 @@ $(function() {
505 504
                        $("#table-item-0").parent().find(".js-load-more").unbind("click");
506 505
                        $("#table-item-0").parent().find(".js-load-more").hide();
507 506
                    }
507
                    window.setTimeout(function() {
508
						//不随滚动条滚动的固定层广告代码
509
				        $('#scroll-fixed-ad').scrollFix({
510
				        	oflag:true,
511
				        	startTop:'#scroll-fixed-ad',
512
				        	startBottom:".privateInfo",
513
				            distanceTop: $("header").outerHeight(true) + 20,
514
				            endPos: 'footer',
515
				            zIndex: 998
516
				        });
517
					}, 300);
508 518
                }
509 519
            },
510 520
            "error":function(){
@ -597,13 +607,13 @@ $(function() {
597 607
		strAdd += '<span class="ownerName"></span>';
598 608
		strAdd += '<span class="time">'+ commenTime(dataStr.publishTime) +'</span>';
599 609
		strAdd += sowU
600
		strAdd += '<span class="comment"></span>';
610
		strAdd += '<span class="leaveMsgCount"></span>';
601 611
		strAdd += '</div></div>';
602 612
		strAdd += '</a>';
603 613
		
604 614
		var $strAdd = $(strAdd);
605 615
		listLi.append( $strAdd);
606
		commentnum(dataStr.articleId, $strAdd) //文章评论数	
616
		leaveMsgCount(dataStr.articleId,1, $strAdd);
607 617
		if(dataStr.articleType==1){
608 618
			userFun(dataStr.professorId, $strAdd);
609 619
		}else{
@ -650,13 +660,13 @@ $(function() {
650 660
		strAdd += '<span class="ownerName"></span>';
651 661
		strAdd += '<span class="time">'+ commenTime(dataStr.publishTime) +'</span>';
652 662
		strAdd += sowU
653
		strAdd += '<span class="comment"></span>';
663
		strAdd += '<span class="leaveMsgCount"></span>';
654 664
		strAdd += '</div></div>';
655 665
		strAdd += '</a>';
656 666
		
657 667
		var $strAdd = $(strAdd);
658 668
		listLi.append($strAdd);
659
		commentnum(dataStr.articleId, $strAdd) //文章评论数	
669
		leaveMsgCount(dataStr.articleId,1, $strAdd);
660 670
		if(dataStr.articleType==1){
661 671
			userFun(dataStr.professorId, $strAdd);
662 672
		}else{
@ -712,30 +722,9 @@ $(function() {
712 722
        }
713 723
		questioninfo(dataStr.qid, $str);
714 724
        proinfo(dataStr.uid, $str);
715
		leaveMsgCount(dataStr.id, $str);
725
		leaveMsgCount(dataStr.id,4, $str);
716 726
	}
717 727
	
718
	function leaveMsgCount(id, $str) {
719
		$.ajax({
720
			"url":"/ajax/leavemsg/count",
721
			"type": "GET",
722
			"dataType": "json",
723
			"data": {
724
				sid:id,
725
				stype: "4"
726
			},
727
			"success": function(data) {
728
				if(data.success) {
729
					if(data.data > 0) {
730
						$str.find(".leaveMsgCount").html("留言 " + data.data);
731
					}
732
				}
733
			},
734
			"error": function() {
735
			}
736
		});
737
	}
738

739 728
	function attendCount(id, $str) {
740 729
		$.ajax({
741 730
			"url":"/ajax/watch/countProfessor",
@ -757,27 +746,7 @@ $(function() {
757 746
		});
758 747
	}
759 748
	
760
	//查文章留言数
761
	function commentnum(articleId, $itemlist) {
762
		$.ajax({
763
			"url": "/ajax/leaveWord/lwCount",
764
			"type": "GET",
765
			"dataType": "json",
766
			"async": false,
767
			"data": {
768
				"articleId": articleId
769
			},
770
			"success": function(data) {
771
				if(data.success) {
772
					if(data.data>0){
773
						$itemlist.find(".comment").text("留言 " + data.data);
774
					}
775
				}
776
			},
777
			"error": function() {
778
			}
779
		});
780
	}
749
	
781 750
	function proinfo(pid, $str) {
782 751
		$.ajax({
783 752
			"url":"/ajax/professor/baseInfo/" + pid,

+ 3 - 3
js/head-staticize.js

@ -28,7 +28,7 @@ var headerHtml = '';
28 28
					//已登录状态
29 29
					'<div class="onlogin floatR displayNone">'+
30 30
						'<div class="headuserimg floatR">'+
31
								'<div class="headuser userRadius"><img class="portrait-p" src="images/default-photo.jpg" /></div>'+
31
								'<div class="headuser userRadius"><img class="portrait-p" src="/images/default-photo.jpg" /></div>'+
32 32
								'<div class="comuserSelf displayNone">' +
33 33
					                '<div class="triangleB"></div>'+
34 34
					                '<div class="personal-box bgRadius">'+
@ -40,8 +40,8 @@ var headerHtml = '';
40 40
					           ' </div>' + 
41 41
						'</div>' +
42 42
						'<ul class="headnavbtn floatR">'+
43
								'<li class="mymessage"><a href="/inform.html">通知<span class="badge"></span></a></li>'+
44
								'<li class="mymessage"><a href="/tidings.html">消息<span class="badge"></span></a></li>'+
43
								'<li class="pr myinform"><a href="/inform.html">通知<span class="badge"></span></a></li>'+
44
								'<li class="pr mymessage"><a href="/tidings.html">消息<span class="badge"></span></a></li>'+
45 45
								'<li class="mywork"><a href="/myDemand.html">我的工作台</a></li>'+
46 46
						'</ul>' +
47 47
					'</div>' +

+ 1 - 1
js/header.js

@ -28,7 +28,7 @@ var headerHtml = '';
28 28
					//已登录状态
29 29
					'<div class="onlogin floatR displayNone">'+
30 30
						'<div class="headuserimg floatR">'+
31
								'<div class="headuser userRadius"><img class="portrait-p" src="../images/default-photo.jpg" /></div>'+
31
								'<div class="headuser userRadius"><img class="portrait-p" src="/images/default-photo.jpg" /></div>'+
32 32
								'<div class="comuserSelf displayNone">' +
33 33
					                '<div class="triangleB"></div>'+
34 34
					                '<div class="personal-box bgRadius">'+

+ 5 - 30
js/paperList.js

@ -82,31 +82,7 @@ $(document).ready(function(){
82 82
	});
83 83
	return num;
84 84
}
85
function lewordNum(pId) {
86
		var num;
87
		var data = {"paperId": pId}	
88
		$.ajax({
89
			url:"/ajax/leaveWord/lwCount/paper",
90
			data: data,
91
			dataType: 'json', //服务器返回json格式数据
92
			type: 'get', //HTTP请求类型
93
			timeout: 10000, //超时时间设置为10秒;
94
			async:false,
95
			traditional: true,
96
			success: function(data) {
97
				if(data.success) {
98
					num=data.data;
99
					}
100 85

101
				
102
			},
103
			error: function(xhr, type, errorThrown) {
104
				//异常处理;
105
				$.MsgBox.Alert('提示',"服务器链接超时");
106
			}
107
		});
108
		return num;
109
}
110 86
	 getPaperMe(1,true,1);
111 87
	 function paperHtml($data) {
112 88
	 	for(var i=0;i<$data.length;i++) {
@ -118,17 +94,14 @@ function lewordNum(pId) {
118 94
 			if(isAgreeNum($data[i].id)!=0){
119 95
 				thub='<li><span>赞 '+isAgreeNum($data[i].id)+'</span></li>';
120 96
 			}
121
 			var lew="";
122
 			if(lewordNum($data[i].id)!=0){
123
 			    lew='<li><span>留言 '+lewordNum($data[i].id)+'</span></li>';
124
 			}
97
 			
125 98
	 		var oStr='<li '+oLi+'>'+
126 99
				'<a href="'+oHtml+'?paperId='+$data[i].id+'" target="_blank">'+
127 100
					'<div class="madiaHead paperHead"></div>'	+						
128 101
						'<div class="madiaInfo">'+					
129 102
							'<p class="h1Font ellipsisSty">'+$data[i].name+'</p>'+						
130 103
							'<ul class="showliTop h2Font clearfix">'+
131
								'<li><span>'+oTime+'</span></li>'+pageview+thub+lew+
104
								'<li><span>'+oTime+'</span></li>'+pageview+thub+'<li><span class="leaveMsgCount"></span></li>'+
132 105
							'</ul>'+
133 106
						'</div>'+
134 107
				'</a>'+
@ -137,7 +110,9 @@ function lewordNum(pId) {
137 110
					'<li><span class="editThis" data-id="'+$data[i].id+'"></span></li>'+
138 111
				'</ul>'+
139 112
			'</li>'	
140
			$("#paperList").append(oStr);
113
			var $oStr = $(oStr);
114
			$("#paperList").append($oStr);
115
			leaveMsgCount($data[i].id,2,$oStr);
141 116
	 	}
142 117
	 }
143 118
	/*点击修改跳转修改页面*/

+ 19 - 3
js/paperShow.js

@ -3,10 +3,27 @@ $(document).ready(function() {
3 3
	var userid = $.cookie("userid");
4 4
	var userName = $.cookie("userName");
5 5
	var paperId = GetQueryString("paperId");
6
	var hurl = window.location.host;
6 7
	module.lWord(paperId,2);
7 8
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
8 9
	 	location.href="http://" + window.location.host + "/e/l.html?id="+paperId;
9 10
	}
11
	
12
	//分享关注按钮
13
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
14
	$('.goSpan').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
15
	
16
	//微信分享
17
	var qrcode = new QRCode(document.getElementById("qrcode"), {
18
		width : 100,
19
		height : 100
20
	});
21
	function makeCode(){
22
		var elurl = "http://" + hurl + "/e/l.html?id=" + paperId ; 
23
		qrcode.makeCode(elurl);
24
	}
25
	makeCode();
26
	
10 27
	ifcollectionAbout(paperId,$("#collectBtn"), 5)
11 28
	getPaperMe();
12 29
	pageViewsVal();
@ -213,10 +230,9 @@ $(document).ready(function() {
213 230
								width : 100,
214 231
								height : 100
215 232
							});
216
							makeCode();
233
							makeCodePar();
217 234
						}
218
						function makeCode(){
219
							var hurl = window.location.host;
235
						function makeCodePar(){
220 236
							if(userid) {
221 237
								var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(paperId)+"&d="+s16to64(userid)+"&f=1";
222 238
							} else{

+ 23 - 7
js/paperShow1.js

@ -3,10 +3,27 @@ $(document).ready(function() {
3 3
	var userid = $.cookie("userid");
4 4
	var userName = $.cookie("userName");
5 5
	var paperId = window.staticPageData.id;
6
	var hurl = window.location.host;
6 7
	module.lWord(paperId,2,1);
7 8
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
8 9
	 	location.href="http://" + window.location.host + "/e/l.html?id="+paperId;
9 10
	}
11
	
12
	//分享关注按钮
13
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
14
	$('.goSpan').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
15
	
16
	//微信分享
17
	var qrcode = new QRCode(document.getElementById("qrcode"), {
18
		width : 100,
19
		height : 100
20
	});
21
	function makeCode(){
22
		var elurl = "http://" + hurl + "/e/l.html?id=" + paperId ; 
23
		qrcode.makeCode(elurl);
24
	}
25
	makeCode();
26
	
10 27
	ifcollectionAbout(paperId,$("#collectBtn"), 5)
11 28
	getPaperMe();
12 29
	pageViewsVal();
@ -211,10 +228,9 @@ $(document).ready(function() {
211 228
								width : 100,
212 229
								height : 100
213 230
							});
214
							makeCode();
231
							makeCodePar();
215 232
						}
216
						function makeCode(){
217
							var hurl = window.location.host;
233
						function makeCodePar(){
218 234
							if(userid) {
219 235
								var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(paperId)+"&d="+s16to64(userid)+"&f=1";
220 236
							} else{
@ -333,10 +349,10 @@ $(document).ready(function() {
333 349
					}
334 350
				}
335 351
			},
336
			complete:function(){
337
				$("#advertisement a").attr("href","/"+$("#advertisement a").attr("href"));
338
				$("#advertisement img").attr("src","/"+$("#advertisement img").attr("src"));
339
			},
352
//			complete:function(){
353
//				$("#advertisement a").attr("href","/"+$("#advertisement a").attr("href"));
354
//				$("#advertisement img").attr("src","/"+$("#advertisement img").attr("src"));
355
//			},
340 356
			error: function() {
341 357
				$.MsgBox.Alert('提示',"服务器链接超时");
342 358
			}

+ 5 - 30
js/patentList.js

@ -80,31 +80,7 @@ $(document).ready(function(){
80 80
	});
81 81
	return num;
82 82
}
83
function lewordNum(pId) {
84
		var num;
85
		var data = {"patentId": pId}	
86
		$.ajax({
87
			url:"/ajax/leaveWord/lwCount/patent",
88
			data: data,
89
			dataType: 'json', //服务器返回json格式数据
90
			type: 'get', //HTTP请求类型
91
			timeout: 10000, //超时时间设置为10秒;
92
			async:false,
93
			traditional: true,
94
			success: function(data) {
95
				if(data.success) {
96
					num=data.data;
97
					}
98 83

99
				
100
			},
101
			error: function(xhr, type, errorThrown) {
102
				//异常处理;
103
				$.MsgBox.Alert('提示',"服务器链接超时");
104
			}
105
		});
106
		return num;
107
}
108 84
	 getPatentMe(1,true,1);
109 85
	 function patentHtml($data) {
110 86
	 	for(var i=0;i<$data.length;i++) {
@ -117,17 +93,14 @@ function lewordNum(pId) {
117 93
 			if(isAgreeNum($data[i].id)!=0){
118 94
 				thub='<li><span>赞 '+isAgreeNum($data[i].id)+'</span></li>';
119 95
 			}
120
 			var lew="";
121
 			if(lewordNum($data[i].id)!=0){
122
 			    lew='<li><span>留言 '+lewordNum($data[i].id)+'</span></li>';
123
 			}
96
 			
124 97
	 	var oStr='<li '+oLi+'>'+
125 98
				'<a href="'+oHtml+'?patentId='+$data[i].id+'" target="_blank">'+
126 99
					'<div class="madiaHead patentHead"></div>'	+						
127 100
						'<div class="madiaInfo">'+					
128 101
							'<p class="h1Font ellipsisSty">'+$data[i].name+'</p>'+						
129 102
							'<ul class="showliTop h2Font clearfix">'+
130
								'<li><span>'+oTime+'</span></li>'+pageview+thub+lew+
103
								'<li><span>'+oTime+'</span></li>'+pageview+thub+'<li><span class="leaveMsgCount"></span></li>'+
131 104
							'</ul>'+
132 105
						'</div>'+
133 106
				'</a>'+
@ -136,7 +109,9 @@ function lewordNum(pId) {
136 109
					'<li><span class="editThis" data-id="'+$data[i].id+'"></span></li>'+
137 110
				'</ul>'+
138 111
			'</li>'	
139
			$("#patentList").append(oStr);
112
			var $oStr = $(oStr);
113
			$("#patentList").append($oStr);
114
			leaveMsgCount($data[i].id,3,$oStr);
140 115
	 	}
141 116
	 }
142 117
	/*点击修改跳转修改页面*/

+ 17 - 3
js/patentShow.js

@ -1,8 +1,23 @@
1 1
$(document).ready(function() {
2 2
	var userid=$.cookie("userid");
3
	var hurl = window.location.host;
3 4
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
4 5
	 	location.href="http://" + window.location.host + "/e/z.html?id="+GetQueryString("patentId");
5 6
	}
7
	
8
	//分享关注按钮
9
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
10
	//微信分享
11
	var qrcode = new QRCode(document.getElementById("qrcode"), {
12
		width : 100,
13
		height : 100
14
	});
15
	function makeCode(){
16
		var elurl = "http://" + hurl + "/e/z.html?id=" + GetQueryString("patentId") ; 
17
		qrcode.makeCode(elurl);
18
	}
19
	makeCode();
20
	
6 21
	module.lWord(GetQueryString("patentId"),3);
7 22
	function Patent() {
8 23
		this.init();
@ -171,10 +186,9 @@ $(document).ready(function() {
171 186
				width : 100,
172 187
				height : 100
173 188
			});
174
			makeCode();
189
			makeCodePat();
175 190
		}
176
		function makeCode(){
177
			var hurl = window.location.host;
191
		function makeCodePat(){
178 192
			if(userid) {
179 193
				var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(GetQueryString("patentId"))+"&d="+s16to64(userid);
180 194
			} else{

+ 20 - 6
js/patentShow1.js

@ -1,9 +1,24 @@
1 1
$(document).ready(function() {
2 2
	var userid=$.cookie("userid");
3 3
	var patentId =window.staticPageData.id
4
	var hurl = window.location.host;
4 5
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
5 6
	 	location.href="http://" + window.location.host + "/e/z.html?id="+patentId;
6 7
	}
8
	
9
	//分享关注按钮
10
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
11
	//微信分享
12
	var qrcode = new QRCode(document.getElementById("qrcode"), {
13
		width : 100,
14
		height : 100
15
	});
16
	function makeCode(){
17
		var elurl = "http://" + hurl + "/e/z.html?id=" + patentId ; 
18
		qrcode.makeCode(elurl);
19
	}
20
	makeCode();
21
	
7 22
	module.lWord(patentId,3,1);
8 23
	function Patent() {
9 24
		this.init();
@ -120,7 +135,7 @@ $(document).ready(function() {
120 135
		var weibopic = "http://" + window.location.host + "/images/default-patent.jpg";
121 136
		$("#weibo").attr("href", "http://service.weibo.com/share/share.php?appkey=3677230589&title=" + encodeURIComponent(weibotitle) + "&url=" + encodeURIComponent(weibourl) + "&pic=" + encodeURIComponent(weibopic) + "&content=utf-8" + "&ralateUid=6242830109&searchPic=false&style=simple");
122 137
		$obj.bindEvent($obj);
123
		$("#advertisement img").attr("src","/"+$("#advertisement img").attr("src"));
138
//		$("#advertisement img").attr("src","/"+$("#advertisement img").attr("src"));
124 139
	}
125 140
	Patent.prototype.patentAuth = function($data, $obj) {
126 141
		for(var i in $data) {
@ -177,14 +192,13 @@ $(document).ready(function() {
177 192
				width : 100,
178 193
				height : 100
179 194
			});
180
			makeCode();
195
			makeCodePat();
181 196
		}
182
		function makeCode(){
183
			var hurl = window.location.host;
197
		function makeCodePat(){
184 198
			if(userid) {
185
				var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(patentId)+"&d="+s16to64(userid);
199
				var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(GetQueryString("patentId"))+"&d="+s16to64(userid);
186 200
			} else{
187
				var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(patentId);
201
				var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(GetQueryString("patentId"));
188 202
			} 
189 203
			qrcode.makeCode(elurl);
190 204
		}

+ 18 - 13
js/qa-show.js

@ -10,6 +10,20 @@ $(function() {
10 10
		weibopic = "http://" + hurl + "/images/logo180.png",
11 11
		weibotitle = "";
12 12
	var oanswer = document.getElementsByClassName("go-answer")[0];
13
	
14
	//分享关注按钮
15
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
16
	//微信分享
17
	var qrcode = new QRCode(document.getElementById("qrcode"), {
18
		width : 100,
19
		height : 100
20
	});
21
	function makeCode(){
22
		var elurl = "http://" + hurl + "/e/wen.html?id=" + questionId ; 
23
		qrcode.makeCode(elurl);
24
	}
25
	makeCode();
26
	
13 27
	module.lWord;
14 28
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
15 29
	 	location.href="http://" + hurl + "/e/wen.html?id="+questionId;
@ -354,7 +368,7 @@ $(function() {
354 368
				
355 369
			var $str = $(liStr)
356 370
			proinfo(dataStr.uid, $str);
357
			leaveMsgCount(dataStr.id, $str);
371
			leaveMsgCount(dataStr.id,4, $str);
358 372
			answerAgreeNum(dataStr.id, $str);
359 373
			if(userid && userid != null && userid != "null") {
360 374
				isAgree(dataStr.id, $str)
@ -560,24 +574,15 @@ $(function() {
560 574
					width : 100,
561 575
					height : 100
562 576
				});
577
				makeCodeQA();
578
			}
579
			function makeCodeQA(){
563 580
				var elurl = "http://" + hurl + "/e/da.html?id="+anid;
564 581
				qrcode.makeCode(elurl);
565 582
			}
566 583
			//微博分享
567 584
			$str.find(".weiboA").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+encodeURIComponent(weibotitle)+"&url="+encodeURIComponent(weibourl)+"&pic="+encodeURIComponent(weibopic)+"&content=utf-8"+"&ralateUid=6242830109&searchPic=false&style=simple");
568 585
		},
569
		leaveMsgCount=function(id, $str) {
570
			oAjax("/ajax/leavemsg/count", {
571
				sid:id,
572
				stype: "4"
573
			}, "get", function(data) {
574
				if(data.success) {
575
					if(data.data > 0) {
576
						$str.find(".leaveMsgCount").html(data.data);
577
					}
578
				}
579
			})
580
		},
581 586
		proinfo = function(pid, $str,Fflag) {
582 587
			oAjax("/ajax/professor/baseInfo/" + pid, {}, "get", function(res) {
583 588
				var dataStr = res.data

+ 4 - 8
js/scrollfix.js

@ -5,7 +5,6 @@
5 5
	//descirption:scroll and fixed some div
6 6
	$.fn.scrollFix = function(options) {
7 7
		return this.each(function() {
8
9 8
			var opts = $.extend({}, $.fn.scrollFix.defaultOptions, options);
10 9
			var obj = $(this),
11 10
				base = this,
@ -17,6 +16,7 @@
17 16
				outerHeight,
18 17
				outerWidth,
19 18
				objWidth = 0,
19
				oflag=opts.oflag,
20 20
				placeholder = jQuery('<div>'), //创建一个jquery对象
21 21
				optsTop = opts.distanceTop, //定义到顶部的高度
22 22
				endfix = 0; //开始停止固定的位置
@ -166,7 +166,7 @@
166 166
					obj.addClass(opts.baseClassName).css({
167 167
						"z-index": zIndex,
168 168
						"position": "absolute",
169
						"top": endfix - parentOffsetTop + optsTop,
169
						"top":oflag?(endfix - parentOffsetTop + optsTop - 20):(endfix - parentOffsetTop + optsTop),
170 170
						'bottom': '',
171 171
						"left": selfLeft - parentOffsetLeft,
172 172
						"width": objWidth
@ -208,12 +208,6 @@
208 208
				}
209 209
					
210 210
			});
211
//			$(window).on("scroll", function() {
212
//				if (Timer) {
213
//					clearTimeout(Timer);
214
//				}
215
//				Timer = setTimeout(onScroll, 0);
216
//			});
217 211
			// 当发现调整屏幕大小时,重新执行代码
218 212
			$(window).on("resize", function() {
219 213
				if (Timer) {
@ -228,6 +222,7 @@
228 222
		})
229 223
	}
230 224
	$.fn.scrollFix.defaultOptions = {
225
		oflag:false,//如果有这个,距离底部有20px距离,默认为false
231 226
		startTop: null, //滑到这个位置顶部时开始浮动,默认为空
232 227
		startBottom: null, //滑到这个位置末端开始浮动,默认为空
233 228
		distanceTop: 0, //固定在顶部的高度
@ -236,4 +231,5 @@
236 231
		zIndex: 0, //z-index值
237 232
		baseClassName: 'scrollfixed' //开始固定时添加的类
238 233
	};
234
	
239 235
})(jQuery);

+ 14 - 24
js/searchNew.js

@ -410,6 +410,17 @@ $(function() {
410 410
								}
411 411
							});
412 412
						}
413
						window.setTimeout(function() {
414
							//不随滚动条滚动的固定层广告代码
415
					        $('#scroll-fixed-ad').scrollFix({
416
					        	oflag:true,
417
					        	startTop:'#scroll-fixed-ad',
418
					        	startBottom:"header",
419
					            distanceTop: $("header").outerHeight(true) + 20,
420
					            endPos: 'footer',
421
					            zIndex: 998
422
					        });
423
						}, 300);
413 424
						
414 425
					}else{
415 426
						$("#expertList,.expertPageCode").hide();
@ -550,7 +561,7 @@ $(function() {
550 561
							itemlist += '<span class="nameSpan" id="userName"></span>'
551 562
							itemlist += '<span class="time" id="PubTime"></span>'
552 563
							itemlist += sowU
553
							itemlist += '<span id="comment"></span>'
564
							itemlist += '<span class="leaveMsgCount"></span>'
554 565
							itemlist += '</div>'
555 566
							itemlist += '</div></a></li>';
556 567
							$itemlist = $(itemlist);
@ -562,7 +573,7 @@ $(function() {
562 573
								$itemlist.find("#articleImg").attr("style", "background-image: url(/data/article/" + datalist.articleImg + ");");
563 574
							}
564 575
							$itemlist.find("#PubTime").text(commenTime(datalist.publishTime));
565
							commentnum(datalist.articleId, $itemlist)
576
							leaveMsgCount(datalist.articleId,1,$itemlist);
566 577
							if(articleType == 1) { //个人文章
567 578
								$itemlist.find("#userName").text(datalist.professor.name);
568 579
							} else if(articleType == 2) { //企业文章
@ -600,28 +611,7 @@ $(function() {
600 611
			}
601 612
		});
602 613
	}
603
	function commentnum(articleId, $itemlist) {
604
		$.ajax({
605
			"url": "/ajax/leaveWord/lwCount",
606
			"type": "GET",
607
			"dataType": "json",
608
			"async": false,
609
			"data": {
610
				"articleId": articleId
611
			},
612
			"success": function(data) {
613
				if(data.success) {
614
					if(data.data>0){
615
						$itemlist.find("#comment").text("留言 " + data.data);
616
					}
617
					
618
				}
619
			},
620
			"error": function() {
621
				$.MsgBox.Alert('提示', '链接服务器超时')
622
			}
623
		});
624
	}
614
	
625 615
	//资源
626 616
	function resourceListVal(keyt,pageSize, pageNo,isresource) {
627 617
		$.ajax({

+ 7 - 48
js/userInforShow.js

@ -921,18 +921,18 @@ $(function() {
921 921
							strAdd += '<ul class="h2Font clearfix">';
922 922
							strAdd += '<li><span class="time">'+ commenTime(dataStr[i].publishTime) +'</span></li>';
923 923
							strAdd += sowU
924
							strAdd += '<li><span class="comment"></span></li>';
924
							strAdd += '<li><span class="leaveMsgCount"></span></li>';
925 925
							strAdd += '</ul></div>';
926 926
							strAdd += '</a></li>';
927 927
							
928 928
							var $strAdd = $(strAdd);
929 929
							$("#proArticel").append( $strAdd);
930
							commentnum(dataStr[i].articleId, $strAdd) //文章评论数
930
							leaveMsgCount(dataStr[i].articleId,1,$strAdd);
931 931
							if(isbind==true && i==0){
932 932
								var $strAddO = $(strAdd);
933 933
								$("#showArticle").html("");
934 934
								$("#showArticle").append($strAddO);
935
								commentnum(dataStr[0].articleId,$strAddO)
935
								leaveMsgCount(dataStr[0].articleId,1,$strAddO);
936 936
							}
937 937
						}
938 938
						//分页
@ -1188,7 +1188,7 @@ $(function() {
1188 1188
                                $("#showAnswer").append(li);
1189 1189
                                questioninfo(dataStr[i].qid, li);
1190 1190
                                proinfo(dataStr[i].uid, li);
1191
                                leaveMsgCount(dataStr[i].id, li);
1191
                                leaveMsgCount(dataStr[i].id,4, li);
1192 1192
1193 1193
                            }
1194 1194
                        }
@ -1301,7 +1301,7 @@ $(function() {
1301 1301
                                $("#showAnswer").append(li);
1302 1302
                                questioninfo(dataStr[i].qid, li);
1303 1303
                                proinfo(dataStr[i].uid, li);
1304
                                leaveMsgCount(dataStr[i].id, li);
1304
                                leaveMsgCount(dataStr[i].id,4, li);
1305 1305
1306 1306
                            }
1307 1307
                        }
@ -1378,28 +1378,6 @@ $(function() {
1378 1378
        });
1379 1379
    }
1380 1380
1381
    //查文章评论数
1382
	function commentnum(articleId, $itemlist) {
1383
		$.ajax({
1384
			"url": "/ajax/leaveWord/lwCount",
1385
			"type": "GET",
1386
			"dataType": "json",
1387
			"async": false,
1388
			"data": {
1389
				"articleId": articleId
1390
			},
1391
			"success": function(data) {
1392
				if(data.success) {
1393
					if(data.data>0){
1394
						$itemlist.find(".comment").text("留言 " + data.data);
1395
					}
1396
				}
1397
			},
1398
			"error": function() {
1399
				$.MsgBox.Alert('提示', '链接服务器超时')
1400
			}
1401
		});
1402
	}
1403 1381
	//合作专家
1404 1382
	function relevantExperts(){
1405 1383
		$.ajax({
@ -2121,7 +2099,7 @@ $(function() {
2121 2099
        }
2122 2100
        questioninfo(dataStr.qid, $strAdd);
2123 2101
        proinfo(dataStr.uid, $strAdd);
2124
        leaveMsgCount(dataStr.id, $strAdd);
2102
        leaveMsgCount(dataStr.id,4, $strAdd);
2125 2103
    }
2126 2104
    function question(dataStr,listLi) {
2127 2105
        var baImg = "../images/default-q&a.jpg";
@ -2219,26 +2197,7 @@ $(function() {
2219 2197
            }
2220 2198
        });
2221 2199
    }
2222
    function leaveMsgCount(id, $str) {
2223
        $.ajax({
2224
            "url":"/ajax/leavemsg/count",
2225
            "type": "GET",
2226
            "dataType": "json",
2227
            "data": {
2228
                sid:id,
2229
                stype: "4"
2230
            },
2231
            "success": function(data) {
2232
                if(data.success) {
2233
                    if(data.data > 0) {
2234
                        $str.find(".leaveMsgCount").html("留言 " + data.data);
2235
                    }
2236
                }
2237
            },
2238
            "error": function() {
2239
            }
2240
        });
2241
    }
2200
   
2242 2201
    function attendCount(id, $str) {
2243 2202
    $.ajax({
2244 2203
        "url":"/ajax/watch/countProfessor",

+ 3 - 20
paperShow.html

@ -131,9 +131,7 @@
131 131
				</div>
132 132
			</div>
133 133
			<div class="rightconBox floatR">
134
				<div class="conItem advertBox advertItem" >
135
					<script src="js/adverts/ad_pap.js"></script>
136
				</div>
134
				<div class="conItem advertBox advertItem" ></div>
137 135
				<div class="conItem displayNone" id="patentrelate">
138 136
					<div class="form-item otherBlock currentBlock">
139 137
						<div class="aboutTit">相关专利</div>
@ -162,24 +160,9 @@
162 160
<script type="text/javascript" src="js/paperShow.js"></script>
163 161
<script type="text/javascript" src="js/quickLogin.js"></script>
164 162
<script type="text/javascript">
165

166
	//分享关注按钮
167
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
168

169
	//微信分享
170
	var qrcode = new QRCode(document.getElementById("qrcode"), {
171
		width : 100,
172
		height : 100
163
	$(function () {	
164
		addscript("ad_common");
173 165
	});
174
	function makeCode(){
175
		var hurl = window.location.host;
176
		var paperId =  GetQueryString("paperId");
177
		var elurl = "http://" + hurl + "/e/l.html?id=" + paperId ; 
178
		qrcode.makeCode(elurl);
179
	}
180
	makeCode();
181

182
	
183 166
</script>
184 167
</body>
185 168
</html>

+ 3 - 21
patentShow.html

@ -168,9 +168,7 @@
168 168
					<textarea class="frmcontype correctCon" placeholder="请具体说明您发现的问题,以便我们为您快速解决"></textarea>
169 169
					<button class="frmcontype btnModel correctSubmit" disabled>提交</button>
170 170
				</div>
171
				<div class="conItem advertBox advertItem">
172
					<script src="js/adverts/ad_pap.js"></script>
173
				</div>
171
				<div class="conItem advertBox advertItem"></div>
174 172
				<div class="conItem displayNone" id="paperList">
175 173
					<div class="form-item otherBlock currentBlock">
176 174
						<div class="aboutTit">相关论文</div>
@ -200,25 +198,9 @@
200 198
<script type="text/javascript" src="js/patentShow.js"></script>
201 199
<script type="text/javascript" src="js/quickLogin.js"></script>
202 200
<script type="text/javascript">
203

204
	//分享关注按钮
205
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
206
	$('.goSpan').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
207
	
208
	//微信分享
209
	var qrcode = new QRCode(document.getElementById("qrcode"), {
210
		width : 100,
211
		height : 100
201
	$(function () {	
202
		addscript("ad_common");
212 203
	});
213
	function makeCode(){
214
		var hurl = window.location.host;
215
		var patentId =  GetQueryString("patentId");
216
		var elurl = "http://" + hurl + "/e/z.html?id=" + patentId ; 
217
		qrcode.makeCode(elurl);
218
	}
219
	makeCode();
220

221
	
222 204
</script>
223 205
</body>
224 206
</html>

+ 3 - 20
qa-show.html

@ -172,9 +172,7 @@
172 172
				</div>
173 173
			</div>
174 174
			<div class="rightconBox floatR">
175
				<div class="conItem advertBox advertItem">
176
					<script src="js/adverts/ad_pap.js"></script>
177
				</div>
175
				<div class="conItem advertBox advertItem"></div>
178 176
				<div class="conBlock conItem displayNone">
179 177
					<div class="form-item">
180 178
						<div class="aboutTit">等您回答</div>
@ -204,24 +202,9 @@
204 202
<script type="text/javascript" src="js/qa-show.js"></script>
205 203
<script type="text/javascript" src="js/quickLogin.js"></script>
206 204
<script type="text/javascript">
207
	//分享关注按钮
208
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
209
	$('.goSpan').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
210
	
211
	//微信分享
212
	var qrcode = new QRCode(document.getElementById("qrcode"), {
213
		width : 100,
214
		height : 100
205
	$(function () {	
206
		addscript("ad_common");
215 207
	});
216
	function makeCode(){
217
		var hurl = window.location.host;
218
		var questionId =  GetQueryString("id");
219
		var elurl = "http://" + hurl + "/e/wen.html?id=" + questionId ; 
220
		qrcode.makeCode(elurl);
221
	}
222
	makeCode();
223

224
	
225 208
</script>
226 209
</body>
227 210
</html>

+ 5 - 2
searchNew.html

@ -159,8 +159,10 @@
159 159
				</div>
160 160
			</div>
161 161
			<div class="rightconBox floatR">
162
				<div class="conItem advertBox advertItem advertItem-A"></div>
163
				<div class="conItem advertBox advertItem advertItem-B"></div>
162
				<div id="scroll-fixed-ad">
163
					<div class="conItem advertBox advertItem advertItem-A"></div>
164
					<div class="conItem advertBox advertItem advertItem-B"></div>
165
				</div>
164 166
			</div>
165 167
		</div>
166 168
	</div>
@ -173,6 +175,7 @@
173 175
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
174 176
<script type="text/javascript" src="js/jquery.page.js"></script>
175 177
<script type="text/javascript" src="js/common.js"></script>
178
<script type="text/javascript" src="js/scrollfix.js"></script>
176 179
<script type="text/javascript" src="js/searchNew.js"></script>
177 180
<script type="text/javascript">
178 181
$(function () {