Browse Source

未登录咨询显示修正

wangaidan 8 years ago
parent
commit
104b168af8
3 changed files with 14 additions and 4 deletions
  1. 11 1
      app/js/consult.js
  2. 2 2
      app/js/login.js
  3. 1 1
      app/js/setup.js

+ 11 - 1
app/js/consult.js

@ -37,7 +37,7 @@ window.addEventListener('logined', function(event) {
37 37
	var userId = event.detail.id; 
38 38
	content1.style.display = 'block';
39 39
	content2.style.display = 'none';
40
	
40
	console.log('点击登录ID=='+userId)
41 41
	initData();
42 42
	
43 43
	if(plus.nativeUI.showWaiting()){
@ -47,8 +47,16 @@ window.addEventListener('logined', function(event) {
47 47
	}
48 48
});
49 49
50
mui.plusReady(function() {
51
	var self = plus.webview.currentWebview();
52
	console.log('当前咨询列表页id==='+self.id);
53
})
54
55
56
50 57
/*退出*/
51 58
window.addEventListener('exited', function(event) {
59
	console.log('退出')
52 60
	var userId = event.detail.id; 
53 61
	console.log('exited=='+userId)
54 62
	console.log(content2)
@ -95,7 +103,9 @@ mui.init({
95 103
	pullRefresh: {
96 104
		container: '#zixunpullrefresh',
97 105
		down: {
106
			height:50,
98 107
			callback: pulldownRefresh
108
			
99 109
		}
100 110
//		up: {
101 111
//			contentrefresh: '正在加载...',

+ 2 - 2
app/js/login.js

@ -100,8 +100,8 @@ mui.ready(function() {
100 100
						var userId = data.data.id;
101 101
						plus.storage.setItem('userid', userId);
102 102
						firstLogin();
103
						console.log('点击登陆时iddddddd===='+plus.storage.getItem('userid'))
104
						var consultPage = plus.webview.getWebviewById('html/consultlist.html');
103
						
104
						var consultPage = plus.webview.getWebviewById('consultlist.html');
105 105
						mui.fire(consultPage, 'logined', {
106 106
							id: userId
107 107
						});	

+ 1 - 1
app/js/setup.js

@ -54,7 +54,7 @@ mui.ready(function() {
54 54
				mui.fire(myaccountPage, 'closeUser', {
55 55
					id: userId
56 56
				});
57
				var consultPage = plus.webview.getWebviewById('html/consultlist.html');
57
				var consultPage = plus.webview.getWebviewById('consultlist.html');
58 58
				mui.fire(consultPage, 'exited', {
59 59
					id: userId
60 60
				});