浏览代码

去掉需求身份判定

luyanan 7 年之前
父节点
当前提交
958278bae8
共有 6 个文件被更改,包括 133 次插入133 次删除
  1. 26 26
      js/articalList.js
  2. 25 25
      js/paperList.js
  3. 25 25
      js/patentList.js
  4. 25 25
      js/resourceList.js
  5. 31 31
      js/workindex.js
  6. 1 1
      workspaces.html

+ 26 - 26
js/articalList.js

@ -29,32 +29,32 @@ $(function() {
29 29
	$(".searchSpan").on("click", function() {
30 30
		articalList(10, 1, true, 2);
31 31
	})
32
	getProfessorData(userid);
33
	function getProfessorData(professorId) {
34
		$.ajax({
35
			"url": "/ajax/professor/editBaseInfo/" + professorId,
36
			"type": "get",
37
			"async": true,
38
			"success": function(data) {
39
				if(data.success) {
40
					var oAuthType=data.data.authType;
41
					if(oAuthType==0){
42
						$("a:contains('需求')").attr("href","myDemand.html");
43
					}else if(oAuthType==1){
44
						$("a:contains('需求')").attr("href","needList.html");
45
					}
46
					
47
					
48
				} else {
49
					$.MsgBox.Alert("消息", "服务器连接失败");
50
				}
51
			},
52
			"error": function() {
53
				$.MsgBox.Alert('message', '服务器连接失败');
54
			}
55
		})
56
	}
57

32
//	getProfessorData(userid);
33
//	function getProfessorData(professorId) {
34
//		$.ajax({
35
//			"url": "/ajax/professor/editBaseInfo/" + professorId,
36
//			"type": "get",
37
//			"async": true,
38
//			"success": function(data) {
39
//				if(data.success) {
40
//					var oAuthType=data.data.authType;
41
//					if(oAuthType==0){
42
//						$("a:contains('需求')").attr("href","myDemand.html");
43
//					}else if(oAuthType==1){
44
//						$("a:contains('需求')").attr("href","needList.html");
45
//					}
46
//					
47
//					
48
//				} else {
49
//					$.MsgBox.Alert("消息", "服务器连接失败");
50
//				}
51
//			},
52
//			"error": function() {
53
//				$.MsgBox.Alert('message', '服务器连接失败');
54
//			}
55
//		})
56
//	}
57
//
58 58
});
59 59

60 60
function articalList(pageSize, pageNo, isbind, num) {

+ 25 - 25
js/paperList.js

@ -182,29 +182,29 @@ function lewordNum(pId) {
182 182
		$(".aboutRes").append('<div class="tcdPageCode"></div>');
183 183
		getPaperMe(1,true);
184 184
	})
185
	getProfessorData(userid);
186
	function getProfessorData(professorId) {
187
		$.ajax({
188
			"url": "/ajax/professor/editBaseInfo/" + professorId,
189
			"type": "get",
190
			"async": true,
191
			"success": function(data) {
192
				if(data.success) {
193
					var oAuthType=data.data.authType;
194
					if(oAuthType==0){
195
						$("a:contains('需求')").attr("href","myDemand.html");
196
					}else if(oAuthType==1){
197
						$("a:contains('需求')").attr("href","needList.html");
198
					}
199
					
200
					
201
				} else {
202
					$.MsgBox.Alert("提示", "服务器连接失败");
203
				}
204
			},
205
			"error": function() {
206
				$.MsgBox.Alert('提示', '服务器连接失败');
207
			}
208
		})
209
	}
185
//	getProfessorData(userid);
186
//	function getProfessorData(professorId) {
187
//		$.ajax({
188
//			"url": "/ajax/professor/editBaseInfo/" + professorId,
189
//			"type": "get",
190
//			"async": true,
191
//			"success": function(data) {
192
//				if(data.success) {
193
//					var oAuthType=data.data.authType;
194
//					if(oAuthType==0){
195
//						$("a:contains('需求')").attr("href","myDemand.html");
196
//					}else if(oAuthType==1){
197
//						$("a:contains('需求')").attr("href","needList.html");
198
//					}
199
//					
200
//					
201
//				} else {
202
//					$.MsgBox.Alert("提示", "服务器连接失败");
203
//				}
204
//			},
205
//			"error": function() {
206
//				$.MsgBox.Alert('提示', '服务器连接失败');
207
//			}
208
//		})
209
//	}
210 210
})

+ 25 - 25
js/patentList.js

@ -181,29 +181,29 @@ function lewordNum(pId) {
181 181
		$(".aboutRes").append('<div class="tcdPageCode"></div>');
182 182
		getPatentMe(1,true);
183 183
	})
184
	getProfessorData(userid);
185
	function getProfessorData(professorId) {
186
		$.ajax({
187
			"url": "/ajax/professor/editBaseInfo/" + professorId,
188
			"type": "get",
189
			"async": true,
190
			"success": function(data) {
191
				if(data.success) {
192
					var oAuthType=data.data.authType;
193
					if(oAuthType==0){
194
						$("a:contains('需求')").attr("href","myDemand.html");
195
					}else if(oAuthType==1){
196
						$("a:contains('需求')").attr("href","needList.html");
197
					}
198
					
199
					
200
				} else {
201
					$.MsgBox.Alert("提示", "服务器连接失败");
202
				}
203
			},
204
			"error": function() {
205
				$.MsgBox.Alert('提示', '服务器连接失败');
206
			}
207
		})
208
	}
184
//	getProfessorData(userid);
185
//	function getProfessorData(professorId) {
186
//		$.ajax({
187
//			"url": "/ajax/professor/editBaseInfo/" + professorId,
188
//			"type": "get",
189
//			"async": true,
190
//			"success": function(data) {
191
//				if(data.success) {
192
//					var oAuthType=data.data.authType;
193
//					if(oAuthType==0){
194
//						$("a:contains('需求')").attr("href","myDemand.html");
195
//					}else if(oAuthType==1){
196
//						$("a:contains('需求')").attr("href","needList.html");
197
//					}
198
//					
199
//					
200
//				} else {
201
//					$.MsgBox.Alert("提示", "服务器连接失败");
202
//				}
203
//			},
204
//			"error": function() {
205
//				$.MsgBox.Alert('提示', '服务器连接失败');
206
//			}
207
//		})
208
//	}
209 209
})

+ 25 - 25
js/resourceList.js

@ -134,29 +134,29 @@ $(document).ready(function(){
134 134
		$(".aboutRes").append('<div class="tcdPageCode"></div>');
135 135
		getRecourceMe(1,true);
136 136
	})
137
	getProfessorData(userid);
138
	function getProfessorData(professorId) {
139
		$.ajax({
140
			"url": "/ajax/professor/editBaseInfo/" + professorId,
141
			"type": "get",
142
			"async": true,
143
			"success": function(data) {
144
				if(data.success) {
145
					var oAuthType=data.data.authType;
146
					if(oAuthType==0){
147
						$("a:contains('需求')").attr("href","myDemand.html");
148
					}else if(oAuthType==1){
149
						$("a:contains('需求')").attr("href","needList.html");
150
					}
151
					
152
					
153
				} else {
154
					$.MsgBox.Alert("消息", "服务器连接失败");
155
				}
156
			},
157
			"error": function() {
158
				$.MsgBox.Alert('message', '服务器连接失败');
159
			}
160
		})
161
	}
137
//	getProfessorData(userid);
138
//	function getProfessorData(professorId) {
139
//		$.ajax({
140
//			"url": "/ajax/professor/editBaseInfo/" + professorId,
141
//			"type": "get",
142
//			"async": true,
143
//			"success": function(data) {
144
//				if(data.success) {
145
//					var oAuthType=data.data.authType;
146
//					if(oAuthType==0){
147
//						$("a:contains('需求')").attr("href","myDemand.html");
148
//					}else if(oAuthType==1){
149
//						$("a:contains('需求')").attr("href","needList.html");
150
//					}
151
//					
152
//					
153
//				} else {
154
//					$.MsgBox.Alert("消息", "服务器连接失败");
155
//				}
156
//			},
157
//			"error": function() {
158
//				$.MsgBox.Alert('message', '服务器连接失败');
159
//			}
160
//		})
161
//	}
162 162
})

+ 31 - 31
js/workindex.js

@ -50,13 +50,13 @@ $(function() {
50 50
			"success": function(data) {
51 51
				if(data.success) {
52 52
					oAuthType=data.data.authType;
53
					if(oAuthType==0){
53
//					if(oAuthType==0){
54 54
						$("#ponUm").text("个我正在发布的需求");
55 55
						$("#searchDemand").text(">>点击查看");
56 56
						demandNumMy(); 
57
					}else if(oAuthType==1){
58
						demandNum();
59
					}
57
//					}else if(oAuthType==1){
58
//						demandNum();
59
//					}
60 60
					$("#nameS").text(data.data.name);
61 61
					$("#allConsultCount").text(data.data.consultCount);
62 62
					
@ -374,14 +374,14 @@ $(function() {
374 374
//			}
375 375
//		});
376 376
//	}
377
	$("#dett,#searchDemand").click(function(){
378
		
379
		if(oAuthType==0){
380
			location.href="myDemand.html"
381
		}else if(oAuthType==1){
382
			location.href="needList.html"
383
		}
384
	})
377
//	$("#dett,#searchDemand").click(function(){
378
//		
379
//		if(oAuthType==0){
380
//			location.href="myDemand.html"
381
//		}else if(oAuthType==1){
382
//			location.href="needList.html"
383
//		}
384
//	})
385 385
	/*登录者需求的数量*/
386 386
	function demandNumMy(){
387 387
		$.ajax({
@ -389,7 +389,7 @@ $(function() {
389 389
			"type": "get",
390 390
			"async": true,
391 391
			"data":{
392
//				"state":1,
392
				"state":1,
393 393
				"uid": userid
394 394
			},
395 395
			"success": function(data) {
@ -404,22 +404,22 @@ $(function() {
404 404
			}
405 405
		});
406 406
	}
407
	function demandNum(){
408
		$.ajax({
409
			"url":"/ajax/demand/qc" ,
410
			"type": "get",
411
			"async": true,
412
			"success": function(data) {
413
				
414
				if(data.success) {
415
					$("#demandNumber").text(data.data)
416
				} else {
417
					$.MsgBox.Alert('消息', data.msg);
418
				}
419
			},
420
			"error": function() {
421
				$.MsgBox.Alert('消息', '链接服务器超时!')
422
			}
423
		});
424
	}
407
//	function demandNum(){
408
//		$.ajax({
409
//			"url":"/ajax/demand/qc" ,
410
//			"type": "get",
411
//			"async": true,
412
//			"success": function(data) {
413
//				
414
//				if(data.success) {
415
//					$("#demandNumber").text(data.data)
416
//				} else {
417
//					$.MsgBox.Alert('消息', data.msg);
418
//				}
419
//			},
420
//			"error": function() {
421
//				$.MsgBox.Alert('消息', '链接服务器超时!')
422
//			}
423
//		});
424
//	}
425 425
});

+ 1 - 1
workspaces.html

@ -162,7 +162,7 @@
162 162
										<a class="worklinkbtn" id="lookMyConsult">>>点击查看</a>
163 163
									</div>
164 164
									<div class="workcount floatL">
165
										<p><span class="workcountnum" id="demandNumber">0</span><span id="ponUm">个发布中的需求</span></p>
165
										<p><span class="workcountnum" id="demandNumber"></span><span id="ponUm">个发布中的需求</span></p>
166 166
										<a class="worklinkbtn" id="searchDemand">>>点击搜索</a>
167 167
									</div>
168 168
									<!--<div class="workcount floatL">