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
	var userId = event.detail.id; 
37
	var userId = event.detail.id; 
38
	content1.style.display = 'block';
38
	content1.style.display = 'block';
39
	content2.style.display = 'none';
39
	content2.style.display = 'none';
40
	
40
	console.log('点击登录ID=='+userId)
41
	initData();
41
	initData();
42
	
42
	
43
	if(plus.nativeUI.showWaiting()){
43
	if(plus.nativeUI.showWaiting()){
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
window.addEventListener('exited', function(event) {
58
window.addEventListener('exited', function(event) {
59
	console.log('退出')
52
	var userId = event.detail.id; 
60
	var userId = event.detail.id; 
53
	console.log('exited=='+userId)
61
	console.log('exited=='+userId)
54
	console.log(content2)
62
	console.log(content2)
95
	pullRefresh: {
103
	pullRefresh: {
96
		container: '#zixunpullrefresh',
104
		container: '#zixunpullrefresh',
97
		down: {
105
		down: {
106
			height:50,
98
			callback: pulldownRefresh
107
			callback: pulldownRefresh
108
			
99
		}
109
		}
100
//		up: {
110
//		up: {
101
//			contentrefresh: '正在加载...',
111
//			contentrefresh: '正在加载...',

+ 2 - 2
app/js/login.js

100
						var userId = data.data.id;
100
						var userId = data.data.id;
101
						plus.storage.setItem('userid', userId);
101
						plus.storage.setItem('userid', userId);
102
						firstLogin();
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
						mui.fire(consultPage, 'logined', {
105
						mui.fire(consultPage, 'logined', {
106
							id: userId
106
							id: userId
107
						});	
107
						});	

+ 1 - 1
app/js/setup.js

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