浏览代码

登录,个人完善页面改版

xuchunyang 8 年之前
父节点
当前提交
f9d773d1f7
共有 5 个文件被更改,包括 39 次插入14 次删除
  1. 20 6
      app/html/fillinfo.html
  2. 16 5
      app/js/fillinfo.js
  3. 1 1
      app/js/login.js
  4. 1 1
      app/js/loginTelNew.js
  5. 1 1
      app/js/myaccount.js

+ 20 - 6
app/html/fillinfo.html

79
			})
79
			})
80
			
80
			
81
			document.getElementById("fillinfoNext").addEventListener('tap', function() {
81
			document.getElementById("fillinfoNext").addEventListener('tap', function() {
82
				var userId = plus.storage.getItem('userid');
83
				mui.ajax(baseUrl + '/ajax/professor/authen', {
84
					data:{"id":userId,"authentication":applyType},
85
					dataType: 'json', //数据格式类型
86
					type: 'POST', //http请求类型
87
					timeout: 10000, //超时设置
88
					success: function(data) {
89
						console.log(JSON.stringify(data));
90
						if(data.success) {
91
							mui.openWindow({
92
								url: '../html/fillinfo-select.html',
93
								id: 'fillinfo-select.html',
94
								show: {autoShow: false}
95
							});
96
						}
97
					},
98
					error: function(data) {
99
						plus.nativeUI.toast("服务器链接超时", toastStyle);
100
					}
101
				})
82
				
102
				
83
				mui.openWindow({
84
					url: '../html/fillinfo-select.html',
85
					id: 'fillinfo-select.html',
86
					show: {autoShow: false},
87
					extras: {num: applyType}
88
				});
89
			});
103
			});
90
		</script>
104
		</script>
91
	</body>
105
	</body>

+ 16 - 5
app/js/fillinfo.js

8
		var goIndex = document.getElementById("goIndex");
8
		var goIndex = document.getElementById("goIndex");
9
		var dataProvince = document.getElementById("data-province");
9
		var dataProvince = document.getElementById("data-province");
10
		var dataAddress = document.getElementById("data-address");
10
		var dataAddress = document.getElementById("data-address");
11
		var userTitle = document.getElementById("userTitle");
12
		var userPosition = document.getElementById("userPosition");
11
		var applyType;
13
		var applyType;
12
		var userId = plus.storage.getItem('userid');
14
		var userId = plus.storage.getItem('userid');
13

15

16
		/*校验input字数*/
17
		mui('.noactiveTab').on('keyup', "#userTitle,#userDepartment,#userPosition", function() {
18
			if(this.value.length > 20){
19
				plus.nativeUI.toast("最多输入20个字", toastStyle);
20
			}
21
		});
22
		
23
		/*校验input字数*/
24
		mui('.noactiveTab').on('keyup', "#userMechanism", function() {
25
			if(this.value.length > 50){
26
				plus.nativeUI.toast("最多输入50个字", toastStyle);
27
			}
28
		});
29

14
		/*选择地址*/
30
		/*选择地址*/
15
		var cityPicker = new mui.PopPicker({
31
		var cityPicker = new mui.PopPicker({
16
			layer: 2
32
			layer: 2
36
		
52
		
37
		/*查询用户名*/
53
		/*查询用户名*/
38
		function showusername() {
54
		function showusername() {
39
			
40
			alert(userId)
41
			mui.ajax(baseUrl + '/ajax/professor/baseInfo/' + userId, {
55
			mui.ajax(baseUrl + '/ajax/professor/baseInfo/' + userId, {
42
				dataType: 'json', //数据格式类型
56
				dataType: 'json', //数据格式类型
43
				type: 'get', //http请求类型
57
				type: 'get', //http请求类型
73

87

74
		/*提交个人信息*/
88
		/*提交个人信息*/
75
		goIndex.addEventListener('tap', function() {
89
		goIndex.addEventListener('tap', function() {
76
			var userTitle = document.getElementById("userTitle");
77
			var userPosition = document.getElementById("userPosition");
78
			goVal();
90
			goVal();
79
		});
91
		});
80

92

88
			$data.province = dataProvince.value;
100
			$data.province = dataProvince.value;
89
			$data.address = dataAddress.value;
101
			$data.address = dataAddress.value;
90
			$data.id = plus.storage.getItem('userid');;
102
			$data.id = plus.storage.getItem('userid');;
91
			$data.authentication = self.num;
92
			console.log(JSON.stringify($data))
103
			console.log(JSON.stringify($data))
93
			mui.ajax(baseUrl + '/ajax/professor/updatePro', {
104
			mui.ajax(baseUrl + '/ajax/professor/updatePro', {
94
				data: $data,
105
				data: $data,

+ 1 - 1
app/js/login.js

145
				success: function(data) {
145
				success: function(data) {
146
					console.log(JSON.stringify(data))
146
					console.log(JSON.stringify(data))
147
					if(data.success) {
147
					if(data.success) {
148
						if(data.data.authentication < 0){
148
						if(data.data.authentication == undefined || data.data.authentication == null){
149
							var productView = mui.preload({
149
							var productView = mui.preload({
150
								url: '../html/fillinfo.html',
150
								url: '../html/fillinfo.html',
151
								id: '../html/fillinfo.html',
151
								id: '../html/fillinfo.html',

+ 1 - 1
app/js/loginTelNew.js

171
				timeout: 10000, //超时设置
171
				timeout: 10000, //超时设置
172
				success: function(data) {
172
				success: function(data) {
173
					if(data.success) {
173
					if(data.success) {
174
						if(data.data.authentication < 0){
174
						if(data.data.authentication == undefined || data.data.authentication == null){
175
							var productView = mui.preload({
175
							var productView = mui.preload({
176
								url: '../html/fillinfo.html',
176
								url: '../html/fillinfo.html',
177
								id: '../html/fillinfo.html',
177
								id: '../html/fillinfo.html',

+ 1 - 1
app/js/myaccount.js

306
						professorName = $info.name;
306
						professorName = $info.name;
307
						scorePercent = $info.scorePercent;
307
						scorePercent = $info.scorePercent;
308
						document.getElementById("userName").innerText = $info.name;
308
						document.getElementById("userName").innerText = $info.name;
309
						document.getElementById("orgName").innerText = $info.orgName;
309
						document.getElementById("orgName").innerText = $info.orgName || "";
310
						if($info.hasHeadImage == 1) {
310
						if($info.hasHeadImage == 1) {
311
							var mun = Math.round(Math.random() * 99 + 1);
311
							var mun = Math.round(Math.random() * 99 + 1);
312
							userImg.setAttribute("src", baseUrl + "/images/head/" + $info.id + "_l.jpg?" + mun);
312
							userImg.setAttribute("src", baseUrl + "/images/head/" + $info.id + "_l.jpg?" + mun);