Sfoglia il codice sorgente

我的关注页面,增加下拉涮新

xuchunyang 8 anni fa
parent
commit
666c98e1d9
3 ha cambiato i file con 29 aggiunte e 6 eliminazioni
  1. 5 4
      app/html/attentions.html
  2. 12 1
      app/js/attentions.js
  3. 12 1
      app/js/attentions2.js

+ 5 - 4
app/html/attentions.html

@ -35,8 +35,6 @@
35 35
			if(checkedindex == 0) {
36 36
				libtn_arr[0].classList.add("liactive");
37 37
				libtn_arr[1].classList.remove("liactive");
38
				var list1 = plus.webview.getWebviewById('attentions-list2.html');
39
				list1.close();
40 38
				mui.openWindow({
41 39
					url: 'attentions-list.html',
42 40
					id: 'attentions-list.html',
@ -49,11 +47,12 @@
49 47
						bottom: '0px',
50 48
					}
51 49
				});
50
				var list1 = plus.webview.getWebviewById('attentions-list2.html');
51
				list1.close();
52 52
			} else {
53 53
				libtn_arr[1].classList.add("liactive");
54 54
				libtn_arr[0].classList.remove("liactive");
55
				var list2 = plus.webview.getWebviewById('attentions-list.html');
56
				list2.close();
55
			
57 56
				mui.openWindow({
58 57
					url: 'attentions-list2.html',
59 58
					id: 'attentions-list2.html',
@ -66,6 +65,8 @@
66 65
						bottom: '0px',
67 66
					}
68 67
				});
68
				var list2 = plus.webview.getWebviewById('attentions-list.html');
69
				list2.close();
69 70
			}
70 71
		})
71 72
	    mui.init({

+ 12 - 1
app/js/attentions.js

@ -8,10 +8,13 @@ var nodatabox1 = document.getElementById("nodatabox1");
8 8
mui.init({
9 9
	pullRefresh: {
10 10
		container: '#pullrefresh',
11
		down: {
12
				callback: pulldownRefresh
13
			  },
11 14
		up: {
12 15
			contentrefresh: '正在加载...',
13 16
			callback: pullupRefresh,
14
		    auto:true
17
		   // auto:true
15 18
		}
16 19
	}
17 20
});
@ -24,6 +27,14 @@ function pullupRefresh() {
24 27
	mui('#pullrefresh').pullRefresh().refresh(true);
25 28
}
26 29

30
function pulldownRefresh() {
31
	setTimeout(function() {
32
		getOneExpert(1, 10);	
33
		mui('#pullrefresh').pullRefresh().endPulldownToRefresh();
34
	}, 1000);
35
}
36

37

27 38
if(mui.os.plus) {
28 39
	mui.plusReady(function() {
29 40
		setTimeout(function() {

+ 12 - 1
app/js/attentions2.js

@ -8,10 +8,13 @@ var nodatabox1 = document.getElementById("nodatabox1");
8 8
mui.init({
9 9
	pullRefresh: {
10 10
		container: '#pullrefresh',
11
		down: {
12
				callback: pulldownRefresh
13
			  },
11 14
		up: {
12 15
			contentrefresh: '正在加载...',
13 16
			callback: pullupRefresh,
14
		    auto:true
17
		    //auto:true
15 18
		}
16 19
	}
17 20
});
@ -24,6 +27,14 @@ function pullupRefresh() {
24 27
	}, 1000);
25 28
}
26 29

30
function pulldownRefresh() {
31
	setTimeout(function() {
32
		getOneExpert(1, 10);	
33
		mui('#pullrefresh').pullRefresh().endPulldownToRefresh();
34
	}, 1000);
35
}
36

37

27 38
if(mui.os.plus) {
28 39
	mui.plusReady(function() {
29 40
		setTimeout(function() {