This commit is contained in:
cheney
2023-01-05 17:39:59 +08:00
parent 24f6019d1b
commit 852c240113
9 changed files with 665 additions and 275 deletions
+18 -3
View File
@@ -119,10 +119,11 @@
readonly></textarea>
<input id="filepath" style="width: 300px; height: 1.06rem" type="text" value="\root\mana\name"
<input id="filepath" style="width: 260px; height: 1.06rem" type="text" value="\root\mana\name"
placeholder="文件">
<button id="btn_read" style="margin-right: 0.5rem">读</button>
<button id="btn_write" style="margin-right: 1rem">写</button>
<button id="btn_write" style="margin-right: 0.5rem">写</button>
<button id="btn_delete" style="margin-right: 0.5rem">删</button>
<textarea id="ta_txt" style="display: block; margin: 1rem 0; width: 375px; height: 100px;"
></textarea>
@@ -280,7 +281,6 @@
txt = JSON.stringify(txt, null, 4)
$("#ta_txt").val( txt )
debugger
success("读取成功")
} catch (e) {
alert("读取失败:" + e.message)
@@ -304,6 +304,21 @@
}
})
$("#btn_delete").click(function () {
// alert("暂不开放")
try {
var filepath = $("#filepath").val()
var idx = filepath.lastIndexOf("\\")
var folder = filepath.substr(0, idx)
var file = filepath.substr(idx + 1)
window.UKey.deleteFile(folder, file);
success("删除成功")
} catch (e) {
alert("删除失败:" + e.message)
}
})
$("#btn_nameplate_tmp_load").click(function () {
var def = {
manufactor: "sunyard",
+9
View File
@@ -88,6 +88,14 @@
}
function deleteFile(dir, file){
if ( ! hDevice ) {
throw new Error("设备未登录")
}
FISECKEY.FILE_DeleteFile(hDevice, dir, file);
}
function readFile(dir, file) {
if ( ! hDevice ) {
throw new Error("设备未登录")
@@ -274,6 +282,7 @@
catRelease : catRelease,
readFile: readFile,
writeFile : writeFile,
deleteFile : deleteFile,
login : login,
logout : logout,
updatePin : updatePin,