Commit a77fc531 by lixinming

no message

parent 02207e7b
import { info } from "console"; import { info } from "console";
import { get选手详细分析 } from "../data/analysisData"; 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"; import { getChartData, objKeyReplace, getKeyValue, getSingleYAndMoreData, getListData, getMoreYChartData, getKeyStringValue } from "../util/tools";
export async function getData(req, res) { export async function getData(req, res) {
...@@ -9,6 +9,10 @@ export async function getData(req, res) { ...@@ -9,6 +9,10 @@ export async function getData(req, res) {
pid = parseInt(pid); pid = parseInt(pid);
let baseInfo:any = await getBaseData(pid); let baseInfo:any = await getBaseData(pid);
let thisRank = baseInfo["基础信息"]["排名"];
let rankType = await get上个赛季排名(pid, thisRank);
baseInfo["基础信息"]["type"] = `${rankType}`;
ret["base1"] = getKeyStringValue("基础信息", baseInfo["基础信息"] ); ret["base1"] = getKeyStringValue("基础信息", baseInfo["基础信息"] );
ret["base2"] = getKeyStringValue("技术特点评分", baseInfo["击球信息"] ); ret["base2"] = getKeyStringValue("技术特点评分", baseInfo["击球信息"] );
......
...@@ -273,6 +273,11 @@ export async function get右侧数据(mid) { ...@@ -273,6 +273,11 @@ export async function get右侧数据(mid) {
return {attackData, defenceData, stationData}; return {attackData, defenceData, stationData};
} }
export async function get上个赛季排名(pid, thisRank) {
//todo 测试
let random = Math.ceil(Math.random() * 100);
\ No newline at end of file if (random < 30 ) return -1;
if (random < 60 ) return 0;
return 1;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment