-
Notifications
You must be signed in to change notification settings - Fork 2
/
2019_1574352240780.html
439 lines (427 loc) · 22.8 KB
/
2019_1574352240780.html
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>2019普华科技大会</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<style type="text/css">
button {
background-color: #000;
color: #fff;
border: 0;
font-size: 1em;
}
</style>
</head>
<body>
<div class="container">
<br/>
<div class="jumbotron">
<p class="lead" id="greeting">欢迎参加2019普华科技大会!请各位嘉宾在下方输入名字签到</p>
<hr/>
<form id="form">
<div class="form-group">
<label for="name">您的姓名</label>
<input type="text" class="form-control" id="name" placeholder="">
</div>
<button type="button" id="submit" class="btn btn-primary">发送</button>
</form>
<div id="formSubmitted" style="display:none">共识上链中,请等 20 秒 ...</div>
<p id="me" style="display:none"><span id="myname" class="badge badge-info"></span> 已经签到,谢谢!<span id="meal" style="color:blue;display:none">请出示签到截图,领取餐券。</span></p>
</div>
<h4>已经签到</h4>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">姓名</th>
<th scope="col">单位</th>
</tr>
</thead>
<tbody id="checkins">
</tbody>
</table>
<p style="text-align:center">永久记录在 <a target="_blank" href="https://app.cybermiles.io/">CyberMiles</a> 电商公链</p>
</div>
<script type="text/javascript">
window.BuidlProviders = {
web3: {
url: "https://rpc.cybermiles.net.cn:8545",
chainId: "18",
gasPrice: "5000000000",
gasLimit: "8000000",
},
es: {
url: "https://cmt.search.secondstate.io"
}
}
</script>
<script type="text/javascript" src="https://buidl.secondstate.io/embed/main.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
<script type="text/javascript">
/* Don't modify */
var abi = [{"constant":true,"inputs":[],"name":"success","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAddrs","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"getCheckin","outputs":[{"name":"","type":"string"},{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_organization","type":"string"}],"name":"addCheckin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_greeting","type":"string"},{"name":"_success","type":"string"}],"name":"setGreeting","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"greeting","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getGreeting","outputs":[{"name":"","type":"string"},{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_greeting","type":"string"},{"name":"_success","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}];
var bytecode = '608060405234801561001057600080fd5b50604051610eae380380610eae8339810180604052810190808051820192919060200180518201929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600190805190602001906100939291906100b2565b5080600290805190602001906100aa9291906100b2565b505050610157565b82805460018160011615610100020d166002900490600052602060002090601f016020900481019282601f106100f357805160ff1916838001178555610121565b82800160010185558215610121579182015b82811115610120578251825591602001919060010190610105565b5b50905061012e9190610132565b5090565b61015491905b80821115610150576000816000905550600101610138565b5090565b90565b610d48806101666000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b93381b146100885780633f416eb3146101185780637b263a0e146101845780637cf158ac146102ac578063d4e107291461035b578063ef690cc01461040a578063fe50cc721461049a575b600080fd5b34801561009457600080fd5b5061009d610596565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100dd5780820151818401526020810190506100c2565b50505050905090810190601f16801561010a5780820d805160018360200d6101000a0d1916815260200191505b509250505060405180910390f35b34801561012457600080fd5b5061012d610634565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610170578082015181840152602081019050610155565b505050509050019250505060405180910390f35b34801561019057600080fd5b506101c5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106c2565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b838110156102095780820151818401526020810190506101ee565b50505050905090810190601f1680156102365780820d805160018360200d6101000a0d1916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101561026f578082015181840152602081019050610254565b50505050905090810190601f16801561029c5780820d805160018360200d6101000a0d1916815260200191505b5094505050505060405180910390f35b3480156102b857600080fd5b50610359600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061088a565b005b34801561036757600080fd5b50610408600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610985565b005b34801561041657600080fd5b5061041f610a12565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561045f578082015181840152602081019050610444565b50505050905090810190601f16801561048c5780820d805160018360200d6101000a0d1916815260200191505b509250505060405180910390f35b3480156104a657600080fd5b506104af610ab0565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b838110156104f35780820151818401526020810190506104d8565b50505050905090810190601f1680156105205780820d805160018360200d6101000a0d1916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101561055957808201518184015260208101905061053e565b50505050905090810190601f1680156105865780820d805160018360200d6101000a0d1916815260200191505b5094505050505060405180910390f35b6002805460018160011615610100020d166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020d1660029004801561062c5780601f106106015761010080835404028352916020019161062c565b820191906000526020600020905b81548152906001019060200180831161060f5782900d601f168201915b505050505081565b606060048054806020026020016040519081016040528092919081815260200182805480156106b857602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161066e575b5050505050905090565b606080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181805460018160011615610100020d166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020d166002900480156107de5780601f106107b3576101008083540402835291602001916107de565b820191906000526020600020905b8154815290600101906020018083116107c15782900d601f168201915b5050505050915080805460018160011615610100020d166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020d1660029004801561087a5780601f1061084f5761010080835404028352916020019161087a565b820191906000526020600020905b81548152906001019060200180831161085d5782900d601f168201915b5050505050905091509150915091565b604080519081016040528083815260200182815250600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000190805190602001906108fa929190610bf7565b506020820151816001019080519060200190610917929190610bf7565b5090505060043390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109e057600080fd5b81600190805190602001906109f6929190610c77565b508060029080519060200190610a0d929190610c77565b505050565b6001805460018160011615610100020d166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020d16600290048015610aa85780601f10610a7d57610100808354040283529160200191610aa8565b820191906000526020600020905b815481529060010190602001808311610a8b5782900d601f168201915b505050505081565b6060806001600281805460018160011615610100020d166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020d16600290048015610b4c5780601f10610b2157610100808354040283529160200191610b4c565b820191906000526020600020905b815481529060010190602001808311610b2f5782900d601f168201915b5050505050915080805460018160011615610100020d166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020d16600290048015610be85780601f10610bbd57610100808354040283529160200191610be8565b820191906000526020600020905b815481529060010190602001808311610bcb5782900d601f168201915b50505050509050915091509091565b82805460018160011615610100020d166002900490600052602060002090601f016020900481019282601f10610c3857805160ff1916838001178555610c66565b82800160010185558215610c66579182015b82811115610c65578251825591602001919060010190610c4a565b5b509050610c739190610cf7565b5090565b82805460018160011615610100020d166002900490600052602060002090601f016020900481019282601f10610cb857805160ff1916838001178555610ce6565b82800160010185558215610ce6579182015b82811115610ce5578251825591602001919060010190610cca565b5b509050610cf39190610cf7565b5090565b610d1991905b80821115610d15576000816000905550600101610cfd565b5090565b905600a165627a7a723058207e64cf7f86fd64f96ce828d71c0ed86832d178ab5f3e80a581b4f1016585e4780029';
var cAddr = '0xdf115ef871c25939e4489b718374390b990fbc66';
/* Don't modify */
var instance = null;
window.addEventListener('web3Ready', function() {
var contract = web3.ss.contract(abi);
instance = contract.at(cAddr);
reload();
});
var names = {
'Michael Yuan' : 'Second State',
'胡晓维' : 'Second State',
'Andy' : '火车头资本',
'鲍子绵' : ' ',
'曾善平' : '东创科技',
'柴甜甜' : '区投资促进局',
'巢中梁' : '杭州博行',
'陈彪' : '梆梆安全',
'陈晨' : '一墨(杭州)互动传媒有限公司',
'陈澄宇' : '幸福人寿',
'陈柯' : ' ',
'陈兰' : '园聚智谷',
'陈凌英' : '浦发银行',
'陈清华' : '泰矽微',
'陈书艺' : '白鹭',
'陈向红' : ' ',
'陈志云' : '杭州中恒电气股份有限公司',
'戴雪玲' : ' ',
'单东阳' : '半山街道办事处',
'单一' : '锌财经',
'丁金超' : '银杏谷资本',
'董强' : '德创能源',
'范瑾' : '未铭资本',
'方建业' : '丘比特',
'方武英' : '浙江广目企业管理有限公司',
'方赟' : '浙江省北大信息技术高等研究院',
'付煜成' : '杭州屯安科技有限公司',
'高彬' : '英孚康',
'高成龙' : '九成信息',
'高若阳' : '中信证券',
'高少龙' : '软体机器人',
'高小东' : '炒米科技',
'高智源' : ' MINIEYE',
'龚丹宁' : ' ',
'龚杰锋' : '神州云合',
'龚树钢' : '宁波双马',
'顾建东' : '杭州慧库信息技术有限公司',
'郭玮' : '亘存科技',
'韩云峰' : '小河街道办事处',
'郝翌' : '浦发银行',
'何昌杰' : ' ',
'何儒斯' : '云从科技',
'何松东' : '铂诺',
'何云' : '杭州弗莱德科技有限公司',
'贺京梅' : '东兴证券股份有限公司',
'侯玉梅' : '大观资本',
'胡金鑫' : '影创科技',
'胡克' : '比特币中国',
'胡炜' : '浙大网新集团',
'胡彦卿' : '安达富资本',
'胡舟' : '芯片超人',
'黄国纬' : '宁波座头鲸文化科技有限公司',
'黄金' : '首域科技(杭州)有限公司',
'黄明飞' : '开放智能',
'黄润聪' : '源星资本',
'黄兆京' : ' ',
'黄之皓' : '凯尔特创投',
'惠海涛' : '拱墅区人民政府',
'季金露' : '一墨(杭州)互动传媒有限公司',
'贾维剑' : '浙江秘银投资管理有限公司',
'简仁贤' : '竹间智能',
'江玲霞' : '康桥街道办事处',
'姜飞' : '宁波双马',
'姜伟' : '景行创服',
'蒋万诺' : '湖墅街道办事处',
'蒋欣霖' : '舜宇V基金',
'揭兴飞' : '光通天下',
'金虹冶' : '汉理资本',
'金华月' : '杭州共链科技有限公司',
'金灵敏' : ' ',
'景爱军' : '景行创服(杭州)网络科技有限公司',
'兰婷' : '杭州九幽雀投资管理有限公司',
'乐元' : '汉理资本',
'雷濛' : '木链科技',
'黎力' : '墨迹天气',
'李德贞' : '龙岩经发集团',
'李东锦' : ' ',
'李峰' : '小步网络',
'李海波' : '喜马拉雅FM',
'李江' : '新浚资本',
'李杰' : '校宝在线',
'李雷' : '网化/智化',
'李林喆' : '盈动资本',
'李明豪' : '大心电子',
'李卿' : ' ',
'李肖婧' : '区投资促进局',
'李啸' : '彤沁创投',
'李旭鹏' : '浙商创投',
'李亚非' : '深交所',
'李元蓁' : ' ',
'李占猛' : '汉理资本',
'李昭' : '赛马资本',
'厉炳先' : '游艇杂志',
'梁式纯' : '银江资本',
'梁天祥' : 'Lyndon Capital',
'林慧' : ' ',
'林三瑜' : ' ',
'林振清' : '浙江潮达科技有限公司',
'刘百奇' : '星河动力',
'刘波' : '涵越科技',
'刘强' : '36kr',
'刘澍泉' : 'DeepMap',
'刘旭' : '财信金控集团财富证券基金服务部',
'刘烨来' : '凯尔特创投',
'柳静' : '幸福人寿',
'卢斌' : ' ',
'陆明富' : ' ',
'陆一峰' : '信雅达',
'罗敏翔' : '区科技局',
'吕剑清' : '杭州立元创业投资股份有限公司',
'吕昕' : '北大研究院',
'马杜' : '华云数据',
'马金花' : ' ',
'马千里' : '巴比特',
'满坤' : '安创资本',
'毛颖欣' : ' ',
'木明仙' : ' ',
'木妮雅' : ' ',
'纳兰玹' : '同家资本',
'倪黎玮' : '拱宸桥办事处',
'潘颉炜' : '栈略信息',
'潘伟光' : '恒生银行(中国)有限公司',
'彭彬' : ' ',
'钱云龙' : '火柴头',
'樵攀' : '浙商创投',
'秦霞' : '民生银行解放支行',
'全李彬' : '杭州罗赛塔信息科技有限公司',
'冉旭' : '启舰科技',
'茹恒' : ' ',
'汝爱峰' : '杭州绿厨网络集团有限公司',
'阮小龙' : '杭州银行科技文创金融事业部',
'阮志敏' : '飞致云',
'邵宏坚' : '浙江微天下信息科技股份有限公司',
'沈晓音' : '杭摩新材料集团股份有限公司',
'施洋' : '深交所',
'石勇' : '星云互联',
'史高阳' : ' ',
'舒宇航' : '凯银投资',
'舒子振' : '超凡股份',
'苏道仙' : 'BlockFund',
'苏德余' : ' ',
'苏德余' : '创领集团',
'苏亮亮' : '宇泛智能',
'苏绮杨' : 'CyberMiles',
'苏婷' : '中新社',
'苏旭云' : ' ',
'苏义仁' : ' ',
'苏义仁' : '杭州珂俪维生物科技有限公司',
'苏渊' : ' ',
'苏忠合' : ' ',
'孙向红' : ' ',
'孙晓瑶' : '杭开集团',
'孙一乔' : '悉之教育',
'谈恩峰' : '熊猫资本',
'唐佳' : '创业邦',
'唐林芳' : ' ',
'陶佳木' : 'Shaka VC',
'屠勇刚' : '嘉兴市财政局数字财政管理服务中心',
'汪倩群' : ' ',
'王军' : '祥符街道办事处',
'王爱东' : ' ',
'王常辉' : '找钢网',
'王飞尧' : '浙江品利股权投资基金管理有限公司',
'王国伟' : '芯石器',
'王虹' : '全景网',
'王惠才' : '杭州联合银行',
'王慧慧' : '相芯科技/美戴',
'王捷' : '锦翼投资',
'王珂' : '歌斐资产',
'王柯' : '同家资本',
'王李华' : '宁波梅山保税港区九剑资产管理有限公司',
'王玲' : '浙江华裕投资',
'王敏娜' : '超腾能源',
'王琪' : ' ',
'王绍迪' : '知存科技',
'王威鹏' : '浙江小牛哥整家互联网科技有限公司',
'王卫华' : '杭州亿脑创新工场有限公司',
'王武平' : '云巴科技',
'王晓龙' : ' ',
'王新玲' : '华云数据',
'王燕飞' : '锦天城',
'王志刚' : '北京金禾投资',
'王竺慧' : '浙江滕华资产管理有限公司',
'吴刚' : ' ',
'吴灏哲' : '浦发银行杭州分行',
'吴维丽' : '大关街道办事处',
'吴谢良' : '赛富投资基金',
'吴阳恒' : '海汇投资',
'吴志刚' : '栈略信息',
'夏晓亮' : '芯耘光电',
'向昶宇' : '木链科技',
'项雷' : '浙商证券',
'项亦斌' : '杭州投资发展有限公司',
'谢璐' : '区投资促进局投资服务促进中心',
'谢小丽' : ' ',
'徐崇表' : ' ',
'邢小四' : '运河财富小镇管委会',
'熊海峰' : '泰矽微',
'徐崇表' : ' ',
'徐涵' : '圣奥集团',
'徐薇' : '浙大网新',
'许春铮' : '眯客',
'闫海龙' : '天下贷',
'严超杰' : ' ',
'严超杰' : '个人投资者',
'杨恩潮' : '浙江小牛哥整家互联网科技有限公司',
'杨湖德' : '伊豆饰品',
'杨杰' : '欧美思',
'杨景' : '懒猫',
'杨莉' : '毕马威',
'杨烈生' : '杭电股份',
'杨荣' : ' ',
'姚宏' : '美融创商贸',
'奕琴' : '上塘街道办事处',
'尹江' : ' ',
'游思丹' : '睿趣资本',
'于胜浩' : '浙江创信商业管理有限公司',
'余玲兵' : '宋小菜',
'虞翀' : '区投资促进局',
'袁初成' : '缔安科技',
'岳丽丽' : '创业邦',
'詹磊' : ' ',
'詹忆' : '浙江沪杭甬高速公路股份有限公司',
'占晓芳' : '杭摩新材料集团股份有限公司',
'张超' : '达摩家族办公室',
'张弛' : '湖畔山南',
'张飞' : '弘颐资产',
'张丰毅' : '深交所',
'张弘捷' : ' ',
'张慧琴' : '区科技工业功能区管委会',
'张佳洪' : ' ',
'张骊' : ' ',
'张蔓' : '华兴资本',
'张天曧' : '杭州高科技融资担保有限公司',
'张文强' : '机慧科技',
'张小龙' : '兴富资本',
'张兴' : '杭州夏果投资',
'张旭东' : '卡得万利',
'张易' : '毕马威',
'张毅' : '星云互联',
'张振炜' : '中国建筑',
'章晓佳' : '区投资促进局招商中心',
'赵秉' : '和睦街道办事处',
'赵毅' : '米市巷办事处',
'赵辰' : '竹间智能',
'郑昌勇' : '拱墅区区府办',
'郑楚明' : '启舰科技',
'郑丁' : '华道创投',
'郑格' : '杭州东方嘉富资产管理有限公司',
'郑奇' : '安丰创业投资有限公司',
'郑晓亮' : '浙江信诚资产管理有限公司',
'郑照临' : '东方嘉富',
'周干植' : '华睿投资',
'周俊临' : '数之联',
'周骐' : '浙江光通通信工程有限公司',
'周涛' : '数之联',
'周燕青' : '杭州城投',
'周紫霞' : '天下货',
'朱鸿鹄' : ' ',
'朱鸿鹄' : '余杭金控',
'朱令群' : '杭州博海汇金资产管理有限公司',
'朱鹏翀' : '栈略信息',
'祝洁炜' : '每日商报',
'章昕' : '普华资本',
'吴晓丰' : '普华资本',
'钟南海' : '普华资本',
'卢泰至' : '普华资本'
};
var meals = [
'苏绮杨',
'Michael Yuan',
'胡晓维',
'章昕',
'吴晓丰',
'钟南海'
];
function reload() {
var greeting = "";
var success = "";
instance.getGreeting(function (e, r) {
greeting = r[0];
success = r[1];
$("#greeting").html(greeting);
});
$("#formSubmitted").css("display", "none");
$("#me").css("display", "none");
web3.ss.getAccounts(function (e, address) {
if (!e) {
instance.getCheckin(address, function (ee, result) {
if (result[0]) {
$("#greeting").html(success);
$("#greeting").css("font-size", "14px");
$("#form").css("display", "none");
$("#me").css("display", "block");
$("#myname").html(result[0]);
if (meals.indexOf(result[0]) != -1) {
$("#meal").css("display", "block");
}
}
});
var checkins = "";
instance.getAddrs(function (ee, addrs) {
addrs.forEach(function(addr) {
instance.getCheckin(addr, function (ee, r) {
if (!ee) {
var content = $("#checkins").html();
if (content.indexOf(r[0])!==-1 && content.indexOf(r[1])!==-1) {
// skip
} else {
checkins = "<tr><td>" + r[0] + "</td><td>" + r[1] + "</td></tr>" + checkins;
$("#checkins").html(checkins);
}
}
});
});
});
$("#checkins").html(checkins);
}
});
}
$("#submit").click(function() {
var n = $("#name").val().trim();
var o = names[n];
if (!o) {
o = " ";
}
if (!n) {
alert("请输入姓名");
return false;
}
web3.ss.getAccounts(function (e, address) {
if (!e) {
if (confirm("确认签到 " + n + " [" + o + "]")) {
$("#formSubmitted").css("display", "block");
instance.addCheckin (n, o, {
gas: 499000,
gasPrice: 0
}, function (ee, r) {
if (ee) {
window.alert("Failed at " + address);
}
});
setTimeout(function () {
reload ();
}, 20 * 1000);
}
}
});
return false;
});
</script>
</body>
</html>