Browse Source

工作台需求数量

jack 8 years ago
parent
commit
78c5980c70
2 changed files with 24 additions and 4 deletions
  1. 23 3
      js/workindex.js
  2. 1 1
      workspaces.html

+ 23 - 3
js/workindex.js

@ -45,10 +45,8 @@ $(function() {
45 45
			"type": "get",
46 46
			"async": true,
47 47
			"success": function(data) {
48
				console.log(data.data);
49 48
				if(data.success) {
50 49
					oAuthType=data.data.authType;
51
					console.log(oAuthType)
52 50
					$("#nameS").text(data.data.name);
53 51
					$("#allConsultCount").text(data.data.consultCount);
54 52
					if(data.data.authType) {
@ -346,7 +344,6 @@ $(function() {
346 344
				"professorId": userid
347 345
			},
348 346
			"success": function(data) {
349
				console.log(data);
350 347
				if(data.success) {
351 348
352 349
					var add = '';
@ -384,4 +381,27 @@ $(function() {
384 381
			location.href="needList.html"
385 382
		}
386 383
	})
384
	/*登录者需求的数量*/
385
	function demandNum(){
386
		$.ajax({
387
			"url": "/ajax/demand/queryPublish",
388
			"type": "get",
389
			"async": true,
390
			"data": {
391
				"demander": userid
392
			},
393
			"success": function(data) {
394
				
395
				if(data.success) {
396
					$("#demandNumber").text(data.data)
397
				} else {
398
					$.MsgBox.Alert('消息', "链接服务器超时!");
399
				}
400
			},
401
			"error": function() {
402
				$.MsgBox.Alert('消息', '链接服务器超时!')
403
			}
404
		});
405
	}
406
	demandNum()
387 407
});

+ 1 - 1
workspaces.html

@ -114,7 +114,7 @@
114 114
										<a class="worklinkbtn" id="lookMyConsult">>>点击查看</a>
115 115
									</div>
116 116
									<div class="workcount floatL">
117
										<p><span class="workcountnum">0</span>个发布中的需求</p>
117
										<p><span class="workcountnum" id="demandNumber">0</span>个发布中的需求</p>
118 118
										<a href="myDemand.html" class="worklinkbtn">>>点击搜索</a>
119 119
									</div>
120 120
									<!--<div class="workcount floatL">