Merge branch dev/task-147913 of zentao/zentaopms (#11168)
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
window.ajaxInstallEvent = function(location = '')
|
||||
window.ajaxInstallEvent = function(location = '', entrance = '')
|
||||
{
|
||||
$.getLib(config.webRoot + 'js/fingerprint/fingerprint.js', {root: false}, async function()
|
||||
{
|
||||
const agent = typeof(FingerprintJS) !== 'undefined' ? await FingerprintJS.load() : '';
|
||||
let fingerprint = agent ? await agent.get() : '';
|
||||
fingerprint = fingerprint ? fingerprint.visitorId : '';
|
||||
$.ajax({url: $.createLink('misc', 'installEvent'), type: "post", data: {fingerprint, location}, timeout: 2000});
|
||||
let eventUrl = $.createLink('misc', 'installEvent');
|
||||
if(entrance === 'index') eventUrl = eventUrl.replace('install.php', 'index.php');
|
||||
$.ajax({url: eventUrl, type: "post", data: {fingerprint, location}, timeout: 2000});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
$.ajax({url: sendEventLink, timeout: 2000});
|
||||
|
||||
ajaxInstallEvent('finish');
|
||||
ajaxInstallEvent('finish', 'index');
|
||||
|
||||
Reference in New Issue
Block a user