183 字
1 分鐘
[ChtICToken.js] func goodDay 啟用元件 | 自然人憑證開發筆記

ChtICToken.js 版本:R1.0.0.57
goodDay(RevFun, IsPrintCard)
goodDay 用於初始化,才能執行其他 function。
- RevFun
必填
Callback Function - IsPrintCard
選填
Response
Callback funtion 中以 getICToken() 取得以下內容
{ "SmrtCrdID": ["TP03200302000000"], "SlotID": ["InfoThink USB Reader 0"], "SlotName": [], "ActvSltID": ["0"], "OldPIN": "", "NewPIN": "", "UID": "", "CrdSys": "", "KpMsg": "", "exDynamicCreateFileInput": "", "exDynamicReleaseFileInput": "", "TBS": "TBS", "TbsEncoding": "base64", "HashAlgorithm": "SAH256", "PIN": "", "FUN": "CheckEnvir", "SType": "PKCS1", "RetObj": { "RCode": "0", "RMsg": "" }}原始碼
ICToken.prototype.goodDay = function (RevFun, IsPrintCard) { if (typeof IsPrintCard === "undefined") IsPrintCard = false; if (InToken == null) InToken = new ICToken(); if (Gbjct != null) Gbjct = null; Gbjct = new INObject(); if (GARevFun != null) GARevFun = null; GARevFun = new ARevFun(); InToken.clean(); checkEnv(RevFun, IsPrintCard);};
function checkEnv(UrRevFUN, IsPrintCard) { if (typeof IsPrintCard === "undefined") IsPrintCard = false; InToken.FUN = "CheckEnvir"; GARevFun.FUN = "stDa"; GARevFun.Para = ""; GARevFun.IsPrintCard = IsPrintCard; GARevFun.UrFUN = UrRevFUN;
SendData( "http://localhost:61161/pkcs11info", "http://localhost:61161/ChtPopupForm", "初始中", Gbjct.PppFrmStyle, stDa, UrRevFUN );}