-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsabi.html
More file actions
131 lines (123 loc) · 4.03 KB
/
Copy pathsabi.html
File metadata and controls
131 lines (123 loc) · 4.03 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
128
129
130
131
<!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(){
}
Hero.on = function(json){
if (json.click === 'sabi') {
localStorage.name = Hero.ui2Data.name;
localStorage.word = Hero.ui2Data.word;
if (localStorage.name && localStorage.name.length >0 && localStorage.word && localStorage.word.length > 0 && localStorage.name !== '[object Object]') {
Hero.datas({name:'moreview',hidden:false})
inpoutByteCode = abi.encodeMethod(tokenABI[0],[JSON.stringify({'name':localStorage.name,'msg':localStorage.word})])
Hero.datas({name:'tipLbl',text:'使用您的钱包,转账任意 eth 到luckybaby.eth,附带上以下字符串: '+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:'HeroTextField',
name:'name',
text:'',
frame:{x:'16',y:'250',r:'16',h:'44'},
placeHolder:'我的名字',
textFieldDidEditing:{textfield:'change'},
},
{
class:'HeroTextField',
name:'word',
text:'',
frame:{x:'16',y:'320',r:'16',h:'44'},
placeHolder:'我的祝福',
textFieldDidEditing:{textfield:'change'},
},
{
class:'HeroLabel',
frame:{x:'16',w:'280',h:'44',y:'390'},
size:12,
textColor:'999999',
text:'本应用是一个永恒应用,您的撒币记录将被永远记载'
},
{
class:'HeroButton',
frame:{r:'16',w:'80',h:'44',y:'450'},
title:'撒币',
backgroundColor:'bd3a53',
titleColor:'eeeeee',
click:{click:'sabi'}
},
{
class:'UIView',
frame:{w:'1x',y:'500',h:'280'},
name:'moreview',
hidden:true,
subViews:[
{
class:'HeroTextView',
frame:{x:'16',r:'16',y:'10',h:'120'},
text:'使用您的钱包,转账任意 eth 到luckybaby.eth,附带上以下字符串:',
size:12,
name: 'tipLbl',
enable:false,
textColor:'aaaaaa',
},
{
class:'HeroButton',
frame:{r:'16',w:'80',h:'44',y:'130'},
title:'复制',
backgroundColor:'bd3a53',
titleColor:'eeeeee',
click:{click:'copy'}
},
{
class:'HeroButton',
frame:{r:'16',x:'16',h:'55',y:'210'},
title:'知道了',
backgroundColor:'bd3a53',
titleColor:'eeeeee',
click:{command:'back'}
},
]
},
{
class:'HeroToast',
name:'toast'
}
],
}
</script>
</head>
</html>