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
a77fc531
Commit
a77fc531
authored
Nov 10, 2021
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
02207e7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
xsxxfx.ts
src/biz/xsxxfx.ts
+5
-1
xsxxfxData.ts
src/data/xsxxfxData.ts
+9
-4
No files found.
src/biz/xsxxfx.ts
View file @
a77fc531
import
{
info
}
from
"console"
;
import
{
get
选手详细分析
}
from
"../data/analysisData"
;
import
{
getBaseData
,
get
全部比赛日期
,
get
单前比赛对局时间节点
,
get
右侧数据
,
get
图表
,
get
散点图
,
get
比赛详情
,
get
近期比赛概览
}
from
"../data/xsxxfxData"
;
import
{
getBaseData
,
get
上个赛季排名
,
get
全部比赛日期
,
get
单前比赛对局时间节点
,
get
右侧数据
,
get
图表
,
get
散点图
,
get
比赛详情
,
get
近期比赛概览
}
from
"../data/xsxxfxData"
;
import
{
getChartData
,
objKeyReplace
,
getKeyValue
,
getSingleYAndMoreData
,
getListData
,
getMoreYChartData
,
getKeyStringValue
}
from
"../util/tools"
;
export
async
function
getData
(
req
,
res
)
{
...
...
@@ -9,6 +9,10 @@ export async function getData(req, res) {
pid
=
parseInt
(
pid
);
let
baseInfo
:
any
=
await
getBaseData
(
pid
);
let
thisRank
=
baseInfo
[
"基础信息"
][
"排名"
];
let
rankType
=
await
get
上个赛季排名
(
pid
,
thisRank
);
baseInfo
[
"基础信息"
][
"type"
]
=
`
${
rankType
}
`
;
ret
[
"base1"
]
=
getKeyStringValue
(
"基础信息"
,
baseInfo
[
"基础信息"
]
);
ret
[
"base2"
]
=
getKeyStringValue
(
"技术特点评分"
,
baseInfo
[
"击球信息"
]
);
...
...
src/data/xsxxfxData.ts
View file @
a77fc531
...
...
@@ -273,6 +273,11 @@ export async function get右侧数据(mid) {
return
{
attackData
,
defenceData
,
stationData
};
}
\ No newline at end of file
export
async
function
get
上个赛季排名
(
pid
,
thisRank
)
{
//todo 测试
let
random
=
Math
.
ceil
(
Math
.
random
()
*
100
);
if
(
random
<
30
)
return
-
1
;
if
(
random
<
60
)
return
0
;
return
1
;
}
\ No newline at end of file
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