-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdalao.html
More file actions
118 lines (111 loc) · 3.51 KB
/
dalao.html
File metadata and controls
118 lines (111 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/shareViews.js"></script>
<script type="text/javascript" src="js/herohelper.js"></script>
<script type="text/javascript" src="js/hero.js"></script>
<script type="text/javascript" src="js/ethjs.min.js"></script>
<script type="text/javascript" src="js/fu.js"></script>
<script type="text/javascript">
var eth = new Eth(new Eth.HttpProvider(window.ethProvider))
var tokenABI = window.fuABI
var token = eth.contract(tokenABI).at(window.contactAddress)
function getlist(list,j) {
token.sponsors(j).then(function(data){
if (data.spo == '0x') {
Hero.rows = [];
for (var i = 0; i < list.length; i++) {
Hero.rows.push({
class:'UIView',
frame:{w:'1x',h:'66'},
subViews:[
{
class:'HeroLabel',
frame:{x:'16',y:'10',w:'300',h:'30'},
text:list[i].title,
},
{
class:'HeroLabel',
frame:{x:'16',y:'40',w:'300',h:'20'},
size:13,
textColor:'999999',
text:list[i].w,
},
{
class:'HeroLabel',
frame:{r:'16',y:'15',w:'100',h:'30'},
alignment:'right',
text:list[i].v+ ' ETH',
}
]
})
};
setTimeout(function(){
Hero.datas({name:'list',data:[{sectionTitle:'大佬正在不断赶来',rows:Hero.rows}]});
},200);
} else {
var name;
var msg;
try {
var json = JSON.parse(data.msg)
name = json.name
msg = json.msg
} catch (error) {
name = data.spo
msg = data.msg
}
list.push({title:name, w:msg,v:Eth.fromWei(data.amount.toString(10), 'ether')})
getlist(list,j+1)
}
})
}
Hero.viewWillAppear = function(){
var list = [];
getlist(list,0)
}
Hero.on = function(json){
}
Hero.ui = {
version:0,
backgroundColor:'ffffff',
tintColor:'000000',
nav:{
title:"区块链-集五福",
navigationBarHidden:true
},
views:[
{
class:'HeroImageView',
frame:{w:'1x',h:'200'},
image:path+'images/background.jpg'
},
{
class:'HeroImageView',
frame:{x:'0.5x-150',y:'40',w:'300',h:'90'},
image:path+'images/2018.png'
},
{
class:'HeroTableView',
frame:{w:'1x',y:'200',b:'0'},
name:'list',
footer:{
class:'UIView',
frame:{w:'1x',h:'60'},
subViews:[
{
class:'HeroButton',
frame:{x:'16',r:'16',y:'10',h:'40'},
title:'我也要撒币',
backgroundColor:'bd3a53',
titleColor:'eeeeee',
click:{command:'goto:'+path+'/sabi.html'}
}
]
}
},
],
}
</script>
</head>
</html>