Commit fcc9822c by lixinming

no message

parent d51d07b9
......@@ -54,7 +54,7 @@ export async function get近期比赛概览(PID, checkDate) {
opponentPic:info.OPPONENT_PIC,
opponentScore,
oppenentName:info.OPPONENT_NAME,
pkTime:info.M_DATE,
pkTime:dataFormat(info.M_DATE),
result:matchResult,
mid:info.M_ID
});
......@@ -63,6 +63,19 @@ export async function get近期比赛概览(PID, checkDate) {
return result;
}
function dataFormat(time) {
let date = new Date(time);
let match = date.getMonth() + 1;
let matchStr = match > 9 ? `${match}` : `0${match}`;
let day = date.getMonth();
let dayStr = day > 9 ? `${day}` : `0${day}`;
let hours = date.getHours();
let hoursStr = hours > 9 ? `${hours}` : `0${hours}`;
let Minutes = date.getMinutes()
let MinutesStr = Minutes > 9 ? `${Minutes}` : `0${Minutes}`;
return `${matchStr}/${dayStr} ${hoursStr}:${MinutesStr}`;
}
export async function get比赛详情(mid) {
let sql = "select * from match_information where m_id = Placeholder1";
let subSql = "select m_date from recent_match where m_id = Placeholder1 "
......
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