parent
559842d2a6
commit
c930d87900
@ -67,21 +67,17 @@
|
|||||||
headers: { Authorization: "Bearer " + $apikey },
|
headers: { Authorization: "Bearer " + $apikey },
|
||||||
data: { card, station: JSON.parse($stationinfo).id },
|
data: { card, station: JSON.parse($stationinfo).id },
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then((response) => {
|
||||||
console.log(response.data);
|
console.log(response.data.runner);
|
||||||
// ------------------------
|
lastscan_totaldistance = response.data.runner.distance + "m";
|
||||||
console.log(card);
|
const time = new Date();
|
||||||
lastscan_totaldistance = "?m";
|
|
||||||
let time = new Date();
|
|
||||||
const hours = (time.getHours() + "").padStart(2, "0");
|
const hours = (time.getHours() + "").padStart(2, "0");
|
||||||
const minutes = (time.getMinutes() + "").padStart(2, "0");
|
const minutes = (time.getMinutes() + "").padStart(2, "0");
|
||||||
const seconds = (time.getSeconds() + "").padStart(2, "0");
|
const seconds = (time.getSeconds() + "").padStart(2, "0");
|
||||||
lastscan_time = hours + ":" + minutes + ":" + seconds;
|
lastscan_time = hours + ":" + minutes + ":" + seconds;
|
||||||
lastscan_laptime = response.data.lapTime + "s";
|
lastscan_laptime = response.data.lapTime + "s";
|
||||||
// ------------------------
|
|
||||||
})
|
})
|
||||||
.catch(function (e) {
|
.catch((e) => {
|
||||||
console.log(e.response);
|
|
||||||
lastscan_error = e.response.data.message;
|
lastscan_error = e.response.data.message;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user