openNCALayerChooseKeyDialog = (callback) => {
this.callback = callback;
const base64 = this.b64EncodeUnicode(callback);
console.log('openNCALayerChooseKeyDialog');
this.setMissedHeartbeatsLimitToMax();
const object = {
"module": "kz.gov.pki.knca.commonUtils",
"method": "createCMSSignatureFromBase64",
"args": ["PKCS12", "SIGNATURE", base64, false]
};
//getActiveTokens
// getKeyInfo
// signXml
// createCMSSignatureFromFile
// showFileChooser
// createCMSSignatureFromBase64
this.webSocket.send(JSON.stringify(object));
};
ncalayer.openNCALayerChooseKeyDialog(({errorCode, result}) => {
console.log('ncalayer');
console.log(errorCode, result);
if (errorCode !== undefined && result !== undefined) {
console.log('errorCode');
ncalayer.setStorePath(result);
console.log(errorCode);
if (ncalayer.password !== null) {
console.log('getXMLDocument');
this.getXMLDocument();
} else {
console.log('showSetPasswordModal');
this.showSetPasswordModal();
}
}
});你好。我不能理解为什么我的函数没有返回任何错误给我,我只是在调用ncalayer并检查密码之后,在我的ncalayer上放上sign buttun之后,我没有任何动作
发布于 2020-08-16 18:34:27
将OpenNCALayerChooseKeyDialog更新为
openNCALayerChooseKeyDialog = (callback) => {
this.callback = callback;
const base64 = this.b64EncodeUnicode(callback);
console.log('openNCALayerChooseKeyDialog');
this.setMissedHeartbeatsLimitToMax();
const object = {
"module": "kz.gov.pki.knca.commonUtils",
"method": "createCMSSignatureFromBase64",
"args": ["PKCS12", "SIGNATURE", base64, false]
};
this.callback(this.webSocket.send(JSON.stringify(object)));
};https://stackoverflow.com/questions/63435765
复制相似问题