This commit is contained in:
parent
b7117e1cae
commit
faf0f545a8
|
@ -7,6 +7,12 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
function setEvents() {
|
||||
const heartEl = document.querySelector('body > h1 > span')
|
||||
heartEl.addEventListener('click', function() {
|
||||
const key = prompt('Introduce la clave');
|
||||
localStorage.setItem('vnKey', key);
|
||||
});
|
||||
|
||||
$(".btnnum").on("click", function () {
|
||||
pin += parseInt($(this).children().html());
|
||||
$("#txtPin").text(pin);
|
||||
|
@ -26,6 +32,7 @@ function setEvents() {
|
|||
}, 200);
|
||||
$(".loading").fadeOut(200);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function login() {
|
||||
|
|
|
@ -19,6 +19,11 @@ function printError(msg){
|
|||
$.ajaxPrefilter(function(xhr) {
|
||||
var orgErrorHandler = xhr.error;
|
||||
|
||||
var key = localStorage.getItem('vnKey');
|
||||
if(key){
|
||||
xhr.jsonData.push(key)
|
||||
}
|
||||
|
||||
Object.assign(xhr, {
|
||||
url: `${urlBase}/workerTimeControl/${xhr.urlPath}`,
|
||||
headers: {
|
||||
|
|
Loading…
Reference in New Issue