Browse Source

登录修改

xuchunyang 8 years ago
parent
commit
634d4e4f51
5 changed files with 14 additions and 55 deletions
  1. 0 43
      app/html/auth.html
  2. 9 6
      app/js/attentions.js
  3. 0 4
      app/js/login.js
  4. 3 2
      app/js/myaccount.js
  5. 2 0
      app/js/setup.js

+ 0 - 43
app/html/auth.html

@ -1,43 +0,0 @@
1
<!doctype html>
2
<html>
3
<head>
4
<meta charset="UTF-8">
5
<title></title>
6
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
<link href="../css/mui.min.css" rel="stylesheet" />
8
<link href="../css/app.css" rel="stylesheet" />
9
<link href="../css/iconfont.css" rel="stylesheet" />
10
</head>
11
<body>
12
	
13
<!-- 主页面标题 -->
14
<header class="mui-bar mui-bar-nav toptitbox">
15
    <div class="mui-input-row mui-search searchbox">
16
	    <input type="search" class="mui-input-clear searchtxt" placeholder="搜索专家、合作资源" id="search">
17
	</div>
18
</header>
19
 <!-- 主页面内容容器 -->
20
    <div class="mui-content">
21
    	<!-- 主界面具体展示内容 -->
22
    	<div class="listtit">认证科研型专家
23
    		<em class="mui-icon iconfont icon-vip authicon-cu"></em>
24
    	</div>
25
    	<div class="listtit">认证企业型专家
26
    		<em class="mui-icon iconfont icon-vip authicon-com"></em>
27
    	</div>
28
    	
29
    	<div class="listtit">认证在企高管	
30
    		<em class="mui-icon iconfont icon-renzheng authicon-mana"><span>高管</span></em>
31
    	</div>
32
    	<div class="listtit">认证在企职员	
33
    		<em class="mui-icon iconfont icon-renzheng authicon-staff"><span>职员</span></em>
34
    	</div>
35
    	<div class="listtit">认证在读学生	
36
    		<em class="mui-icon iconfont icon-renzheng authicon-stu"><span>学生</span></em>
37
    	</div>
38
    </div>
39
    <script src="../js/public/mui.min.js"></script>
40

41

42
</body>
43
</html>

+ 9 - 6
app/js/attentions.js

@ -92,8 +92,9 @@ function getOneExpert(pageNo, pageSize) {
92 92
			dataType: 'json', //数据格式类型
93 93
			type: 'GET', //http请求类型
94 94
			//timeout: 10000,
95
			async:false, 
95
			//async:false, 
96 96
			success: function(data) {
97
				console.log("1");
97 98
				if(data.success && data.data.data != "") {
98 99
					var datalist = data.data.data;
99 100
					datalistEach(datalist);
@ -121,10 +122,9 @@ function getOneResources(pageNo, pageSize) {
121 122
			dataType: 'json', //数据格式类型
122 123
			type: 'GET', //http请求类型
123 124
			//timeout: 10000,
124
			async:false,
125
			//async:false,
125 126
			success: function(data) {
126
				plus.nativeUI.closeWaiting();
127
				plus.webview.currentWebview().show("slide-in-right", 150);
127
				console.log("2");
128 128
				if(data.success && data.data.data != "") {
129 129
					var datalistd = data.data.data;
130 130
					resourcesEach2(datalistd);
@ -153,7 +153,7 @@ function expert2(pageNo, pageSize) {
153 153
				dataType: 'json', //数据格式类型
154 154
				type: 'GET', //http请求类型
155 155
				timeout: 10000,
156
				async:false,
156
				//async:false,
157 157
				success: function(data) {
158 158
					console.log(data.success)
159 159
					if(data.success && data.data.data != "") {
@ -194,7 +194,7 @@ function expert2(pageNo, pageSize) {
194 194
				dataType: 'json', //数据格式类型
195 195
				type: 'GET', //http请求类型
196 196
				timeout: 10000,
197
				async:false,
197
				//async:false,
198 198
				success: function(data) {
199 199
					console.log(data.success)
200 200
					if(data.success && data.data.data != "") {
@ -291,6 +291,7 @@ function datalistEach(datalist) {
291 291
			'</div></a></li>';
292 292

293 293
		table.appendChild(li, table.firstChild);
294
		
294 295
	});
295 296
}
296 297

@ -343,5 +344,7 @@ function resourcesEach2(datalistd) {
343 344
			'<p class="listtit3"><span>' + title + '</span><span>' + office + '</span><span>' + orgName + '</span><span>' + address + '</span></p>' +
344 345
			'</div></a></li>';
345 346
		table1.appendChild(li, table1.firstChild);
347
		plus.nativeUI.closeWaiting();
348
		plus.webview.currentWebview().show("slide-in-right", 150);
346 349
	});
347 350
}

+ 0 - 4
app/js/login.js

@ -123,11 +123,7 @@ mui.ready(function() {
123 123
				success: function(data) {
124 124
					console.log(data.data)
125 125
					if(data.data != null) {
126
						//goHome();
127
						//var myaccountClose = plus.webview.getWebviewById("html/myaccount.html");
128
						//plus.webview.close(myaccountClose);
129 126
						//mui.currentWebview.close();
130
						mui.currentWebview.close();
131 127
			        	mui.back();
132 128
				        var myaccountPage = plus.webview.getWebviewById('html/myaccount.html');
133 129
						mui.fire(myaccountPage, 'closeUser', {

+ 3 - 2
app/js/myaccount.js

@ -15,6 +15,7 @@ mui.ready(function() {
15 15
	mui.plusReady(function() {
16 16

17 17
		var userId = plus.storage.getItem('userid');
18
		console.log(userId);
18 19
		/*判断登录是否成功*/
19 20
		loginStatus();
20 21

@ -35,8 +36,8 @@ mui.ready(function() {
35 36
		window.addEventListener('closeUser', function(event) {
36 37
			userId = event.detail.id;
37 38
			console.log(userId);
38
			console.log('dd');
39 39
			loginStatus();
40
			userInformation();
40 41
		});
41 42

42 43
		function loginStatus() {
@ -103,7 +104,7 @@ mui.ready(function() {
103 104
				dataType: 'json', //数据格式类型
104 105
				type: 'GET', //http请求类型
105 106
				timeout: 10000, //超时设置
106
				async:true,
107
				async:false,
107 108
				success: function(data) {
108 109
					
109 110
					var $info = data.data || {}

+ 2 - 0
app/js/setup.js

@ -16,6 +16,8 @@ mui.ready(function() {
16 16
		mui.confirm("是否退出", "提示", btn, function(e) {
17 17
			if(e.index == 0) {
18 18
				plus.storage.removeItem("userid");
19
				//plus.cache.clear();
20
				//plus.storage.clear();
19 21
				var userId = "null";
20 22
				mui.currentWebview.close();
21 23
				mui.back();