From e491cdb48129752324c4e3764f99bd9203c56dec Mon Sep 17 00:00:00 2001
From: lgq <1015864684@qq.com>
Date: 星期二, 31 三月 2026 09:48:44 +0800
Subject: [PATCH] 1.新增VF205门禁机代码
---
vf205_access/dxmodules/dxEid.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/vf205_access/dxmodules/dxEid.js b/vf205_access/dxmodules/dxEid.js
new file mode 100644
index 0000000..f354aa2
--- /dev/null
+++ b/vf205_access/dxmodules/dxEid.js
@@ -0,0 +1,46 @@
+import { eidClass } from './libvbar-m-dxeid.so'
+const eidObj = new eidClass();
+
+const eid = {
+ /**
+ * @brief 浜戣瘉婵�娲�
+ * @param {string} sn 璁惧sn
+ * @param {string} version 涓氬姟鑷畾涔夌増鏈彿
+ * @param {string} mac 璁惧mac鍦板潃
+ * @param {string} codeMsg 浜戣瘉婵�娲荤爜鏁版嵁
+ * @returns
+ */
+ active: function(sn, version, mac, codeMsg){
+
+ if(!sn){
+ throw("sn should not be null or empty")
+ }
+ if(!version){
+ throw("version should not be null or empty")
+ }
+ if(!mac){
+ throw("mac should not be null or empty")
+ }
+ if(!codeMsg){
+ throw("codeMsg should not be null or empty")
+ }
+ return eidObj.active(sn, version, mac, codeMsg);
+ },
+ /**
+ * @brief 鑾峰彇淇℃伅
+ */
+ getInfo: function(){
+ if(data == null || data.length < 1){
+ throw("data should not be null or empty")
+ }
+ return eidObj.getInfo(data)
+ },
+ /**
+ * @brief 鑾峰彇鐗堟湰鍙�
+ */
+ getVersion: function(){
+ return eidObj.getVersion()
+ },
+}
+
+export default eid;
\ No newline at end of file
--
Gitblit v1.9.3