jack 8 years ago
parent
commit
014614d9ab

+ 15 - 11
cmp-portal/js/cmp-updateinfo.js

@ -65,9 +65,11 @@ $(document).ready(function() {
65 65
							case '5':
66 66
								$("#qualificationList").find("li").eq(4).addClass("cmpBg listactive")
67 67
								break;
68
							default:
68
							case '6':
69 69
								$("#qualificationList").find("li").eq(5).addClass("cmpBg listactive")
70 70
								break;
71
							default:
72
								break;
71 73
						}
72 74
					}
73 75
					if($data.orgType) {
@ -88,9 +90,11 @@ $(document).ready(function() {
88 90
							case '6':
89 91
								$("#orgType").find("li").eq(4).addClass("cmpBg listactive")
90 92
								break;
91
							default:
93
							case '7':
92 94
								$("#orgType").find("li").eq(5).addClass("cmpBg listactive")
93 95
								break;
96
							default:
97
								break;
94 98
						}
95 99
					}
96 100
					if($data.industry) {
@ -193,7 +197,7 @@ $(document).ready(function() {
193 197
		})
194 198
		/*保存*/
195 199
	$("button:contains('保存')").click(function() {
196
			var oBusinessAbbreviation = $("#businessAbbreviation").val().trim();
200
			/*var oBusinessAbbreviation = $("#businessAbbreviation").val().trim();
197 201
			var oTextArea = $("textarea").val().trim();
198 202
			var oBusinessType = $("#orgType").find("li.cmpBg.listactive").length;
199 203
			var oBusinessDimensions = $("#qualificationList").find("li.cmpBg.listactive").length;
@ -231,9 +235,7 @@ $(document).ready(function() {
231 235
			if(oEditUlistCNumber == 0) {
232 236
				$.MsgBox.Alert('提示', '企业资质必填一项');
233 237
				return;
234
			}
235
			/*					
236
			fn: 企业logo上传临时文件名 NULL 字符串*/
238
			}*/
237 239
			var tex = $("#orgType").find("li.cmpBg.listactive").text();
238 240
			var oTextGui = $("#qualificationList").find("li.cmpBg.listactive").text();
239 241
			var $info = {};
@ -258,9 +260,11 @@ $(document).ready(function() {
258 260
				case '外资企业':
259 261
					$info.orgType = 6;
260 262
					break;
261
				default:
263
				case '初创企业':
262 264
					$info.orgType = 7;
263 265
					break;
266
				default:
267
					break;
264 268
			}
265 269
			switch(oTextGui) {
266 270
				case '50人以内':
@ -278,9 +282,11 @@ $(document).ready(function() {
278 282
				case '500-1000人':
279 283
					$info.orgSize = 5;
280 284
					break;
281
				default:
285
				case '1000人以上':
282 286
					$info.orgSize = 6;
283 287
					break;
288
				default:
289
					break;
284 290
			}
285 291
			if($("#inteAddress").val().trim()) {
286 292
				$info.orgUrl = $("#inteAddress").val();
@ -376,9 +382,7 @@ $(document).ready(function() {
376 382
	});
377 383
	/*取消*/
378 384
	$("#Ocancel").click(function() {
379
			fileId = null;
380
			cacheImageKey = null;
381
			companyInformation();
385
			location.href="cmp-workspaces.html"
382 386
		})
383 387
		/*选择城市*/
384 388
		/*选择城市填充js	*/

+ 10 - 2
cmp-portal/js/cmp-workspaces.js

@ -52,10 +52,14 @@ $(document).ready(function() {
52 52
							case '6':
53 53
								otext = "外资企业";
54 54
								break;
55
							default:
55
							case '7':
56 56
								otext = "初创企业";
57 57
								break;
58
							default:
59
								otext = "";
60
								break;
58 61
						}
62
						if(otext != "")
59 63
						$("#cmpBasic").append("<span>" + otext + "</span>")
60 64
					}
61 65
					if($data.orgSize) {
@ -75,10 +79,14 @@ $(document).ready(function() {
75 79
							case '5':
76 80
								oguimo = "500-1000人";
77 81
								break;
82
							case '6':
83
								oguimo = "500-1000人";
84
								break;
78 85
							default:
79
								oguimo = "1000人以上";
86
								oguimo = "";
80 87
								break;
81 88
						}
89
						if(oguimo!="")
82 90
						$("#cmpBasic").append("<span>" + oguimo + "</span>")
83 91
					}
84 92
					if($data.foundTime) {

+ 15 - 3
cmp-portal/js/companybrowinfor.js

@ -96,9 +96,11 @@ $(document).ready(function() {
96 96
							case '5':
97 97
								$("#qualificationList").text("500-1000人")
98 98
								break;
99
							default:
99
							case '6':
100 100
								$("#qualificationList").text("1000人以上")
101 101
								break;
102
							default:
103
								break;
102 104
						}
103 105
					} else {
104 106
						$("#qualificationList").remove();
@ -120,10 +122,14 @@ $(document).ready(function() {
120 122
							case '6':
121 123
								$("#orgType").text("外资企业");
122 124
								break;
123
							default:
125
							case '7':
124 126
								$("#orgType").text("初创企业");
125 127
								break;
128
							default:
129
								break;
126 130
						}
131
					}else{
132
						$("#orgType").remove();
127 133
					}
128 134
					if($data.industry) {
129 135
						indu($data.industry, '#industryShow')
@ -225,7 +231,7 @@ $(document).ready(function() {
225 231
			}
226 232
			var oString = '<dd>'
227 233
			oString += '<div class="staffChild">'
228
			oString += '<img class="headRadius" src="' + img + '" width="100%" />'
234
			oString += '<img class="headRadius" src="' + img + '" width="100%" data-id="'+arr[i].id+'" style="cursor:pointer"/>'
229 235
			oString += '</div><div class="h4Font"><span>' + arr[i].name + '</span></div>'
230 236
			oString += '<div class="h4Font">' + tiof + '</div></dd>'
231 237
			$("#userList").append(oString);
@ -270,5 +276,11 @@ $(document).ready(function() {
270 276
		error: function() {
271 277
			return;
272 278
		}
279
	});
280
	/*点击企业员工头像跳转个人浏览页面*/
281
	$("#userList").on("click","img",function(){
282
		var dataId=$(this).attr("data-id");
283
		console.log(dataId)
284
		location.href="information-brow.html?professorId="+dataId;
273 285
	})
274 286
})

+ 8 - 1
cmp-portal/js/public/cmpFooter.js

@ -11,7 +11,7 @@ footerHtml += '<div class="container-fulid">'+
11 11
								'<p>' +
12 12
									'<a class="listlink" href="javascript:void(0);" target="_blank" rel="nofollow">关于我们</a>' +
13 13
									'<a class="listlink" href="javascript:void(0);"  rel="nofollow" id="cmpSet">企业入驻</a>' +
14
									'<a class="listlink" href="javascript:void(0);" target="_blank" rel="nofollow">我是专家</a>' +
14
									'<a class="listlink" href="javascript:void(0);"  rel="nofollow" id="perso">我是专家</a>' +
15 15
									'<a class="listlink" href="../privacy.html" target="_blank" rel="nofollow">用户协议</a>' +
16 16
									'<a class="listlink" href="../download.html" target="_blank" rel="nofollow">产品下载</a>' +
17 17
								'</p>' +
@ -55,5 +55,12 @@ $(function(){
55 55
			location.href="cmp-settled-reg.html"
56 56
		}
57 57
	})
58
	$("#perso").click(function(){
59
	var userid = $.cookie('userid');
60
if(userid=="null"||userid==undefined){
61
			location.href="login.html";
62
		}
63
	location.href="../expert-authentication.html";
64
})
58 65
})
59 66


+ 13 - 4
js/articalInfo.js

@ -40,7 +40,8 @@ $(document).ready(function() {
40 40
			success: function(data) {
41 41
				var $info = data.data || {};
42 42
				if(data.success && data.data) {
43
					var oTime = $info.createTime.substring(0, 4) + "." + $info.createTime.substring(4, 6) + "." + $info.createTime.substring(6, 8) 
43
					//var oTime = $info.createTime.substring(0, 4) + "." + $info.createTime.substring(4, 6) + "." + $info.createTime.substring(6, 8) 
44
					var oTime=timeGeshi($info.createTime);
44 45
					$("#creTime").text(oTime);
45 46
					$("#articleName").text($info.articleTitle);
46 47
					if($info.subject) {
@ -177,7 +178,8 @@ $(document).ready(function() {
177 178
					$(".commentList").html("");
178 179
					$(".message").text($info.length);
179 180
					for(var i = 0; i < $info.length; i++) {
180
						var time = $info[i].createTime.substring(0, 4) + "年" + $info[i].createTime.substring(4, 6) + "月" + $info[i].createTime.substring(6, 8) + "日 " + $info[i].createTime.substring(8, 10) + ":" + $info[i].createTime.substring(10, 12);
181
						//var time = $info[i].createTime.substring(0, 4) + "年" + $info[i].createTime.substring(4, 6) + "月" + $info[i].createTime.substring(6, 8) + "日 " + $info[i].createTime.substring(8, 10) + ":" + $info[i].createTime.substring(10, 12);
182
						var time=timeGeshi($info[i].createTime)
181 183
						if($info[i].professor.hasHeadImage){
182 184
							var img='/images/head/' + $info[i].professor.id + '_l.jpg'
183 185
						}else{
@ -226,7 +228,7 @@ $(document).ready(function() {
226 228
						$("#headImg,#proHead").attr("src", "images/default-icon.jpg");
227 229
					}
228 230
					if($data.foundTime) {
229
						var oTime = timeGeshi($data.foundTime);
231
						var oTime = $data.foundTime.substring(0,4)+"-"+$data.foundTime.substring(4,6)+"-"+$data.foundTime.substring(6,8);
230 232
						$("#createTime").text(oTime);
231 233
					} 
232 234
					if($data.city) {
@ -346,7 +348,14 @@ $(document).ready(function() {
346 348
	}
347 349
	/*时间格式转换*/
348 350
	function timeGeshi(otm) {
349
		var otme = otm.substring(0, 4) + "-" + otm.substring(4, 6) + "-" + otm.substring(6, 8);
351
		var ti=otm.substring(4, 5);
352
		var otme;
353
		if(ti=="0"){
354
			otme =otm.substring(5, 6) + "月" + otm.substring(6, 8)+"日 "+otm.substring(8, 10)+":"+otm.substring(10, 12);
355
		}else{
356
			otme =otm.substring(4, 6) + "月" + otm.substring(6, 8)+"日 "+otm.substring(8, 10)+":"+otm.substring(10, 12);
357
		}
358
		
350 359
		return otme;
351 360
	}
352 361
	function article() {

+ 8 - 1
js/footer.js

@ -8,7 +8,7 @@ footerHtml += '<div class="container-fulid">'+
8 8
								'<p>' +
9 9
									'<a class="listlink" href="javascript:void(0);" target="_blank" rel="nofollow">关于我们</a>' +
10 10
									'<a class="listlink" href="javascript:void(0);" rel="nofollow" id="cmpSet2">企业入驻</a>' +
11
									'<a class="listlink" href="javascript:void(0);" target="_blank" rel="nofollow">我是专家</a>' +
11
									'<a class="listlink" href="javascript:void(0);" rel="nofollow" id="perso">我是专家</a>' +
12 12
									'<a class="listlink" href="privacy.html" target="_blank" rel="nofollow">用户协议</a>' +
13 13
									'<a class="listlink" href="download.html" target="_blank" rel="nofollow">产品下载</a>' +
14 14
								'</p>' +
@ -67,3 +67,10 @@ fHtml +='<div class="wrapper clearfix">' +
67 67

68 68

69 69
document.write(footerHtml);
70
$("#perso").click(function(){
71
	var userid = $.cookie('userid');
72
if(userid=="null"||userid==undefined){
73
			location.href="login.html";
74
		}
75
	location.href="expert-authentication.html";
76
})

+ 1 - 24
js/index.js

@ -54,30 +54,7 @@ $(function(){
54 54
		if(userid=="null"||userid==undefined){
55 55
			location.href="login.html";
56 56
		}
57
		$.ajax({
58
			url: "/ajax/professor/auth",
59
			type: "GET",
60
			timeout: 10000,
61
			dataType: "json",
62
			data: {
63
				"id": userid,
64
			},
65
			success: function(data, textState) {
66
				if(data.success) {
67
					var $rta=data.data;
68
					if($rta.authType==1){
69
						location.href="needList.html";
70
					}else{
71
						location.href="expert-authentication.html"
72
					}
73
					
74
				}
75

76
			},
77
			error: function(XMLHttpRequest, textStats, errorThrown) {
78

79
			}
80
		})
57
		location.href="expert-authentication.html"
81 58
	})
82 59
	
83 60
	//热门领域