Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
翁阳
babycare_xiaoxiao
Commits
789514fd
Commit
789514fd
authored
Oct 07, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
task
parent
4d9b4813
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10639 additions
and
561 deletions
+10639
-561
workspace.xml
.idea/workspace.xml
+47
-39
aaa.html
aaa.html
+0
-201
popmartXXL2c.getActivityBaseInfoById.json
mock/miniTb/popmartXXL2c.getActivityBaseInfoById.json
+37
-217
output.js
output.js
+121
-75
output.js.map
output.js.map
+1
-1
ResJson.ts
src/ResJson.ts
+10430
-27
MapScene.ts
src/scene/map/MapScene.ts
+3
-1
No files found.
.idea/workspace.xml
View file @
789514fd
This diff is collapsed.
Click to expand it.
aaa.html
deleted
100644 → 0
View file @
4d9b4813
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Chess
</title>
<meta
name=
"author"
content=
"还有醋v"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"full-screen"
content=
"true"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<meta
name=
"x5-fullscreen"
content=
"true"
/>
<meta
name=
"360-fullscreen"
content=
"true"
/>
<style>
*
{
margin
:
0
;
padding
:
0
;
}
body
{
background-color
:
#333
;
}
#container
{
text-align
:
center
;
position
:
absolute
;
top
:
50%
;
transform
:
translateY
(
-50%
);
left
:
0
;
right
:
0
;
margin
:
auto
;
}
.lattice
{
vertical-align
:
bottom
;
width
:
50px
;
height
:
50px
;
background-color
:
darkgreen
;
display
:
inline-block
;
border
:
1px
solid
whitesmoke
;
}
.disc
{
width
:
40px
;
height
:
40px
;
border-radius
:
20px
;
margin-top
:
5px
;
margin-left
:
5px
;
/*animation: scale 0.25s 1 ease-in-out;*/
}
@keyframes
scale
{
0
%
{
transform
:
scale
(
0
);
}
100
%
{
transform
:
scale
(
1
);
}
}
/*.disc-black {*/
/* background-color: black;*/
/*}*/
.disc-black
:after
{
content
:
''
;
display
:
block
;
width
:
40px
;
height
:
40px
;
margin-top
:
5px
;
margin-left
:
5px
;
background-color
:
black
;
border-radius
:
20px
;
}
.disc-white
:after
{
content
:
''
;
display
:
block
;
width
:
40px
;
height
:
40px
;
margin-top
:
5px
;
margin-left
:
5px
;
background-color
:
whitesmoke
;
border-radius
:
20px
;
}
</style>
</head>
<body>
<div
id=
"root"
></div>
<script>
let
board
=
[];
const
root
=
document
.
getElementById
(
'root'
);
let
color
=
1
;
// 1 黑 2 白
const
MAX_ROW
=
8
;
const
MAX_COL
=
8
;
function
initBoard
()
{
board
=
[
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
1
,
2
,
0
,
0
,
0
],
[
0
,
0
,
0
,
2
,
1
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
];
root
.
innerHTML
=
''
;
const
container
=
document
.
createElement
(
'div'
);
container
.
id
=
'container'
;
for
(
let
row
=
0
;
row
<
board
.
length
;
row
++
)
{
const
boardRow
=
board
[
row
];
for
(
let
col
=
0
;
col
<
boardRow
.
length
;
col
++
)
{
const
value
=
boardRow
[
col
];
const
lattice
=
document
.
createElement
(
'div'
);
lattice
.
row
=
row
;
lattice
.
col
=
col
;
lattice
.
classList
.
add
(
'lattice'
);
container
.
appendChild
(
lattice
);
if
(
value
===
1
||
value
===
2
)
{
lattice
.
classList
.
add
(
value
===
1
?
'disc-black'
:
'disc-white'
);
}
}
container
.
appendChild
(
document
.
createElement
(
'br'
));
}
root
.
appendChild
(
container
);
}
initBoard
();
root
.
addEventListener
(
'click'
,
(
e
)
=>
{
const
target
=
e
.
target
;
const
{
row
:
or
,
col
:
oc
}
=
target
;
let
{
row
,
col
}
=
target
;
let
canDrop
=
false
;
if
(
board
[
or
][
oc
]
!==
0
)
{
// 不可落子
console
.
warn
(
'有子了'
);
}
else
{
// 可落子
let
canRemove
=
false
;
while
(
--
row
>=
0
)
{
// 向上
if
(
board
[
row
][
col
]
===
color
)
{
// 同色
canDrop
=
false
;
canRemove
=
false
;
console
.
log
(
'相邻同色子'
)
}
else
if
(
board
[
row
][
col
]
===
3
-
color
)
{
// 不同色
}
}
}
});
// function render() {
// root.innerHTML = '';
// const container = document.createElement('div');
// container.id = 'container';
//
// for (let row = 0; row
<
board
.
length
;
row
++
)
{
// const boardRow = board[row];
// for (let col = 0; col
<
boardRow
.
length
;
col
++
)
{
// const value = boardRow[col];
// const lattice = document.createElement('div');
// lattice.classList.add('lattice');
// container.appendChild(lattice);
// if (value === 1 || value === 2) {
// lattice.classList.add(value === 1 ? 'disc-black' : 'disc-white');
// }
// }
// container.appendChild(document.createElement('br'));
// }
//
// container.addEventListener('click', (e) => {
// console.log(e);
//
//
// // lattice.addEventListener('click', (e) => {
// // console.log(row, col);
// // board[row][col] = color;
// // color = 3 - color;
// // render();
// // });
//
// });
//
// root.appendChild(container);
// }
</script>
</body>
</html>
mock/miniTb/popmartXXL2c.getActivityBaseInfoById.json
View file @
789514fd
{
"success"
:
true
,
"code"
:
"sit dolor quips"
,
"message"
:
"nisei amet sunt Lorem"
,
"code"
:
"000000"
,
"data"
:
{
"rule"
:
"测试活动规则测试活动规则测试活动规则测试活动规则测试活动规则测试活动规则测试"
,
"currentLevel"
:
120
,
"power"
:
101
,
"tools"
:
{
"steps"
:
100
,
"booms"
:
100
,
"hammers"
:
100
},
"records"
:
[
{
"score"
:
57340
,
"level"
:
107
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
61920
,
"level"
:
90
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
71960
,
"level"
:
30
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
33790
,
"level"
:
29
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
22440
,
"level"
:
28
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
61340
,
"level"
:
27
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
43200
,
"level"
:
26
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
35330
,
"level"
:
25
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
19030
,
"level"
:
24
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
10490
,
"level"
:
23
,
"isVisitSuccess"
:
true
,
"stars"
:
2
},
{
"score"
:
36280
,
"level"
:
22
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
164350
,
"level"
:
21
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
29280
,
"level"
:
20
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
51060
,
"level"
:
19
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
57090
,
"level"
:
18
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
40860
,
"level"
:
17
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
50350
,
"level"
:
16
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
46920
,
"level"
:
15
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
35630
,
"level"
:
14
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
48950
,
"level"
:
13
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
17990
,
"level"
:
12
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
42230
,
"level"
:
11
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
45420
,
"level"
:
10
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
27230
,
"level"
:
9
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
29620
,
"level"
:
8
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
31870
,
"level"
:
7
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
22810
,
"level"
:
6
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
28460
,
"level"
:
5
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
24440
,
"level"
:
4
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
9380
,
"level"
:
3
,
"isVisitSuccess"
:
true
,
"stars"
:
2
},
{
"score"
:
960
,
"level"
:
2
,
"isVisitSuccess"
:
true
,
"stars"
:
3
},
{
"score"
:
72080
,
"level"
:
1
,
"isVisitSuccess"
:
true
,
"stars"
:
3
}
],
"openId"
:
"AAFM1op4AMWgvWfIyaTlN0QC"
,
"rule"
:
"泡泡玛特测试游戏2,内部测试"
,
"updateTime"
:
1601379026121
,
"title"
:
"测试2"
,
"levelPrize"
:
{
"level50"
:
"https://img.alicdn.com/imgextra/i
1/2275046294/O1CN01xTeKMI1wMhRux48Y6_!!2275046294-2-miniprogram.pn
g"
,
"level1
00"
:
"https://img.alicdn.com/imgextra/i1/2275046294/O1CN01xTeKMI1wMhRux48Y6_!!2275046294-2-miniprogram.pn
g"
,
"level1
20"
:
"https://img.alicdn.com/imgextra/i1/2275046294/O1CN01xTeKMI1wMhRux48Y6_!!2275046294-2-miniprogram.pn
g"
"level50"
:
"https://img.alicdn.com/imgextra/i
3/2885348004/O1CN014VE1Sa28zsjd1q8HN_!!2885348004-0-miniprogram.jp
g"
,
"level1
20"
:
"https://img.alicdn.com/imgextra/i2/2885348004/O1CN01pfU3oP28zsjiRN9vs_!!2885348004-0-miniprogram.jp
g"
,
"level1
00"
:
"https://img.alicdn.com/imgextra/i4/2885348004/O1CN01kZN23Z28zsjkH7Ej6_!!2885348004-0-miniprogram.jp
g"
},
"prizes"
:
[
{
"receiveTime"
:
"2020/09/16"
,
"level"
:
1
,
"isReceive"
:
true
"createTime"
:
1601379026121
,
"deleteStatus"
:
1
,
"awardReceiveExpiredTime"
:
1602243209000
,
"startTime"
:
1601379209000
,
"_id"
:
"5f731ad1086e65a41b09fe22"
,
"endTime"
:
1661984009000
,
"openPrizeStatus"
:
1
,
"tasks"
:
{
"browseGoods"
:
{
"times"
:
3
,
"itemIds"
:
"619104333650,613930168360,626877183520"
,
"link"
:
""
,
"taskRateType"
:
1
,
"title"
:
""
,
"type"
:
""
,
"value"
:
""
},
"orderGoods"
:
{
"times"
:
3
,
"itemIds"
:
"623157072617,623772356959,619368430053"
,
"link"
:
""
,
"taskRateType"
:
1
,
"title"
:
""
,
"type"
:
""
,
"value"
:
""
}
],
"isFristLogin"
:
false
,
"loginAddPower"
:
false
}
}
}
,
"success"
:
true
,
"message"
:
"成功"
}
output.js
View file @
789514fd
This diff is collapsed.
Click to expand it.
output.js.map
View file @
789514fd
This diff is collapsed.
Click to expand it.
src/ResJson.ts
View file @
789514fd
This diff is collapsed.
Click to expand it.
src/scene/map/MapScene.ts
View file @
789514fd
...
...
@@ -134,7 +134,7 @@ export class MapScene extends Scene {
private
initMapByData
(
data
=
Tools
.
baseInfo
)
{
this
.
uiLayer
.
energyBox
.
count
=
Tools
.
propInfo
.
power
;
const
currentLevel
=
data
.
currentLevel
;
const
currentLevel
=
data
.
currentLevel
||
1
;
// 已经通关的
for
(
let
i
=
1
;
i
<
currentLevel
;
i
++
)
{
...
...
@@ -158,6 +158,8 @@ export class MapScene extends Scene {
}
// 闯关记录里有的
console
.
log
(
data
.
records
);
if
(
!
Array
.
isArray
(
data
.
records
))
data
.
records
=
[];
data
.
records
.
forEach
((
v
)
=>
{
MapScene
.
checkArr
[
v
.
level
].
data
=
v
;
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment