You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

731 lines
35 KiB

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="cache-control"
content="max-age=0" />
<meta http-equiv="cache-control"
content="no-store" />
<meta http-equiv="expires"
content="-1" />
<meta http-equiv="expires"
content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma"
content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!--meta http-equiv="refresh" content="300" />--> <!--Refresh each 5s-->
<meta charset="utf-8" />
<style>
body, html {
font-family: "Arial";
}
.titlebox {
float: left;
padding: 0 5px;
margin: -30px 0 0 20px;
background: #fff;
}
</style>
<title>AI Engine</title>
<script src="lang.js"></script>
<script src="config.js"></script>
<script src="cookie.min.js"></script>
<script src="lang_cookie.js"></script>
<script src="jquery_3_2_1.min.js"></script>
<script src="sweetalert2.min.js"></script>
<link rel="stylesheet" href="css/sweetalert2.min.css">
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<script>
window.onerror = function (message, url, linenumber) {
console.log('JavaScript error: ' + message + ' on line ' + linenumber + ' for ' + url);
if (url.search("fabric_jquery.easyui.min_compressed_on_nvr.js") >= 1) {
loadScript("fabric_jquery.easyui.min_compressed_on_nvr.js", function () {
});
}
else if (url.search("jquery_3_2_1.min.js") >= 1) {
loadScript("jquery_3_2_1.min.js", function () {
});
}
else if (url.search("config.js") >= 1) {
loadScript("config.js", function () {
});
}
else if (url.search("cookie.min.js") >= 1) {
loadScript("cookie.min.js", function () {
});
}
else if (url.search("lang.js") >= 1) {
loadScript("lang.js", function () {
});
}
else if (url.search("sweetalert2.min.js") >= 1) {
loadScript("sweetalert2.min.js", function () {
});
}
else if (url.search("lang_cookie.js") >= 1) {
loadScript("lang_cookie.js", function () {
});
}
else if (message.search("slider") >= 1) {
loadScript("fabric_jquery.easyui.min_compressed_on_nvr.js", function () {
});
}
else if (message.search("myport") >= 1) {
loadScript("config.js", function () {
});
}
else if (message.search("cookie") >= 1) {
loadScript("cookie.min.js", function () {
});
}
else {
//location.reload();
var replaceUrl = 'http://' + window.location.hostname + ':' + GetUrlPort() + '/Aida/license.html';
//alert(replaceUrl);
window.location.replace(replaceUrl);
}
}
function GetUrlPort() {
var url_href = window.location.href;
var arr_url = url_href.split(":")[2].split("/")[0];
return arr_url;
}
if (window.history.replaceState) {
window.history.replaceState(null, null, window.location.href);
}
</script>
</head>
<body>
<div class="progress" style="background-color:white">
<div class="progress-bar progress-bar-striped" style="min-width: 20px;visibility:hidden;"></div>
</div>
<div align="center" class="test" div style="border:1px gray solid;padding:20px;margin:15px 15px 15px 15px">
<div class="titlebox"><nobr id="TITLEBOX_PAGE07"></nobr></div>
<table align="center" valign="center" style="border-collapse: collapse; width: 450px; height: 400px; ">
<tbody>
<tr style="height: 18px;">
<td style="width: 1200px; height: 18px;">&nbsp;<nobr id="IDC_STATIC_DATA_VER"></nobr></td>
<td style="width: 1200px; height: 18px;">&nbsp;<input id="dataset_ver" type="text" style="width: 250px;background-color:#F3F1F1;" readonly /></td>
</tr>
<tr style="height: 18px;">
<td style="width: 300px; height: 18px;">&nbsp;<nobr id="IDC_STATIC_SOFTWARE_VER"></nobr></td>
<td style="width: 1200px; height: 18px;">&nbsp;<input id="soft_ver" type="text" style="width: 250px;background-color:#F3F1F1;" readonly /></td>
</tr>
<tr style="height: 18px;">
<td style="width: 200px; height: 18px;">&nbsp;<nobr id="IDC_STATIC_SYS_ID"></nobr></td>
<td style="width: 1200px; height: 18px;">&nbsp;<input id="sys_id" type="text" style="width: 250px;background-color:#F3F1F1;" readonly /></td>
</tr>
<tr style="height: 50px;">
<td style="width: 200px; height: 18px;">&nbsp;<nobr id="IDC_STATIC_UNLOCK_KEY"></nobr></td>
<td style="width: 1250px; height: 100px;">&nbsp;<textarea style="width: 250px; height: 100px; background-color:white;" id="unlocking_key"></textarea></td>
</tr>
<tr style="height: 18px;">
<td style="width: 200px; height: 18px;">&nbsp;<nobr id="IDC_STATIC_LICENSE_TYPE"></nobr></td>
<td style="width: 1200px; height: 18px;">&nbsp;<input id="license_type" type="text" style="width: 250px;background-color:#F3F1F1;" readonly /></td>
</tr>
<tr style="height: 18px;">
<td style="width: 200px; height: 18px;">&nbsp;<nobr id="IDC_STATIC_LICENSE_STATUS"></nobr></td>
<td style="width: 1200px; height: 18px;">&nbsp;<input id="license_status_1" type="text" style="width: 250px;background-color:#F3F1F1" readonly /></td>
</tr>
<tr style="height: 18px;">
<td style="width: 200px; height: 18px;">&nbsp;<nobr id="IDC_STATIC_LICENSE_NOTE"></nobr></td>
<td style="width: 1200px; height: 18px;">&nbsp;<textarea style="width: 250px; height: 100px; background-color:#F3F1F1;" id="license_status_2" readonly></textarea></td>
</tr>
<!--<tr style="height: 18px;display:none;">
<td style="width: 200px; height: 18px;">&nbsp;<nobr id="IDC_STATIC_MAINTENANCE"></nobr></td>
<td style="width: 1200px; height: 18px;">
<div id="maintenance_status" style="width: 253.5px; height: 100px; background-color:#F3F1F1;border:1px gray solid;margin-left:3.5px;" readonly>
<nobr id="maintenance_status_1"></nobr>
<nobr id="maintenance_status_2"></nobr>
<nobr><a id="maintenance_status_3"></a></nobr>
</div>
</td>
</tr>-->
</tbody>
</table>
</div>
<div id="setkey_border" style="display:none;">
<div align="center">
<input align="center" id="IDOK" type="button" value=" Set " onclick="func_setkeyinfo()" style="background-color:#6c87d4;color:white;height:36px;width:300px;" />
</div>
</div>
<div id="fr_file_border" style="display:none;">
<div align="center">
<!-- 按鈕樣式可以根據您的需要進行調整 -->
<button type="button" id="IDC_STATIC_ADD_FACE_LICENSE" onclick="document.getElementById('fileInput').click()" style="background-color:#6c87d4;color:white;height:36px;width:300px;"></button>
<input type="file" id="fileInput" name="fileInput" style="display: none;" onchange="handleFileSelected(this.files)" />
<!-- 用於顯示檔案名稱的元素 -->
<span id="fileNameDisplay"></span>
</div>
</div>
<!-- <div>
<textarea style="width: 1700px; height: 500px;" id="test_txtbox"></textarea>
</div> -->
<script>
/*
loadScript("js_3_5_1.js", function () {
loadScript("cookie.min.js", function () {
loadScript("lang.js", function () {
loadScript("jqueryAll_compressed.js", function () {
loadScript("config.js", function () {
loadScript("lang_cookie.js", function () {
//alert("all load");
});
});
});
});
});
});*/
function loadScript(url, callback) {
var script = document.createElement("Script");
script.type = "text/javascript";
//IE 验证脚本是否下载完成
if (script.readyState) {
script.onreadystatechange = function () {
//readyState属性有5种取值
//uninitialized:初始状态
//loading:开始下载
//interactive:数据完成下载但尚不可用
//complete:数据已经准备就绪
//实际使用时,readyState的值并不像我们预想的那样有规律,实践发现使用readyState
//最靠谱的方式是同时检查以下2个状态,只要其中1个触发,就认为脚本下载完成。
if (script.readyState == "loaded" || script.readyState == "complete") {
//移除事件处理器,确保事件不会处理2次
script.onreadystatechange = null;
callback();
}
};
}
//其他浏览器
else {
script.onload = function () {
callback();
};
}
script.src = url;
//把新建的<Script>添加到<head>里比添加到<body>里更保险。
document.getElementsByTagName("head")[0].appendChild(script);
}
var mode_number = -1;
var version_number = -1;
//UI Interface
func_get_lang_cookie();
var message_alert = "hello";
var g_array_license_type = null;
var g_check_if_special_key = 0;
var g_check_if_key_ok = 0;
message_alert = MESSAGE08;
document.getElementById("IDC_STATIC_UNLOCK_KEY").innerHTML = IDC_STATIC_UNLOCK_KEY;
document.getElementById("IDC_STATIC_SYS_ID").innerHTML = IDC_STATIC_SYS_ID;
document.getElementById("IDC_STATIC_DATA_VER").innerHTML = IDC_STATIC_DATA_VER;
document.getElementById("IDC_STATIC_SOFTWARE_VER").innerHTML = IDC_STATIC_SOFTWARE_VER;
document.getElementById("IDC_STATIC_LICENSE_TYPE").innerHTML = IDC_STATIC_LICENSE_TYPE;
document.getElementById("IDC_STATIC_LICENSE_STATUS").innerHTML = IDC_STATIC_LICENSE_STATUS;
document.getElementById("IDC_STATIC_LICENSE_NOTE").innerHTML = IDC_STATIC_LICENSE_NOTE;
document.getElementById("IDC_STATIC_ADD_FACE_LICENSE").innerHTML = IDC_STATIC_ADD_FACE_LICENSE;
$('#IDOK').val(IDOK);
document.getElementById("TITLEBOX_PAGE07").innerHTML = TITLEBOX_PAGE07;
//document.getElementById("IDC_STATIC_MAINTENANCE").innerHTML = IDC_STATIC_MAINTENANCE;
func_getaboutinfo();
//func_getOTAinfo();
function func_getaboutinfo() {
if (localStorage.getItem("unlock_key") == "auto") {
$('#unlocking_key').val("");
}
else {
$('#unlocking_key').val(localStorage.getItem("unlock_key"));
}
$('#sys_id').val(localStorage.getItem("sys_id"));
$('#dataset_ver').val(localStorage.getItem("dataset_ver"));
if (localStorage.getItem("events_default_version") != null && localStorage.getItem("events_default_version") == "4") {
$('#soft_ver').val(localStorage.getItem("soft_ver") + " (LV)");
}
else if (localStorage.getItem("events_default_version") != null && localStorage.getItem("events_default_version") == "5") {
$('#soft_ver').val(localStorage.getItem("soft_ver") + " (JV)");
}
else {
$('#soft_ver').val(localStorage.getItem("soft_ver"));
}
var license_type_temp = localStorage.getItem("license_type").substr(1, 255);
var license_status_1_temp = localStorage.getItem("license_status");
var index_OK = license_status_1_temp.indexOf("ensed");
var index_mismatch = license_status_1_temp.indexOf("mismatch");
var index_expired = license_status_1_temp.indexOf("expired");
var index_restart = license_status_1_temp.indexOf("restart");
var index_0_days_left = license_status_1_temp.indexOf("(0 days left)");
var index_1_days_left = license_status_1_temp.indexOf("(1 days left)");
var index_error = license_type_temp.indexOf("Error");
var index_invalid = license_status_1_temp.indexOf("alid");
var index_empty = license_status_1_temp.length;
var index_third_party = license_type_temp.indexOf("arty");
var index_radar = license_type_temp.indexOf("adar");
var index_tof = license_type_temp.indexOf("oF");
var index_mod = localStorage.getItem("soft_ver").indexOf("mod");
var check_face = localStorage.getItem("check_face");
if (index_OK >= 2 || index_third_party >= 2) {
license_status_1_temp = license_status_1_temp.replace("(", " (");
}
var temp_check_if_key_ok = 1;
temp_check_if_key_ok = 1;
if (index_mismatch >= 2 || index_expired >= 2 || index_empty <= 2 || index_invalid >= 2) {
document.getElementById("license_status_1").style.color = "#ff0000";
temp_check_if_key_ok = 0;
}
if (index_error >= 2) {
document.getElementById("license_type").style.color = "#ff0000";
temp_check_if_key_ok = 0;
}
if (index_restart >= 2 || index_0_days_left >= 2 || index_1_days_left >= 2) {
document.getElementById("license_status_1").style.color = "#ff0000";
}
$('#license_type').val(license_type_temp);
if (index_empty <= 2 && index_third_party <= 2 && index_radar <= 0 && index_tof <= 0 && check_face == 0) {
$('#license_status_1').val("Wrong license key");
temp_check_if_key_ok = 0;
}
else
$('#license_status_1').val(license_status_1_temp);
$('#license_status_2').val(localStorage.getItem("license_file_content"));
if (index_mod >= 2) {
mode_number = parseInt(localStorage.getItem("soft_ver").substring(index_mod + 3, localStorage.getItem("soft_ver").length));
//console.log(mode_number);
version_number = 0;
var version_number_temp = localStorage.getItem("soft_ver").substring(0, localStorage.getItem("soft_ver").indexOf("-")).split(".");
for (var j = 0; j < 4; j++) {
version_number += parseInt(version_number_temp[3 - j]) * Math.pow(100, j);
}
//console.log(version_number);
}
if (index_third_party <= 2 && index_radar <= 0 && index_empty >= 3) {
g_array_license_type = license_type_temp.split(", ");
for (var i = 0; i < g_array_license_type.length; i++) {
if (g_array_license_type[i].length >= 1) {
if (g_array_license_type[i].indexOf("-") >= 1)
g_array_license_type[i] = g_array_license_type[i].substring(0, g_array_license_type[i].indexOf("-"));
if (g_array_license_type[i].indexOf(" ") >= 1)
g_array_license_type[i] = g_array_license_type[i].substring(0, g_array_license_type[i].indexOf(" "));
//console.log(g_array_license_type[i]);
}
}
g_check_if_special_key = 0;
}
else if (index_third_party >= 3 || index_radar >= 1) {
g_check_if_special_key = 1;
}
g_check_if_key_ok = temp_check_if_key_ok;
if (localStorage.getItem("soft_ver").search("mod005") >= 1) {
$("#fr_file_border").prop("style", "display: block;");
}
else {
$("#setkey_border").prop("style", "display: block;");
}
}
String.prototype.replaceAt = function (index, replacement) {
return this.substr(0, index) + replacement + this.substr(index + replacement.length);
}
function alert_finish() {
//func_get_lang_cookie();
//alert(message_alert);
func_setkeyinfo();
//window.setTimeout(func_setkeyinfo, 3000);
}
function func_setkeyinfo() {
var data = new Object();
data.unlocking_key = $('#unlocking_key').val().trim();
if (data.unlocking_key.length == 0) {
data.unlocking_key = "auto";
}
/*
if (data.unlocking_key.length <= 4) {
data.unlocking_key = "None";
}*/
//data.license_status_2 = $('#license_status_2').val();
//func_set_key_cookie();
setTimeout(closethis(), 300000);
$.ajax({
url: "/keyInfo",
type: "POST",
async: false,
data: "--boundary START" + JSON.stringify(data),
success: function (data) {
//console.info(data);
},
error: function (data) {
window.setTimeout(func_setkeyinfo, 3000);
console.warn(data);
}
});
}
/*function func_getOTAinfo() {
var check_if_correct_platform = 1;
var check_if_version_too_old = 0;
var new_version_number = 0;
var new_version_url = "";
var check_if_net_error = 0;
if (g_check_if_key_ok == 1) {
if (g_check_if_special_key == 1) {
if (check_if_net_error == 0) {
$.ajax({
url: "https://mes.meritlilin.com/support/www/checkAIweight.php?=EDGEFLOW",
type: "GET",
async: true,
timeout: 3000,
beforeSend: function (xmlHttp) {
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
}
else {
xmlHttp.setRequestHeader("If-Modified-Since", "0");
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
}
},
success: function (retdata) {
var jsonbuf = retdata;
for (var i = 0; i < jsonbuf.length; i++) {
var index_mod = jsonbuf[i]["ModelNo."].indexOf("od");
var index_MOD = jsonbuf[i]["ModelNo."].indexOf("OD");
if (index_mod >= 1 || index_MOD >= 1) {
var current_index_mod = index_mod > index_MOD ? index_mod : index_MOD;
var mode_number_temp = parseInt(jsonbuf[i]["ModelNo."].substring(current_index_mod + 3, jsonbuf[i]["ModelNo."].length));
var version_number_temp = 0;
var version_number_temp_temp = jsonbuf[i]["Version"].split(".");
for (var j = 0; j < 4; j++) {
version_number_temp += parseInt(version_number_temp_temp[3 - j]) * Math.pow(100, j);
}
if (mode_number == mode_number_temp) {
if (jsonbuf[i]["Type"] != "Ambarella") {
check_if_correct_platform = 0;
}
if (version_number < version_number_temp) {
check_if_version_too_old = 1;
}
if (version_number_temp > new_version_number) {
new_version_number = version_number_temp;
new_version_url = jsonbuf[i]["url"];
}
//console.log(jsonbuf[i]["PartNo."]);
//console.log(jsonbuf[i]["ModelNo."]);
}
}
}
if (check_if_correct_platform == 0) {
document.getElementById("maintenance_status_1").innerHTML = IDC_STATIC_MAINTENANCE_MSG_6;
document.getElementById("maintenance_status_1").style.color = "#ff0000";
}
else if (check_if_version_too_old == 1) {
document.getElementById("maintenance_status_1").innerHTML = IDC_STATIC_MAINTENANCE_MSG_1;
document.getElementById('maintenance_status_2').innerHTML = IDC_STATIC_MAINTENANCE_MSG_2;
document.getElementById('maintenance_status_3').href = new_version_url;
document.getElementById('maintenance_status_3').innerHTML = IDC_STATIC_MAINTENANCE_MSG_3;
document.getElementById("maintenance_status_1").style.color = "#ff0000";
document.getElementById("maintenance_status_2").style.color = "#ff0000";
}
else {
document.getElementById("maintenance_status_1").innerHTML = IDC_STATIC_MAINTENANCE_MSG_5;
}
},
error: function (retdata) {
check_if_net_error = 1;
console.warn(retdata);
if (check_if_net_error == 1) {
document.getElementById("maintenance_status_1").innerHTML = IDC_STATIC_MAINTENANCE_MSG_4;
document.getElementById("maintenance_status_1").style.color = "#ff0000";
}
}
});
}
}
else {
if (g_array_license_type != null) {
for (var i = 0; i < g_array_license_type.length; i++) {
if (g_array_license_type[i].indexOf("DGE") >= 1 && check_if_net_error == 0) {
$.ajax({
url: "https://mes.meritlilin.com/support/www/checkAIweight.php?=" + g_array_license_type[i],
type: "GET",
async: true,
timeout: 3000,
beforeSend: function (xmlHttp) {
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
}
else {
xmlHttp.setRequestHeader("If-Modified-Since", "0");
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
}
},
success: function (retdata) {
var jsonbuf = retdata;
for (var i = 0; i < jsonbuf.length; i++) {
var index_mod = jsonbuf[i]["ModelNo."].indexOf("od");
var index_MOD = jsonbuf[i]["ModelNo."].indexOf("OD");
if (index_mod >= 1 || index_MOD >= 1) {
var current_index_mod = index_mod > index_MOD ? index_mod : index_MOD;
var mode_number_temp = parseInt(jsonbuf[i]["ModelNo."].substring(current_index_mod + 3, jsonbuf[i]["ModelNo."].length));
var version_number_temp = 0;
var version_number_temp_temp = jsonbuf[i]["Version"].split(".");
for (var j = 0; j < 4; j++) {
version_number_temp += parseInt(version_number_temp_temp[3 - j]) * Math.pow(100, j);
}
if (mode_number == mode_number_temp)
{
if (jsonbuf[i]["Type"] != "Ambarella") {
check_if_correct_platform = 0;
}
if (version_number < version_number_temp) {
check_if_version_too_old = 1;
}
if (version_number_temp > new_version_number) {
new_version_number = version_number_temp;
new_version_url = jsonbuf[i]["url"];
}
//console.log(jsonbuf[i]["PartNo."]);
//console.log(jsonbuf[i]["ModelNo."]);
}
}
}
if (check_if_correct_platform == 0) {
document.getElementById("maintenance_status_1").innerHTML = IDC_STATIC_MAINTENANCE_MSG_6;
document.getElementById("maintenance_status_1").style.color = "#ff0000";
}
else if (check_if_version_too_old == 1) {
document.getElementById("maintenance_status_1").innerHTML = IDC_STATIC_MAINTENANCE_MSG_1;
document.getElementById('maintenance_status_2').innerHTML = IDC_STATIC_MAINTENANCE_MSG_2;
document.getElementById('maintenance_status_3').href = new_version_url;
document.getElementById('maintenance_status_3').innerHTML = IDC_STATIC_MAINTENANCE_MSG_3;
document.getElementById("maintenance_status_1").style.color = "#ff0000";
document.getElementById("maintenance_status_2").style.color = "#ff0000";
}
else {
document.getElementById("maintenance_status_1").innerHTML = IDC_STATIC_MAINTENANCE_MSG_5;
}
},
error: function (retdata) {
check_if_net_error = 1;
console.warn(retdata);
if (check_if_net_error == 1) {
document.getElementById("maintenance_status_1").innerHTML = IDC_STATIC_MAINTENANCE_MSG_4;
document.getElementById("maintenance_status_1").style.color = "#ff0000";
}
}
});
}
}
}
}
}
}*/
function closethis() {
if (alert(message_alert)) {
}
//parent.window.location.reload();
/*
var replaceUrl = 'http://' + window.location.hostname + ':' + myport + '/setup.htm';
//alert(replaceUrl);
parent.window.location.replace(replaceUrl);*/
parent.open(parent.location, '_parent').close();
}
// Set the date we're counting down to
/*
var countDownDate = new Date("Jan 5, 2022 15:37:25").getTime();
// Update the count down every 1 second
var x = setInterval(function () {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Output the result in an element with id="demo"
document.getElementById("demo").innerHTML = days + "d " + hours + "h "
+ minutes + "m " + seconds + "s ";
// If the count down is over, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("demo").innerHTML = "EXPIRED";
}
}, 1000);*/
/*
function func_set_key_cookie() {
cookie("cookie_unlocking_key", $('#unlocking_key').val(), "9999/12/31 12:00:00");
//cookie("cookie_license_status_2", $('#license_status_2').val(), "9999/12/31 12:00:00");
//parent.window.location.reload();
};
function func_get_key_cookie() {
var list_key = '';
var cookies = cookie();
for (var v in cookies) {
if (v === 'cookie_unlocking_key')
list_key += cookies[v];
}
if (list_key.length >= 1) {
return list_key;
}
return 'none';
}*/
function func_get_license_cookie() {
var list_license = '';
var cookies = cookie();
for (var v in cookies) {
if (v === 'cookie_license_status_2')
list_license += cookies[v];
}
if (list_license.length >= 1) {
return list_license;
}
return 'none';
}
var k_index = -1;
$(".progress-bar").css("visibility", "hidden");
function showFileName() {
var fileInput = document.getElementById('fileInput');
var fileNameDisplay = document.getElementById('fileNameDisplay');
// 檢查是否有檔案被選擇
if (fileInput.files.length > 0) {
// 獲取第一個選擇的檔案名稱
var fileName = fileInput.files[0].name;
// 更新顯示檔案名稱的元素
fileNameDisplay.textContent = fileName;
}
}
function handleFileSelected(files) {
if (files.length > 0) {
upload_face_licensekey(files[0]);
}
}
function upload_face_licensekey(file_data) {
var blob = new Blob([file_data]);
var form_data = new FormData();
form_data.append("file", blob, "iengine.lic");
// 顯示加載對話框
/*Swal.fire({
title: 'Uploading...',
html: '',
allowOutsideClick: false,
didOpen: () => {
Swal.showLoading();
}
});*/
setTimeout(closethis(), 300000);
$.ajax({
url: "/upload_face_licensekey",
type: "POST",
data: form_data,
contentType: false,
processData: false,
async: true,
beforeSend: function (xmlHttp) {
xmlHttp.setRequestHeader("If-Modified-Since", "0");
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
},
success: function (retdata) {
// 更新對話框內容為成功信息
//Swal.fire("SUCCESS", retdata, "success");
},
error: function (retdata) {
// 更新對話框內容為錯誤信息
//Swal.fire("ERROR", retdata.responseText, "error");
}
});
}
localStorage.setItem('license_success', 'OK');
</script>
</body>
</html>