-
Notifications
You must be signed in to change notification settings - Fork 3
/
plays.html
453 lines (358 loc) · 13.7 KB
/
plays.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
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<!DOCTYPE html>
<html>
<head>
<title>World Cup 2018</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/intro.css" rel='stylesheet' type='text/css' />
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="js/d3.v4.min.js"></script>
<script type="text/javascript" src="./dist/nebulas.js"></script>
<script type="text/javascript" src="./js/playdata.js"></script>
<script type="text/javascript" src="./js/bootpopup.min.js"></script>
<script type="text/javascript" src="./js/time.js"></script>
<script type="text/javascript" src="./dist/nebPay.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<style type="text/css">
body {
background-image: url(images/background.jpg);
background-repeat: repeat-y;
background-size: 100%;
color: white;
height: 200%
}
/*li{
} */
.active a {
border: 4px solid #F7E65E !important
}
#top {
position: absolute;
top: 0;
left: 0px;
height: 80px;
width: 100%;
/* background: blue;*/
}
#buttom {
position: absolute;
top: 80px;
left: 0px;
height: calc(100% - 80px);
width: 100%;
/*background: red;*/
}
#container {
position: absolute;
top: 0px;
left: 5%;
height: 100%;
width: 90%;
opacity: 0.9;
z-index: 100;
/*background: linear-gradient(#F7E65E,#89540d60);
/*background: #F0D779;*/
/*opacity: 0.7;*/
/* */
}
#container1 {
position: absolute;
top: 0px;
left: 0;
height: 80px;
width: 100%;
background: url(images/card_profile_top.png) no-repeat;
background-size: 100%;
float: left;
}
#container2 {
position: absolute;
top: 80px;
left: 0;
height: auto;
background: url(images/card_profile.png) repeat-y;
background-size: 100%;
width: 100%;
z-index: 100;
float: left;
/*background: red;*/
/*top,url(images/card_profile_end.png) no-repeat bottom,*/
}
#maincontainer {
top: 0px;
left: 20px;
height: auto;
border-right: 2px solid grey;
margin-left: 20px;
margin-right: 20px;
width: calc(100% - 40px);
;
float: left;
/*background: red;*/
/*top,url(images/card_profile_end.png) no-repeat bottom,*/
}
.guojia {
height: auto;
width: 100%;
float: left;
}
#container3 {
position: absolute;
bottom: 0px;
width: 100%;
float: left;
left: 0px;
height: 40px;
/* background:url(images/card_profile_end.png) no-repeat bottom;*/
background-size: 100%;
}
.country {
border-top: 2px solid grey;
border-left: 2px solid grey;
border-bottom: 1px solid grey;
height: 40px;
width: 100%;
cursor: pointer;
/*background:url(images/check.png) no-repeat bottom;
background-size: 7%;*/
float: left;
}
.guoqi {
left: 0px;
height: 100%;
width: 100px;
cursor: pointer;
background-size: 70%;
float: left;
}
.duijiang {
left: 800px;
height: 100%;
width: 100px;
cursor: pointer;
background: url(images/check.png) no-repeat bottom;
background-size: 70%;
float: right;
}
.duijiangmiss {
left: 800px;
height: 100%;
width: 100px;
cursor: pointer;
background: url(images/checkmiss.png) no-repeat bottom;
background-size: 70%;
float: right;
}
.country-detail {
height: auto;
width: 100%;
float: left;
}
.card-items {
width: 100%;
height: auto;
float: left;
}
.items {
height: 160px;
width: 110px;
/*display:inline*/
float: left;
border: 1px solid grey ;
}
.picture {
height: 110px;
width: 110px;
text-align: center;
}
.name {
height: 20px;
width: 110px;
font-size: 8px;
text-align: center;
/*水平居中*/
line-height: 20px;
/*行距设为与div高度一致*/
}
.button {
height: 30px;
width: 110px;
background: url(images/sale.png) no-repeat bottom;
background-size: 70%;
cursor: pointer;
}
#card-price {
position: absolute;
top: 200px;
left: 0;
height: 20px;
width: 100%;
text-align: center;
/*水平居中*/
line-height: 20px;
/*行距设为与div高度一致*/
}
#card-bottom {
position: absolute;
top: 230px;
left: 0;
height: 50px;
width: 100%;
background: url(images/btn.png) no-repeat bottom;
background-size: 80%;
}
</style>
</head>
<script>
</script>
<body>
<div class="modal fade show" id="helpModal" tabindex="-1" role="dialog" style="display: none;">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>在PC上使用本应用需要使用Chrome浏览器安装
<a target="_blank" href="https://github.com/ChengOrangeJu/WebExtensionWallet">WebExtensionWallet</a>插件。 手机端暂不支持,正在完善中。</p>
<hr>
<p><strong>游戏玩法说明:</strong></p>
<ul>
<li>所有玩家的球星卡片和交易都记录在区块链上,可在<a target="_blank" href="https://explorer.nebulas.io/#/tx/0c5fd8871c9d7466c0786691bbedbd36c53b2656f3c5a2f64ae994b0420596b9">合约详情</a>上查看。</li>
<li>本次共选出本届世界杯八个热门球队,每个球队11位球星,每个球队选择一个超级球星为稀有卡片,可在球星图鉴中查询。</li>
<li>玩家第一次登录系统时,免费赠送5张球星卡,每抽一张卡片消费0.05NAS,可以选择每次抽一张、五张、十张。</li>
<li>玩家所有的卡片,都展示在我的卡片中,当集齐一个球队的所有球星时,可以发起兑换,目前兑换奖金为2nas,该奖金会随着系统售卡总金额的增加而增加。</li>
<li>玩家可以把自己多余的卡片放到商店中出售,一旦选择出售卡片,不可以取消出售,商店卡片交易费为10%,自动从卖家收款中扣除。</li>
</ul>
<hr>
<p><strong>星云足球说明:</strong></p>
<ul>
<li>所有玩家的球星卡片和交易都记录在区块链上,可在<a target="_blank" href="https://explorer.nebulas.io/#/tx/0c5fd8871c9d7466c0786691bbedbd36c53b2656f3c5a2f64ae994b0420596b9">合约详情</a>上查看。</li>
<li>星云足球是在校大学生区块链兴趣小组合作开发出的第一款区块链游戏,游戏顺应当前世界杯热门。</li>
<li>游戏初期玩法简单,玩家可以通过抽卡,然后卖卡或者兑奖收益,游戏采用基于星云链的区块链智能合约技术,保障每位玩家的数字资产的安全、可信。</li>
<li>后期游戏玩法将会更加丰富,玩家可以将自己抽取的球星卡,组建球队,与合约上的玩家进行比赛,获胜的玩家会获取奖励。</li>
</ul>
<hr>
<strong>星云足球玩家微信交流群(如果有任何疑问和建议,欢迎进群交流):</strong>
<img style="width: 90px; left: 50px; border:2.5px solid darkred;" src="./images/weixin.jpeg" />
<p></p>
</div>
</div>
</div>
</div>
<div id="top">
<div id='timeCount'>
</div>
<!--container-->
<div class="container">
<div class="top-header">
<div class="logo" style="left:100px">
<a href="index.html">
<img style="height:60px" src="images/logo.png" />
</a>
</div>
<div class="menu">
<ul class="nav" id="nav">
<li>
<a href="./index.html">首页</a>
</li>
<li>
<a href="./me.html">我的卡片</a>
</li>
<li>
<a href="./store.html">商店</a>
</li>
<li class="active">
<a href="./plays.html">球星图鉴</a>
</li>
<li><a class="nav-item nav-link" data-toggle="modal" id="open" data-target="#helpModal" href="javascript:;">玩法说明</a></li>
</ul>
</div>
<!-- <div class="clearfix"> </div> -->
</div>
</div>
<!--container-->
</div>
<div id="buttom">
<div id="container">
<div id="container1">
</div>
<div id="container2">
<div id="maincontainer">
</div>
</div>
<div id="container3">
</div>
</div>
</div>
</body>
<script type="text/javascript">
var cardWidth = ($("#container2").width()-44)/11
var data = awsomedata
teamlistdic = { "4704": 1, '4698': 3, '4481': 7, '4819': 6, '4748': 4, '4711': 5, '4694': 2, '4717': 8 }
xiyou = ["750","39433","85859","12994","124712","26502","167855","70996"]
var countryDict={};
var items =[];
for (card_id in data) {
var item = data[card_id]
if (!countryDict[item['teamname']])
countryDict[item['teamname']] = {}
countryDict[item['teamname']][item['playername']] = { 'name': item['playername'], 'PlaceImgUrl': String(item['photo']), 'teamid': item['team_id'],'card_id':item['player_id'] }
}
console.log(countryDict)
for (var country in countryDict) {
//console.log(country)
var record = []
for (var name in countryDict[country]) {
record.push(countryDict[country][name])
}
items.push({ 'country': country, 'card': record })
}
var html = "";
var idbase = 1;
items.forEach(function (item) {
html += "<div id='guojia1' class='guojia'><div class='card-items'><div class='country'>" + item.country + "<div class='guoqi' style='background-image: url(images/" + item.country + ".png);background-repeat: no-repeat; background-size: 40%;'></div></div>"
item['card'].forEach(function (d) {
//console.log(d.PlaceImgUrl)
//console.log(d)
d.id = idbase;
idbase += 1;
if(xiyou.indexOf(d.card_id )>-1)
html += "<div class='items' style='border-bottom: 2px solid yellow ;'><div class='picture' style='background-image: url(" + d.PlaceImgUrl + ");background-repeat: no=repeat; background-size: 100%;'></div><div class='name'><svg style='width: 100%;height: 100%'><text x='55' y='15' font-size='9' fill='yellow' text-anchor='middle'>"+d.name+"</text><text x='105' y='15' fill='#33CCCC' text-anchor='end'>稀有</text></svg></div></div>"
else
html += "<div class='items'><div class='picture' style='background-image: url(" + d.PlaceImgUrl + ");background-repeat: no=repeat; background-size: 100%;'></div><div class='name'><svg style='width: 100%;height: 100%'><text x='55' y='15' fill='white' text-anchor='middle'>" +
d.name + "</text></svg></div></div>"
})
html += "</div></div>"
$(document).ready(function () {
$('.items').css('width', cardWidth)
$('.items').css('height', 25+cardWidth)
$('.picture').css('height', cardWidth)
$('.picture').css('width', cardWidth)
$('.name').css('width', cardWidth)
$('.button').css('width', cardWidth)
$('.picture').css('width', cardWidth)
$('svg > text:nth-child(1)').attr('x', cardWidth/2-10)
$('svg > text:nth-child(2)').attr('x', cardWidth-5 )
});
})
$('#maincontainer').html(html)
$("#open").click(function(d){
$("#helpModal").css('display', 'block')
})
$('.close').click(function(d){
$("#helpModal").css('display', 'none')
})
$(document).ready(function () {
if($("body").width()<1100){
$('.logo img').css("height", 40)
$(".menu li").css("margin", "0px 0px 0px")
$(".container").css('padding-top', '1em')
$('.menu').css('float', 'none')
$(".menu").css('padding-top', '1em')
}
});
</script>
</html>