Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sportsschoolserver
Overview
Overview
Details
Activity
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
node_server
sportsschoolserver
Commits
fe5676ca
Commit
fe5676ca
authored
Nov 09, 2021
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
9b5b582b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
6 deletions
+55
-6
xsxxfx.ts
src/biz/xsxxfx.ts
+53
-4
xsxxfxData.ts
src/data/xsxxfxData.ts
+2
-2
No files found.
src/biz/xsxxfx.ts
View file @
fe5676ca
...
...
@@ -22,10 +22,11 @@ export async function getData(req, res) {
ret
[
"bsjbxx"
]
=
bsjbxxInfo
[
"基本信息"
];
ret
[
"videourl"
]
=
bsjbxxInfo
[
"url"
];
let
{
attackData
,
defenceData
,
stationData
}
=
await
get
右侧数据
(
mid
);
let
{
attackData
,
defenceData
,
selfHeat
,
opponentHeat
}
=
await
右侧数据
(
mid
);
ret
[
"attack"
]
=
attackData
;
ret
[
"defence"
]
=
defenceData
;
ret
[
"station"
]
=
stationData
;
ret
[
"selfheat"
]
=
selfHeat
;
ret
[
"opponentheat"
]
=
opponentHeat
;
let
chartData
=
await
图表分析数据
(
mid
,
1
,
1
);
ret
[
"leftpower"
]
=
chartData
[
"左侧爆发能量"
];
...
...
@@ -34,6 +35,8 @@ export async function getData(req, res) {
ret
[
"rightspeed"
]
=
chartData
[
"右侧球移动速度"
];
ret
[
"drop"
]
=
chartData
[
"散点数据"
];
ret
[
"point"
]
=
await
比赛时间节点
(
mid
);
res
.
send
(
ret
);
}
...
...
@@ -53,10 +56,11 @@ export async function getbsglxq(req, res) {
ret
[
"bsjbxx"
]
=
bsjbxxInfo
[
"基本信息"
];
ret
[
"videourl"
]
=
bsjbxxInfo
[
"url"
];
let
{
attackData
,
defenceData
,
stationData
}
=
await
get
右侧数据
(
mid
);
let
{
attackData
,
defenceData
,
selfHeat
,
opponentHeat
}
=
await
右侧数据
(
mid
);
ret
[
"attack"
]
=
attackData
;
ret
[
"defence"
]
=
defenceData
;
ret
[
"station"
]
=
stationData
;
ret
[
"selfheat"
]
=
selfHeat
;
ret
[
"opponentheat"
]
=
opponentHeat
;
let
chartData
=
await
图表分析数据
(
mid
,
1
,
1
);
ret
[
"leftpower"
]
=
chartData
[
"左侧爆发能量"
];
...
...
@@ -64,6 +68,9 @@ export async function getbsglxq(req, res) {
ret
[
"leftspeed"
]
=
chartData
[
"左侧球移动速度"
];
ret
[
"rightspeed"
]
=
chartData
[
"右侧球移动速度"
];
ret
[
"drop"
]
=
chartData
[
"散点数据"
];
ret
[
"point"
]
=
await
比赛时间节点
(
mid
);
res
.
send
(
ret
);
}
...
...
@@ -117,3 +124,44 @@ async function 图表分析数据(mid, rid, gid) {
"散点数据"
:
散点数据
}
}
async
function
比赛时间节点
(
mid
)
{
let
pointData
=
await
get
单前比赛对局时间节点
(
mid
);
return
pointData
;
}
enum
areaEnum
{
左近区
=
1
,
右近区
,
中近区
,
中区
,
左边区
,
右边区
,
中底区
,
左底区
,
右底区
}
enum
heatAreaEnum
{
外
=
1
,
中
,
里
}
async
function
右侧数据
(
mid
)
{
let
{
attackData
,
defenceData
,
stationData
}
=
await
get
右侧数据
(
mid
);
attackData
.
sort
(
(
a
,
b
)
=>
{
return
a
.
area
-
b
.
area
}
);
defenceData
.
sort
(
(
a
,
b
)
=>
{
return
a
.
area
-
b
.
area
}
);
let
selfHeat
=
[];
let
opponentHeat
=
[];
stationData
.
forEach
(
info
=>
{
let
{
area
,
self
,
opponent
}
=
info
;
selfHeat
.
push
({
key
:
area
,
value
:
self
});
opponentHeat
.
push
({
key
:
area
,
value
:
opponent
});
});
selfHeat
.
sort
(
(
a
,
b
)
=>
{
return
a
.
key
-
b
.
key
});
opponentHeat
.
sort
(
(
a
,
b
)
=>
{
return
b
.
key
-
a
.
key
});
return
{
attackData
,
defenceData
,
selfHeat
,
opponentHeat
};
}
\ No newline at end of file
src/data/xsxxfxData.ts
View file @
fe5676ca
...
...
@@ -188,11 +188,11 @@ export async function get右侧数据(mid) {
let
{
AREA_ID
,
ATTACK
,
DEFENSE
}
=
info
;
attackData
.
push
({
area
:
AREA_ID
,
attack
:
ATTACK
,
value
:
ATTACK
,
});
defenceData
.
push
({
area
:
AREA_ID
,
defens
e
:
DEFENSE
valu
e
:
DEFENSE
});
});
...
...
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