LIPENGTAO1313 6 years ago
parent
commit
60832993af
6 changed files with 22 additions and 90 deletions
  1. 0 1
      cmp-portal/js/cmp-needList.js
  2. 3 1
      js/cmpInforShow.js
  3. 4 62
      js/myDemand.js
  4. 3 24
      js/needList.js
  5. 8 1
      js/postDemand.js
  6. 4 1
      js/userInforShow.js

+ 0 - 1
cmp-portal/js/cmp-needList.js

@ -67,7 +67,6 @@ $(document).ready(function() {
67 67
			data: {
68 68
				"state":[1],
69 69
    			'oname':$.cookie('orgName'),
70
				"uid":id,
71 70
				"pageNo": pageNo,
72 71
				"pageSize": pageSize
73 72
			},

+ 3 - 1
js/cmpInforShow.js

@ -223,7 +223,6 @@ $(function() {
223 223
			oAjax("/ajax/demand/pq",{
224 224
				"state":[1],
225 225
    			'oname':par,
226
				"uid":orgId,
227 226
				"pageSize":5
228 227
			}, "get", function(data){
229 228
				var $info = data.data.data;
@ -420,6 +419,9 @@ $(function() {
420 419
								hasImg="/data/ware" + subs[0]
421 420
							}
422 421
						}
422
						if($info[i].cnt) {
423
							cnt = "内容:" +$info[i].cnt; 
424
						}
423 425
						var itemlist = '<li>';
424 426
							itemlist += '<a href="sevriceShow.html?sevriceId=' + $info[i].id + '" class="flexCenter urlgo">';
425 427
							itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';

+ 4 - 62
js/myDemand.js

@ -32,68 +32,8 @@ $(document).ready(function() {
32 32
		}
33 33
	})
34 34
	$(".issueSpanBlock").on("click",".issueSpan",function(){
35
		var $status=["0","1"];
36
		$.ajax({//查询是否有发布中和已过期的需求
37
			url:"/ajax/demand/qc",
38
			type:"get",
39
			data:{
40
				state:$status,
41
				uid:userid
42
			},
43
			async:true,
44
			datatype:"json",
45
			traditional: true,
46
			success:function(data){
47
				console.log(data)
48
				var statusN=data.data;
49
				if(statusN!=0){
50
					window.open("postDemand.html");
51
				}else{
52
					$(".blackcover2").fadeIn();
53
					var btnOk='<input class="mb_btn mb_btnOk mb_btnOkpub" type="button" disabled value="确定">'
54
					$(".modelContain").show(); $("body").addClass("modelOpen");
55
					$(".mb-listL").remove();$("#promotTh").prepend(sureOrg);
56
					$(".mb_btnOk").remove(); $("#promotGt").prepend(btnOk);
57
					
58
					$.ajax({
59
						"url": "/ajax/professor/editBaseInfo/" + userid,
60
						"type": "get",
61
						"async": true,
62
						"datatype":"json",
63
						"success": function(data) {
64
							if(data.success && data.data) {
65
								if(data.data.orgName!=""){
66
									$(".setTimeBlock .sureOrg").val(data.data.orgName);
67
									$("#oldName").val(data.data.orgName);
68
								}
69
								if($(".setTimeBlock .sureOrg").val().length>0){
70
									$(".setTimeBlock").find(".mb_btnOkpub").removeAttr("disabled");
71
								}
72
							}
73
						}
74
					});
75
					
76
					$(".mb_btnOkpub").on("click", function() {
77
						$(".blackcover2").fadeOut();
78
						$(".modelContain").hide();
79
						$("body").removeClass("modelOpen");
80
						var newName=$(".setTimeBlock .sureOrg").val();
81
						if(newName.length<50){
82
							if(newName == $("#oldName").val()){
83
								location.href="postDemand.html";
84
							}else{
85
								updateOrgName(newName);
86
							}
87
						}else{
88
							$.MsgBox.Alert("提示", "机构名称不得超过50个字");
89
						}
90
						
91
					})
92
				}
93
			}
94
		});
95
		
96
	})
35
		window.open("postDemand.html");
36
	});
97 37
	
98 38
	$("#myneedList").on("click",".delayThis",function(){//延期
99 39
		var dataId=$(this).parents("li").find(".urlHref").attr("data-id");
@ -172,7 +112,9 @@ $(document).ready(function() {
172 112
			type: "GET",
173 113
			timeout: 10000,
174 114
			dataType: "json",
115
			traditional:true,
175 116
			data: {
117
				"state": [0,1,2,3],
176 118
				"uid": userid,
177 119
				"pageNo": page,
178 120
				"pageSize": pageNum

+ 3 - 24
js/needList.js

@ -20,7 +20,7 @@ $(document).ready(function() {
20 20
			dataType: "json",
21 21
			traditional:true,
22 22
			data: {
23
				"state":"1",
23
				"state":[1],
24 24
				"key":$("#needKey").val(),
25 25
				"pageNo": pageNo,
26 26
				"pageSize":pageSize
@ -37,7 +37,6 @@ $(document).ready(function() {
37 37
						for(var i = 0; i < $info.length; i++) {
38 38
							var liStr=$("<li></li>").appendTo("#demandList");
39 39
							demandHtml($info[i],liStr);
40
							cmpFun($info[i].orgId,liStr);
41 40
						}
42 41
						if(isbind == true) {
43 42
							$(".tcdPageCode").createPage({
@ -68,7 +67,7 @@ $(document).ready(function() {
68 67
			strCon+='<a class="" target="_blank" href="demandShow.html?demandId='+$data.id+'" class="madiaInfo">'
69 68
			strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>'
70 69
			strCon+='<ul class="showliTop h3Font clearfix">'
71
			strCon+='<li><span class="cmpName"></span></li><li><span>发布于 '+TimeTr($data.createTime)+'</span></li>'
70
			strCon+='<li><span class="cmpName">'+ $data.orgName +'</span></li><li><span>发布于 '+TimeTr($data.createTime)+'</span></li>'
72 71
			strCon+= sowU
73 72
			strCon+='</ul>'
74 73
			strCon+='<p class="h2Font ellipsisSty-2">'+$data.descp+'</p>'
@ -82,25 +81,5 @@ $(document).ready(function() {
82 81
			strCon+='</ul>'
83 82
			strCon+='</a>'
84 83
		$(strCon).appendTo(liStr);	
85
	}
86
	/*企业用户信息*/
87
	function cmpFun(id,$listItem) {
88
		$.ajax({
89
			"url": "/ajax/org/" + id,
90
			"type": "get",
91
			"async": true,
92
			"success": function(data) {
93
				if(data.success && data.data) {
94
					if(data.data.forShort) {
95
						$listItem.find(".cmpName").text(data.data.forShort);
96
					}else{
97
						$listItem.find(".cmpName").text(data.data.name);
98
					}
99
				}
100
			},
101
			"error": function() {
102
				$.MsgBox.Alert('提示', '链接服务器超时')
103
			}
104
		});
105 84
	}
106
})
85
});

+ 8 - 1
js/postDemand.js

@ -155,7 +155,7 @@ $(document).ready(function() {
155 155

156 156
	function personMess() {
157 157
		$.ajax({
158
			"url": "/ajax/professor/baseInfo/" + userid,
158
			"url": "/ajax/professor/editInfo/" + userid,
159 159
			"type": "GET",
160 160
			"traditional": true,
161 161
			"dataType": "json",
@ -185,6 +185,13 @@ $(document).ready(function() {
185 185
					$("#budget").css("color", "#999");
186 186
					if($data.phone) {
187 187
						$('#phone').val($data.phone)
188
					} else {
189
						 if($.cookie('userMobilePhone')) {
190
						 	$("#phone").val($.cookie('userMobilePhone'));
191
						 } else {
192
						 	$("#phone").val('');
193
						 }
194
						
188 195
					}
189 196
					if($data.orgName) {
190 197
						$('#org').val($data.orgName);

+ 4 - 1
js/userInforShow.js

@ -631,7 +631,10 @@ $(function() {
631 631
					dataO.serModifyTime = $info[$info.length - 1].modifyTime;
632 632
			
633 633
					for(var i = 0; i < $info.length; i++) {
634
						var cnt="", hasImg="../images/default-service.jpg"
634
						var cnt="", hasImg="../images/default-service.jpg";
635
						if($info[i].cnt) {
636
							cnt = "内容:" + $info[i].cnt
637
						}
635 638
						if($info[i].images) {
636 639
							var subs = strToAry($info[i].images)
637 640
							if(subs.length > 0) {