Browse Source

新增问题

luyanan 7 years ago
parent
commit
bab6071b4a
6 changed files with 441 additions and 24 deletions
  1. 26 6
      css/genindex.css
  2. 1 1
      css/popup.css
  3. 114 10
      discover.html
  4. 288 0
      js/discover.js
  5. 1 0
      js/qa-show.js
  6. 11 7
      js/userInforShow.js

+ 26 - 6
css/genindex.css

@ -284,7 +284,7 @@ ul.listitemdiv.listmorediv .companyhead .boxBlock{width: 164px;height: 110px;}
284 284
.rightconBox .conItem .form-result.form-M0{margin-top:0;}
285 285
.rightconBox .conItem .form-result>ul>li{padding:8px 20px}
286 286
.rightconBox .conItem.conItemFirst{padding:30px 20px;border-top:4px #ff9900 solid;}
287
ul.artAbout>li{clear:both;}
287
ul.artAbout>li{clear:both;position: relative;}
288 288
ul.artAbout>li:before,ul.artAbout>li:after{display:table;content:" "}
289 289
ul.artAbout>li:after{clear:both}
290 290
ul.artAbout .uploadFile{line-height:28px;text-align: center;font-size: 16px;color:#666666;}
@ -295,7 +295,7 @@ ul.artAbout .uploadFile .uploadtip{color:#999999}
295 295
ul.artAbout .uploadFile input.upInp[type="file"]{position:absolute;height: 46px;width:60%;bottom:30px;left:50%;margin-left:-30%;outline: none;opacity: 0;cursor: pointer;z-index:20;}
296 296
ul.artAbout .uploadFile .upbtn{display:inline-block;padding:7px 23px;background: #E5E5E5;color:#333333;margin-top:30px;}
297 297
ul.artAbout .uploadFile .uploadblock .upBackbtn{position:absolute;bottom:30px;left:50%;margin-left:-55px;background:rgba(0,0,0,.5);color:#FFFFFF;z-index:10;display: none;}
298
.conBlock .aboutTit{font-size:16px;line-height:40px;color:#666666;margin-top:18px;}
298
.aboutTit{font-size:16px;line-height:40px;color:#666666;margin-top:18px;}
299 299
ul.artAbout #filePicker{position:absolute;left:50%; bottom:22px; margin-left:-52px;opacity:0; z-index:88;}
300 300
ul.artAbout .frmadd{width:auto;position:absolute;right:0;top:0;background: #ff9900;color:#fff;border:none;padding:6px 25px; z-index:4;}
301 301
@ -327,7 +327,7 @@ ul.artAbout .frmadd{width:auto;position:absolute;right:0;top:0;background: #ff99
327 327
.conItem .otherBlock:last-child{padding:0;margin:0;border: 0;}
328 328
329 329
/*右侧新闻*/
330
.rightconBox .conItem.advertBox{min-height: 100px;padding:0;width:260px;background: none;}
330
.rightconBox .conItem.advertBox{padding:0;width:260px;background: none;}
331 331
332 332
.flexCenter{position: relative;width: 100%; min-height:90px;
333 333
		    display: -webkit-box;
@ -337,6 +337,8 @@ ul.artAbout .frmadd{width:auto;position:absolute;right:0;top:0;background: #ff99
337 337
	        -webkit-align-items: center;
338 338
	                align-items: center;}
339 339
/*.form-item .flexCenter{min-height: 60px;}*/
340
.madiaHead{width: 100px;height:100px;background-position: center;background-size: cover;margin:0 auto 10px}
341
.madiaHead.useHead{background-image: url(../images/default-photo.jpg);border-radius: 50%;}
340 342
.madiaInfo{width:100%;padding-left:0;}
341 343
.form-drop{position:relative;top:-1px;border:1px solid #E5E5E5;border-top:none;width: 100%;z-index: 0;}
342 344
.form-item input.frmcontype{position: relative;z-index: 2;}
@ -481,12 +483,16 @@ ul.tagList>li .h2Font{color:#666;font-size:14px;line-height:30px;}
481 483
.rightconBox .conItem.conItemG .h1Font{font-size:16px;}
482 484
.rightconBox .conItem.conItemG .h2Font{font-size:14px;color:#666;line-height:26px;}
483 485
.rightconBox .conItem.conItemG .h3Font>a{color:#333}
486
484 487
.goSpan span{background: #ff9900;display:inline-block;text-align: center;width:84px;cursor:pointer;color:#fff;font-size:15px;margin:20px 4px 0;border-radius:4px;padding:7px 16px;}
485 488
.goSpan .attenSpan{position: relative;padding-left:34px;background-image:url(../images/g_article_icon_jia_nor.png);background-size:12px 12px;background-position: 18px center;background-repeat: no-repeat;}
486 489
.goSpan .attenedSpan{background:#ccc;padding-left:16px;}
487 490
.goSpan .consultSpan{}
488 491
.goSpanTo{background: #ff9900;text-align: center;width:110px;cursor:pointer;color:#fff;font-size:16px;margin:20px 4px 0;border-radius:4px;padding:7px 16px;}
489
492
.rightconBox .conItem.privateInfo{padding:16px 20px;text-align: center;}
493
.unlogined{cursor:pointer;}
494
.privateInfo .goSpan span{margin:4px 0;width:49%;}
495
.goSpanLine span{border:1px solid #ff9900;display:inline-block;text-align: center;width:100%;cursor:pointer;color:#ff9900;font-size:15px;margin:4px 0;border-radius:4px;padding:7px 16px;}
490 496
/*文章列表*/
491 497
.itemListCon{background: #fff;}
492 498
.itemListBolck .searchAbout{position: relative;}
@ -527,6 +533,9 @@ ul.tagList>li .h2Font{color:#666;font-size:14px;line-height:30px;}
527 533
.pointSp:before{content:"";display: inline-block; width: 0; height: 0;border:2px #999 solid;margin: 2px 6px; border-radius:100%;}
528 534
*/
529 535
/*定时发送时间选择器*/
536
.blackcover{ width:100%; height:100%;top:0;overflow-x: hidden;overflow-y: auto; position:fixed; background:rgba(0,0,0,.6); z-index:1008; }
537
.workclose{ position:absolute; top:0; right:-50px; display:block; width:20px; height:20px; background:url(../images/workclose.png) center center no-repeat; padding:20px;cursor:pointer; z-index:999;}
538
530 539
.blackcover2{display:none;overflow-x: hidden;overflow-y:auto;position:fixed;top:0;right:0;bottom:0;left:0; background:rgba(0,0,0,.5);z-index: 1000;}
531 540
.modelContain{display:none;position:relative;clear:both;margin:40px auto;width:600px;background:#fff;border-radius:8px;z-index:1056; 
532 541
 		 box-shadow: 2px 4px 10px 4px #555;
@ -728,9 +737,10 @@ div.zoomMask{position:absolute;background:url("../images/g-resource-mask.png") r
728 737
.navconBox .moreNav .table-drop>li.liNow{color: #000;}
729 738
.navconBox .moreNav .moreNavUl .rightbtn .foldtr{right:24px;}
730 739
/*统计数据*/
740
.statisticsBox{overflow: hidden;margin:10px 0}
731 741
.statisticsBox.last_meg{height:150px;}
732
.statisticsBox span{font-size: 26px;color:#333}
733
.statisticsBox p{font-size: 13px;color:#999;margin-bottom:10px;}
742
.statisticsBox span{font-size: 26px;color:#333;line-height: 28px;}
743
.statisticsBox p{font-size: 14px;color:#999;margin-bottom:4px;}
734 744
.statisticsBox p>em{font-style: normal;}
735 745
.statisticsBox p>a{color: #FF9900;cursor: pointer;}
736 746
.statisticsBox .wayTel{font-size: 13px;font-weight: bold;color: #399A9B}
@ -965,3 +975,13 @@ div.zoomMask{position:absolute;background:url("../images/g-resource-mask.png") r
965 975
.request-qa .js-load-more:before{content:"查看更多用户";}
966 976
.request-qa .js-load-more.active:before{content:"加载中...";}
967 977
978
.queStep{padding:20px;}
979
.queStep .steptit{font-size: 18px;line-height:24px;}
980
.queStep .tipShow{margin-top:16px;border:none;line-height: 24px;}
981
.queStep .saveBtn .frmcontype{margin-right:0;margin-left:10px;margin-top:40px;float:right;}
982
.queStep .tips{font-size:13px;color:#999;margin-left: 10px;}
983
.queStep .artAbout>li>dl{height:150px}
984
.queStep .artAbout>li>dl>dd{width: 30.8%;height: 140px;}
985
.queStep ul.artAbout .uploadFile .uploadblock{padding:0;font-size:16px;line-height:22px;height: 140px;}
986
.queStep ul.artAbout .uploadFile .uploadtip{font-size:12px;line-height:18px;}
987

+ 1 - 1
css/popup.css

@ -11,7 +11,7 @@
11 11
.frmarea{ min-height:80px;}
12 12
.updownbtn{text-decoration:underline; color:#333;}
13 13

14
.blackcover{ width:100%; height:100%;overflow-x: hidden;overflow-y: auto; position:fixed; background:rgba(0,0,0,.6); z-index:1008; }
14
.blackcover{ width:100%; height:100%;top:0;overflow-x: hidden;overflow-y: auto; position:fixed; background:rgba(0,0,0,.6); z-index:1008; }
15 15
.resoufrm p{ font-size:14px;}
16 16
/*弹窗资源信息、申请信息*/
17 17
.resouinfo{position:absolute;background:#fff;min-width:750px;border-radius:10px;padding:30px 20px;font-size:14px;z-index:1009; margin-bottom:40px; box-shadow: 2px 4px 10px 4px #555; -webkit-box-shadow: 2px 4px 10px 4px #555; -moz-box-shadow: 2px 4px 10px 4px #555; }

+ 114 - 10
discover.html

@ -8,11 +8,94 @@
8 8
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" />
9 9
<link href="css/bootstrap.min.css" rel="stylesheet">
10 10
<link type="text/css" href="css/common.css" rel="stylesheet">
11
<link rel="stylesheet" type="text/css" href="./css/webuploader/webuploader.css">
11 12
<link type="text/css" href="css/genindex.css" rel="stylesheet">
12 13
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
13

14
<style type="text/css">
15
	ul.artAbout #filePicker{width:187px;height:140px;bottom:0;left:0;margin-left:0;cursor:pointer;}
16
</style>
14 17
</head>
15 18
<body>
19
<!--提问问题-->
20
<div class="blackcover questionCover displayNone">
21
	<div class="resAreaBox putquestion">
22
		<div class="queStep queStep01">
23
			<div class="steptit">提出您的问题(1/2)</div>
24
			<ul class="artAbout">
25
				<li>
26
					<div class="tipShow">
27
						为了营造良好的知识分享环境,所有提问将在审核通过后发布。<br>我们欢迎并鼓励您提出与科研、研发有关的提问。<br>
28
						在审核过程中,我们可能会对提问内容进行修改,包括但不限于错误、隐私、违法违规、广告不友善、政治敏感等内容。
29
					</div>
30
				</li>
31
				<li>
32
					<div class="aboutTit">问题标题<em class="requiredcon">*</em><span class="frmconmsg"></span></div>
33
				    <div class="msgContbox">
34
			    		<textarea class="msgCont" id="queTit" placeholder="请提出您的问题并以问号结尾"></textarea>
35
			    		<span class="msgconNum"><em>0</em>/50</span>
36
				    </div>
37
				</li>
38
				<li class="form-item">
39
					<div class="aboutTit">关键词<em class="requiredcon">*</em><span class="frmconmsg" id="keyPrompt"></span></div>
40
					<div class="col-w-12" style="position: relative;">
41
						<input type="text" class="frmcontype oinput" placeholder="如:腐蚀防护、石墨烯、纳米材料" data-pro="关键词不得超过15个字" data-num="5" data-fontsizen="15" id="KeyWord">
42
						<button type="button" class="frmcontype btnModel frmaddG addButton">添加</button>
43
						<div class="form-drop keydrop">
44
							<ul>
45
								
46
							</ul>
47
						</div>
48
					</div>
49
					<div class="form-result keyResult" style="margin-top: -10px;">
50
						<ul class="ulspace editUlist clearfix" id="keyWordlist">
51
							<!--<li>dd<div class="closeThis"></div></li>-->
52
						</ul>
53
					</div>	
54
				</li>
55
				<li class="saveBtn">
56
					<button type="button" class="frmcontype btnModel" id="nextSte">下一步</button>
57
				</li>
58
			</ul>
59
		</div>
60
		<div class="queStep queStep02 displayNone">
61
			<div class="steptit">提出您的问题(2/2)</div>
62
			<ul class="artAbout" style="">
63
				<li>
64
					<div class="aboutTit">问题描述<span class="frmconmsg"></span></div>
65
					<div class="msgContbox">
66
			    		<textarea class="msgCont" placeholder="添加描述和配图(选填)" id="queCnt"></textarea>
67
			    		<span class="msgconNum"><em>0</em>/500</span>
68
			    	</div>
69
				</li>
70
				<li>
71
					<div class="aboutTit">上传图片<span class="tips">如果图片可以更好的描述问题,请不要犹豫(最多3张)</span></div>
72
					<dl class="clearfix" id="fileList">
73
						<dd class="uploadD" id="uploadDd">
74
							<div class="uploadFile">
75
		        				<div class="uploadblock">
76
		        					<span class="" id="filePicker">上传图片</span>
77
		        					<!--未上传图片时-->
78
		        					<div class="upFront" style="top:34px;" id="uploader">
79
			        					<p>上传图片</p>
80
			        					<p class="uploadtip">JPG/JPEG/PNG格式<br/>大小2M以内</p>
81
		        					</div>
82
			            		</div>
83
		        			</div>
84
						</dd>
85
						<dd></dd>
86
						<dd></dd>
87
					</dl>
88
				</li>
89
				<li class="saveBtn">
90
					<button type="button" class="frmcontype btnModel" id="pubSte">发布</button>
91
					<button type="button" class="frmcontype btnModel btnCancel" id="preSte">上一步</button>
92
				</li>
93
			</ul>
94
		
95
		</div>
96
		<span class="workclose" id="workclose"></span>
97
	</div>
98
</div>
16 99
<header id="header">
17 100
	<script src="js/header.js"></script>
18 101
</header>
@ -80,19 +163,38 @@
80 163
			</div>
81 164
			<div class="rightconBox floatR">
82 165
				<div class="conItem advertBox advertItem advertItem-A"></div>
83
				<div class="conItem conItemG alignCenter">
84
					<div class="onlogin">
85
						<a href="/userInforShow.html?professorId=DKDHSKDLSIELSKJDL234567890111111" class="hrefgo">
86
							<div class="madiaHead useHead" id="Zimg"></div>
87
							<div class="proInfo h3Font clearfix">
88
								<a href="/userInforShow.html?professorId=DKDHSKDLSIELSKJDL234567890111111" class="h1Font hrefgo" id="Zname" dataid="DKDHSKDLSIELSKJDL234567890111111">胡为峰</a>
89
								<span class="authiconNew authicon-pro" title="科袖认证专家" id="ZauthFlag"></span>
166
				<div class="conItem privateInfo">
167
					<div class="onlogined displayNone">
168
						<div class="owener-info"></div>
169
						<div class="statisticsBox">
170
							<div class="col-w-4">
171
								<p>文章</p>
172
								<span id="myPubedArt">0</span>
173
							</div>
174
							<div class="col-w-4">
175
								<p>回答</p>
176
								<span id="myPubedAnswer">0</span>
177
							</div>
178
							<div class="col-w-4">
179
								<p>总获赞</p>
180
								<span id="agreeMecount">0</span>
90 181
							</div>
91
						</a>
182
						</div>
183
						<div class="goSpan">
184
							<span class="pubArt">写文章</span>
185
							<span class="pubQuestion">提问题</span>
186
						</div>
187
						<div class="goSpanLine">
188
							<span class="goarrow">我的关注与收藏</span>
189
						</div>
92 190
					</div>	
93
					<div class="unlogin">
191
					<div class="unlogined">
94 192
						<div class="madiaHead useHead"></div>
95 193
						<div class="h3Font">Hi,欢迎您<br>登录后可以和大家交流哦~</div>
194
						<div class="goSpan">
195
							<span>登录</span>
196
							<span>注册</span>
197
						</div>
96 198
					</div>	
97 199
				</div>
98 200
				<div class="conItem conBlock displayNone">
@ -120,7 +222,9 @@
120 222
<script type="text/javascript" src="js/jquery.cookie.js"></script>
121 223
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
122 224
<script type="text/javascript" src="js/jquery.page.js"></script>
225
<script type="text/javascript" src="./js/webuploader/webuploader.js"></script>
123 226
<script type="text/javascript" src="js/common.js"></script>
227
<script type="text/javascript" src="js/quickLogin.js"></script>
124 228
<script type="text/javascript" src="js/discover.js"></script>
125 229
<script type="text/javascript">
126 230
$(function () {	

+ 288 - 0
js/discover.js

@ -7,6 +7,234 @@ $(function() {
7 7
	var exculdeId2s;
8 8
	var rows="20",fTime,fId,QTime,QId;
9 9
	var sortColumn=["3","7","10","4","5","6","8"]//发现栏目显示顺序
10
	
11
	if(userid && userid != null && userid != "null") {
12
		$(".privateInfo .onlogined").removeClass("displayNone")
13
		$(".privateInfo .unlogined").addClass("displayNone")
14
		rightAllCon()
15
		$(".pubArt").on("click",function(){
16
			window.open('../articalIssue.html')
17
		})
18
		$(".pubQuestion").on("click",function(){
19
			$(".questionCover").fadeIn();
20
			$("body").css("position", "fixed");
21
		})
22
		$(".goarrow").on("click",function(){
23
			window.open('../userInforShow.html?professorId='+ userid +'&iLike=1')
24
		})
25
		$("#workclose").on("click",function(){
26
			$(".questionCover").fadeOut();
27
		    $("body").css("position", "");
28
		})
29
		hotKey(".oinput");
30
		//校验关键字
31
		$("#KeyWord").on({
32
			focus: function() {
33
				$("#keyPrompt").text("最多可添加5个关键词,每个关键词15字以内");
34
			},
35
			blur: function() {
36
				$("#keyPrompt").text("");
37
			}
38
		})
39
		$("#keyWordlist").on("click", ".closeThis", function() {
40
			$(this).parent().remove();
41
			var liNum = $("#keyWordlist").find("li").length;
42
			if(liNum < 5) {
43
				$("#keyWordlist").parents(".keyResult").siblings("div.col-w-12").show();
44
			}
45
		})
46
		limitObj("#queTit",50)
47
		$("#queTit").on({
48
			focus: function() {
49
				$(this).parents("li").find(".frmconmsg").text("提问不得少于5个字,不可超过50个字");
50
			},
51
			blur: function() {
52
				$(this).parents("li").find(".frmconmsg").text("");
53
			}
54
		})
55
		limitObj("#queCnt",500)
56
		$("#queCnt").on({
57
			focus: function() {
58
				$(this).parents("li").find(".frmconmsg").text("提问描述不可超过500个字");
59
			},
60
			blur: function() {
61
				$(this).parents("li").find(".frmconmsg").text("");
62
			}
63
		})
64
		
65
		var uploader = WebUploader.create({
66
			auto: true,
67
			fileNumLimit: 3,
68
			swf: '../js/webuploader/Uploader.swf',
69
			server: '../ajax/question/upload',
70
			fileSingleSizeLimit: 2 * 1024 * 1024,
71
			pick: {
72
				id: "#filePicker",
73
				multiple: false
74
			},
75
			accept: {
76
				title: 'Images',
77
				extensions: 'jpg,jpeg,png',
78
				mimeTypes: 'image/jpg,image/png'
79
			}
80
	
81
		});
82
	
83
		// 当有文件添加进来的时候
84
		uploader.on('fileQueued', function(file) {
85
			fileId = file.id;
86
			var $len = $("#fileList").find("img").length;
87
			if($len == 0 || $len == 1) {
88
				var oRemove = $("#fileList").find("dd");
89
				oRemove.eq(oRemove.length - 1).remove();
90
			} 
91
			var $li = $(
92
					'<dd>' +
93
						'<div class="imgItem" id="' + file.id + '">'+
94
							'<img />' +
95
						'</div>'+
96
					'</dd>'
97
				),
98
				$btns = $('<div class="file-panel">' +
99
					'<span class="cancel"></span>' +
100
					'</div>').appendTo($li),
101
				$img = $li.find('img');
102
			var $list = $("#fileList");
103
			if($len == 1) {
104
				$list.find("dd").eq(0).after($li)
105
			} else if($len == 2) {
106
				$list.find("dd").eq(1).after($li)
107
			} else {
108
				$list.prepend($li);
109
			}
110
	
111
			// 创建缩略图
112
			// 如果为非图片文件,可以不用调用此方法。
113
			// thumbnailWidth x thumbnailHeight 为 100 x 100
114
			uploader.makeThumb(file, function(error, src) {
115
				if(error) {
116
					$img.replaceWith('<span>不能预览</span>');
117
					return;
118
				}
119
				$img.attr('src', src);
120
			}, 1, 1);
121
		});
122
		uploader.onError = function(code) {
123
			console.log(code)
124
			$.MsgBox.Alert('提示', '请上传jpg、jpeg、png格式的图片,大小不超过2M')
125
		};
126
		uploader.on('uploadSuccess', function(file, data) {
127
			if(data.success) {
128
					uploader.removeFile(fileId);
129
					var cacheImageKey = temp.push(data.data[0].cacheKey);
130
			}else{
131
				$.MsgBox.Alert('提示', '只支持jpeg/jpg/png格式的图片');
132
			}
133
		});
134
		/*删除图片*/
135
		$("#fileList").on("click", ".cancel", function() {
136
			var flag=$(this).attr("flag");
137
			var oNum=$(this).parents("dd").index();
138
			if(flag==1) {
139
				array.splice(oNum,1);
140
			}else{
141
				temp.splice(oNum,1);
142
			}
143
			$(this).parent().parent().remove();
144
			
145
			var $len = $("#fileList").find("img").length;
146
			if($len != 2) {
147
				$("#fileList").append("<dd></dd>")
148
			}
149
			
150
		});
151
		//提问下一步
152
		$("#nextSte").on("click",function(){
153
			if($("#queTit").val().length>50) {
154
				$("#queTit").parents("li").find(".frmconmsg").text("提问不可超过50个字");
155
				$("#queTit").parent().css("border-color","#e03b43");
156
				return;
157
			}
158
			if($("#queTit").val().length<5 || $("#queTit").val().length==0) {
159
				$("#queTit").parents("li").find(".frmconmsg").text("提问不得少于5个字");
160
				$("#queTit").parent().css("border-color","#e03b43");
161
				return;
162
			}
163
			if($("#keyWordlist>li").length==0){
164
				$("#keyPrompt").text("请至少添加1个关键词");
165
				$("#KeyWord").css("border-color","#e03b43");
166
				return;
167
			}
168
			
169
			$(".queStep01").addClass("displayNone")
170
			$(".queStep02").removeClass("displayNone")
171

172
		})
173
		//提问上一步
174
		$("#preSte").on("click",function(){
175
			$(".queStep01").removeClass("displayNone")
176
			$(".queStep02").addClass("displayNone")
177
		})
178
		//提问发布
179
		$("#pubSte").on("click",function(){
180
			var title=$("#queTit").val();
181
			var cnt=$("#queCnt").val();
182
			var imgStr=[];
183
//			$(".imgU").each(function() {
184
//				imgStr.push(this.getAttribute("data-preview-src"));
185
//			});
186
			var subjects = $("#keyWordlist>li");
187
			var subjectAll = "";
188
			if(subjects.length > 0) {
189
				for(var i = 0; i < subjects.length; i++) {
190
					subjectAll += subjects[i].innerText.replace(/删除/, "");
191
					subjectAll += ',';
192
				};
193
				subjectAll = subjectAll.substring(0, subjectAll.length - 1);
194
			}
195
			console.log(cnt+"++++++"+imgStr);
196
			
197
			var dataSt={
198
					"title": title,
199
					"cnt": cnt,
200
					"img": imgStr.join(","),
201
					"keys": subjectAll,
202
					"uid": userid
203
				}
204
			$.ajax({
205
				url:'/ajax/question', 
206
				data: dataSt,
207
				dataType: 'json',
208
				traditional: true,
209
				type: 'POST', 
210
				success: function(data) {
211
					if(data.success) {
212
						console.log(data)
213
						$(".questionCover").fadeOut();
214
						$("body").css("position", "");
215
						$(".queStep").find("textarea").val("")
216
						$(".queStep").find("input").val("")
217
						$(".queStep01").removeClass("displayNone")
218
						$(".queStep02").addClass("displayNone")
219
						$.MsgBox.Alert("提示","问题发布成功");
220
						$("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
221
						
222
					}
223
				}
224
			});
225
			
226
		})
227
	}else{
228
		$(".privateInfo .unlogined").removeClass("displayNone")
229
		$(".privateInfo .onlogined").addClass("displayNone")
230
		$(".unlogined").on("click",function(){
231
			quickLog();
232
			operatTab();
233
			closeLog();
234
		})
235
	}
236
	
237
	
10 238
	//轮播加载页面
11 239
	$.ajax({
12 240
		"url":"/data/inc/col_banner.html",
@ -656,4 +884,64 @@ $(function() {
656 884
			}
657 885
		});
658 886
	}
887
	
888
	function rightAllCon(){
889
		$.ajax({
890
			type:"get",
891
			url:"/ajax/professor/editBaseInfo/"+userid,
892
			success:function(data){
893
				if(data.success){
894
					var dataStr=data.data
895
					var userType = autho(dataStr.authType, dataStr.orgAuth, dataStr.authStatus);
896
					var baImg = "../images/default-photo.jpg";
897
					if(dataStr.hasHeadImage == 1) {
898
						baImg = "/images/head/" + dataStr.id + "_l.jpg";
899
					}
900
					var str='<div class="madiaHead useHead" style="background-image:url('+baImg+')"></div>'+
901
							'<div class="h2Font">'+dataStr.name+'<span class="authiconNew ' + userType.sty + '" title="' + userType.title + '"></span></div>'
902
					$(".onlogined .owener-info").html(str)
903
				}
904
			}
905
		});
906
		$.ajax({
907
			url: "/ajax/article/pqProPublish",
908
			dataType: 'json',
909
			type: 'GET', 
910
			data: {
911
				"professorId": userid,
912
			},
913
			success:function(data){
914
				if(data.success){
915
					$("#myPubedArt").html(data.data.total)
916
				}
917
			}
918
		});
919
		$.ajax({//回答数
920
			type:"get",
921
			url:"/ajax/question/answer/count",
922
			data: {
923
				uid: userid
924
			},
925
			async:true,
926
			success:function(data){
927
				if(data.success){
928
					$("#myPubedAnswer").html(data.data)
929
				}
930
			}
931
		});
932
		$.ajax({//总获赞
933
			type:"get",
934
			url:"/ajax/professor/agree/sum",
935
			data: {
936
				id: userid,
937
			},
938
			async:true,
939
			success:function(data){
940
				if(data.success){
941
					$("#agreeMecount").html(data.data)
942
				}
943
			}
944
		});
945
	}
946
	
659 947
})

+ 1 - 0
js/qa-show.js

@ -1,5 +1,6 @@
1 1
$(function() {
2 2
	loginStatus();//判断个人是否登录
3
	$("#feedback").hide();
3 4
	var userid = $.cookie("userid"),
4 5
		username = $.cookie("userName")
5 6
	var questionId = GetQueryString("id"),

+ 11 - 7
js/userInforShow.js

@ -3,9 +3,11 @@ $(function() {
3 3
	var userid = $.cookie("userid");
4 4
	var professorId = GetQueryString("professorId");
5 5
	if(GetQueryString("flag")) {
6
		
7 6
		researchAlert(GetQueryString("flag"))
8 7
	}
8
	if(GetQueryString("iLike")){
9
		openAttend();
10
	}
9 11
	function researchAlert(cap){
10 12
			$.ajax({
11 13
				url: "/ajax/researchAreaLog/ql",
@ -138,11 +140,7 @@ $(function() {
138 140
		})
139 141
		
140 142
		$("#myAttends").on("click",function(){
141
			$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
142
			$(".navconBox .moreBu").show();
143
			$("#item8user").show().siblings().hide();
144
			$(".moreBuUl li.attentType").eq(0).addClass("liNow").siblings().removeClass("liNow");
145
			$("#item8user>.coninfobox").eq(0).show().siblings().hide();
143
			openAttend()
146 144
		})
147 145
		$("#attendmyGo").on("click",function(){
148 146
			$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
@ -323,7 +321,13 @@ $(function() {
323 321
			}
324 322
        })
325 323
	}
326
	
324
	function openAttend(){//打开收藏与关注
325
		$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
326
		$(".navconBox .moreBu").show();
327
		$("#item8user").show().siblings().hide();
328
		$(".moreBuUl li.attentType").eq(0).addClass("liNow").siblings().removeClass("liNow");
329
		$("#item8user>.coninfobox").eq(0).show().siblings().hide();
330
	}
327 331
	function attentCount(){
328 332
		$.ajax({//我关注的
329 333
			type:"get",