var loadConfig = function() { listLicence(); }; var listLicence = function() { var arg = {}; arg.action = "listLicence"; global.wssocket.send(JSON.stringify(arg)); }; var onListLicence = function(obj) { mainVue.licenceNodes = obj.nodeCount; mainVue.licenceDueDate = obj.dueDate; }; var downloadUUID = function() { var nonce = global.session; var pubKey = global.sm2Key.publicKey; var signature = sm2.doSignature(global.session, global.sm2Key.privateKey); window.open("./NodeCenter?action=downloadUUID&sign=" + signature + "&pubKey=" + pubKey + "&nonce=" + nonce); }; var updateLicence = function() { var req = {}; req.action = "updateLicence"; try { var content = mainVue.offlineLicence; var contents = content.split("|"); req.sign = contents[1]; req.content = contents[0]; if (req.sign == undefined || req.content == undefined) { myToast("手动提交Licence", "失败,Licence格式错误"); return; } } catch (e) { myToast("手动提交Licence", "失败,Licence格式错误"); return; } global.wssocket.send(JSON.stringify(req)); };