jack 8 年之前
父节点
当前提交
014614d9ab
共有 7 个文件被更改,包括 70 次插入46 次删除
  1. 15 11
      cmp-portal/js/cmp-updateinfo.js
  2. 10 2
      cmp-portal/js/cmp-workspaces.js
  3. 15 3
      cmp-portal/js/companybrowinfor.js
  4. 8 1
      cmp-portal/js/public/cmpFooter.js
  5. 13 4
      js/articalInfo.js
  6. 8 1
      js/footer.js
  7. 1 24
      js/index.js

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

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

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

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

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

96
							case '5':
96
							case '5':
97
								$("#qualificationList").text("500-1000人")
97
								$("#qualificationList").text("500-1000人")
98
								break;
98
								break;
99
							default:
99
							case '6':
100
								$("#qualificationList").text("1000人以上")
100
								$("#qualificationList").text("1000人以上")
101
								break;
101
								break;
102
							default:
103
								break;
102
						}
104
						}
103
					} else {
105
					} else {
104
						$("#qualificationList").remove();
106
						$("#qualificationList").remove();
120
							case '6':
122
							case '6':
121
								$("#orgType").text("外资企业");
123
								$("#orgType").text("外资企业");
122
								break;
124
								break;
123
							default:
125
							case '7':
124
								$("#orgType").text("初创企业");
126
								$("#orgType").text("初创企业");
125
								break;
127
								break;
128
							default:
129
								break;
126
						}
130
						}
131
					}else{
132
						$("#orgType").remove();
127
					}
133
					}
128
					if($data.industry) {
134
					if($data.industry) {
129
						indu($data.industry, '#industryShow')
135
						indu($data.industry, '#industryShow')
225
			}
231
			}
226
			var oString = '<dd>'
232
			var oString = '<dd>'
227
			oString += '<div class="staffChild">'
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
			oString += '</div><div class="h4Font"><span>' + arr[i].name + '</span></div>'
235
			oString += '</div><div class="h4Font"><span>' + arr[i].name + '</span></div>'
230
			oString += '<div class="h4Font">' + tiof + '</div></dd>'
236
			oString += '<div class="h4Font">' + tiof + '</div></dd>'
231
			$("#userList").append(oString);
237
			$("#userList").append(oString);
270
		error: function() {
276
		error: function() {
271
			return;
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
								'<p>' +
11
								'<p>' +
12
									'<a class="listlink" href="javascript:void(0);" target="_blank" rel="nofollow">关于我们</a>' +
12
									'<a class="listlink" href="javascript:void(0);" target="_blank" rel="nofollow">关于我们</a>' +
13
									'<a class="listlink" href="javascript:void(0);"  rel="nofollow" id="cmpSet">企业入驻</a>' +
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
									'<a class="listlink" href="../privacy.html" target="_blank" rel="nofollow">用户协议</a>' +
15
									'<a class="listlink" href="../privacy.html" target="_blank" rel="nofollow">用户协议</a>' +
16
									'<a class="listlink" href="../download.html" target="_blank" rel="nofollow">产品下载</a>' +
16
									'<a class="listlink" href="../download.html" target="_blank" rel="nofollow">产品下载</a>' +
17
								'</p>' +
17
								'</p>' +
55
			location.href="cmp-settled-reg.html"
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
			success: function(data) {
40
			success: function(data) {
41
				var $info = data.data || {};
41
				var $info = data.data || {};
42
				if(data.success && data.data) {
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
					$("#creTime").text(oTime);
45
					$("#creTime").text(oTime);
45
					$("#articleName").text($info.articleTitle);
46
					$("#articleName").text($info.articleTitle);
46
					if($info.subject) {
47
					if($info.subject) {
177
					$(".commentList").html("");
178
					$(".commentList").html("");
178
					$(".message").text($info.length);
179
					$(".message").text($info.length);
179
					for(var i = 0; i < $info.length; i++) {
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
						if($info[i].professor.hasHeadImage){
183
						if($info[i].professor.hasHeadImage){
182
							var img='/images/head/' + $info[i].professor.id + '_l.jpg'
184
							var img='/images/head/' + $info[i].professor.id + '_l.jpg'
183
						}else{
185
						}else{
226
						$("#headImg,#proHead").attr("src", "images/default-icon.jpg");
228
						$("#headImg,#proHead").attr("src", "images/default-icon.jpg");
227
					}
229
					}
228
					if($data.foundTime) {
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
						$("#createTime").text(oTime);
232
						$("#createTime").text(oTime);
231
					} 
233
					} 
232
					if($data.city) {
234
					if($data.city) {
346
	}
348
	}
347
	/*时间格式转换*/
349
	/*时间格式转换*/
348
	function timeGeshi(otm) {
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
		return otme;
359
		return otme;
351
	}
360
	}
352
	function article() {
361
	function article() {

+ 8 - 1
js/footer.js

8
								'<p>' +
8
								'<p>' +
9
									'<a class="listlink" href="javascript:void(0);" target="_blank" rel="nofollow">关于我们</a>' +
9
									'<a class="listlink" href="javascript:void(0);" target="_blank" rel="nofollow">关于我们</a>' +
10
									'<a class="listlink" href="javascript:void(0);" rel="nofollow" id="cmpSet2">企业入驻</a>' +
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
									'<a class="listlink" href="privacy.html" target="_blank" rel="nofollow">用户协议</a>' +
12
									'<a class="listlink" href="privacy.html" target="_blank" rel="nofollow">用户协议</a>' +
13
									'<a class="listlink" href="download.html" target="_blank" rel="nofollow">产品下载</a>' +
13
									'<a class="listlink" href="download.html" target="_blank" rel="nofollow">产品下载</a>' +
14
								'</p>' +
14
								'</p>' +
67

67

68

68

69
document.write(footerHtml);
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
		if(userid=="null"||userid==undefined){
54
		if(userid=="null"||userid==undefined){
55
			location.href="login.html";
55
			location.href="login.html";
56
		}
56
		}
57
		$.ajax({
57
		location.href="expert-authentication.html"
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
		})
81
	})
58
	})
82
	
59
	
83
	//热门领域
60
	//热门领域