-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpay3.html
More file actions
127 lines (123 loc) · 3.74 KB
/
Copy pathpay3.html
File metadata and controls
127 lines (123 loc) · 3.74 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
119
120
121
122
123
124
125
126
127
<!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 abi = Eth.abi
var tokenABI = window.fuABI
var inpoutByteCode
Hero.viewWillAppear = function(){
setTimeout(function(){
if(localStorage.pageType === 'duihuan'){
inpoutByteCode = abi.encodeMethod(tokenABI[11],[])
Hero.datas({name:'addressView',hidden:true});
Hero.datas({name:'tipLbl',text:inpoutByteCode});
}else{
Hero.datas({name:'addressView',hidden:false});
}
},200)
}
Hero.on = function(json){
if (json.click === 'address') {
if (Hero.ui2Data.address&&Hero.ui2Data.address.length === 42) {
Hero.datas({name:'addressView',hidden:true});
inpoutByteCode = abi.encodeMethod(tokenABI[6], [Hero.ui2Data.address,localStorage.fuType])
Hero.datas({name:'tipLbl',text:inpoutByteCode});
}else{
Hero.datas({name:'toast',text:'请输入合法地址'});
}
};
if (json.click === 'copy') {
window.copyTextToClipboard(inpoutByteCode);
};
}
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:'HeroLabel',
frame:{x:'16',r:'16',y:'210',h:'20'},
text:'发送 0 eth到luckybaby.eth,附加下面的信息',
size:12,
textColor:'aaaaaa',
},
{
class:'HeroTextView',
frame:{x:'16',r:'16',y:'240',h:'100'},
enable:false,
text:'',
size:12,
name:'tipLbl',
textColor:'aaaaaa',
},
{
class:'HeroButton',
frame:{r:'16',w:'60',h:'30',y:'360'},
title:'复制',
backgroundColor:'bd3a53',
titleColor:'eeeeee',
click:{click:'copy'}
},
{
class:'HeroButton',
frame:{r:'16',x:'16',h:'55',y:'480'},
title:'知道了',
backgroundColor:'bd3a53',
titleColor:'eeeeee',
click:{command:'back'}
},
{
class:'UIView',
name:'addressView',
frame:{w:'1x',h:'1x'},
backgroundColor:'ffffff',
subViews:[
{
class:'HeroTextField',
name:'address',
frame:{x:'16',r:'16',y:'40',h:'50'},
textFieldDidEditing:{textfield:'change'},
placeHolder:'TA的 address 地址',
size:12,
textColor:'aaaaaa',
},
{
class:'HeroButton',
frame:{r:'16',w:'60',h:'44',y:'100'},
title:'确定',
backgroundColor:'bd3a53',
titleColor:'eeeeee',
click:{click:'address'}
},
]
},
{
class:'HeroToast',
name:'toast'
}
],
}
</script>
</head>
</html>