Browse Source

修改企业邮箱绑定

xuchunyang 8 years ago
parent
commit
9d6c77cb6a
2 changed files with 27 additions and 4 deletions
  1. 24 2
      cmp-portal/js/cmp-setBind.js
  2. 3 2
      cmp-portal/js/public/common.js

+ 24 - 2
cmp-portal/js/cmp-setBind.js

12
	})
12
	})
13

13

14
	/*回填cookie邮件*/
14
	/*回填cookie邮件*/
15
	emailhome(orgEmail);
16
	$("#orgEmail").text(emailCookieshow);
15
	showEmail();
17

16

18
	/*校验邮箱按钮显示状态*/
17
	/*校验邮箱按钮显示状态*/
19
	$('#companyEmail').on('keyup', function() {
18
	$('#companyEmail').on('keyup', function() {
120
			checkEmail();
119
			checkEmail();
121
		}
120
		}
122
	}
121
	}
122
	
123
	function showEmail() {
124
		$.ajax("/ajax/orgUser/orgEmail", {
125
			data: {
126
				"id": orgid
127
			},
128
			type: "GET",
129
			dataType: 'json',
130
			async: false,
131
			success: function($data) {
132
				console.log($data)
133
				if($data.success) {
134
					var orgEmail = $data.data;
135
					emailhome(orgEmail);
136
					$("#orgEmail").text(emailCookieshow);
137
				}
138
			},
139
			error: function() {
140
				$.MsgBox.Alert('提示', '服务器请求失败')
141
			},
142
		});
143
	}
144

123

145

124
})
146
})

+ 3 - 2
cmp-portal/js/public/common.js

17
	if (orgId && orgId != "null" && orgId != null) {
17
	if (orgId && orgId != "null" && orgId != null) {
18
		$(".unlogin").addClass("displayNone");
18
		$(".unlogin").addClass("displayNone");
19
		$(".onlogin").removeClass("displayNone");
19
		$(".onlogin").removeClass("displayNone");
20
		$.ajax("/ajax/org/" + orgId, {
20
		$.ajax("/ajax/image/hasOrgLogo", {
21
			data:{"id":orgId},
21
			type: "GET",
22
			type: "GET",
22
			dataType: 'json',
23
			dataType: 'json',
23
			async: false,
24
			async: false,
24
			success: function($data) {
25
			success: function($data) {
25
				if($data.success){
26
				if($data.success){
26
					if($data.data.hasOrgLogo){
27
					if($data.data){
27
						$("#imglogo").attr("src","/images/org/"+orgId+".jpg");
28
						$("#imglogo").attr("src","/images/org/"+orgId+".jpg");
28
					}
29
					}
29
				}
30
				}