From ecd76e6c58a1805075a70965b98d70eb13dd68e6 Mon Sep 17 00:00:00 2001 From: dongpd Date: Wed, 9 Dec 2020 11:54:10 +0700 Subject: [PATCH] =?UTF-8?q?fix=20bug=20=C4=91=E1=BB=93ng=20b=E1=BB=99=20d?= =?UTF-8?q?=E1=BB=AF=20li=E1=BB=87u?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/params.php | 2 +- web/js/device.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/config/params.php b/config/params.php index 388c0d20..a2b3c55b 100644 --- a/config/params.php +++ b/config/params.php @@ -3,7 +3,7 @@ return [ "hideInfomation" => false, "TCTECH" => true, - "CardService" => "192.168.1.245:2001", + "CardService" => "192.168.1.244:2001", "ServerIP" => "192.168.1.244:4004", "dataPath" => "AC/", "time" => 1623171599, diff --git a/web/js/device.js b/web/js/device.js index e83e0f2d..c6fd0a17 100644 --- a/web/js/device.js +++ b/web/js/device.js @@ -365,10 +365,14 @@ function syncStaffs(device_id, device_ip, page, fullData) { data: device_id }, success: function (data) { - appendLogs("[" + data.IP + "] Đồng bộ dữ liệu " + data.staff + " nhân viên từ " + data.from + " đến " + data.to + " tới thiết bị", "green", "check"); - processProgress(secondIncrement); - currentPage++; - if (currentPage <= totalPage) + if (totalPage == 0) + appendLogs("[" + data.IP + "] Không có dữ liệu nhân viên đồng bộ tới thiết bị", "orange", "info-circle"); + else { + appendLogs("[" + data.IP + "] Đồng bộ dữ liệu " + data.staff + " nhân viên từ " + data.from + " đến " + data.to + " tới thiết bị", "green", "check"); + processProgress(secondIncrement); + currentPage++; + } + if (totalPage > 0 && currentPage <= totalPage) syncStaffs(device_id, device_ip, currentPage, fullData); else { currentPage = 1;