Commit 6b0321f0 by 王锐

success 回调

parent cbb9e6fc
......@@ -196,15 +196,17 @@
$("#filedownload").on("click", function() {
var arr = ["http://img-cdn-qiniu.dcloud.net.cn/static/images/activity/plugin-side.png",
"https://www.baidu.com/img/bd_logo1.png"
]
var arr = ["http://k5.jst-gov.com/Storages/Reports/Pdf/71230dcf6f8548f9a0101be4e3340a1f/JST-DW201900049AT.pdf"]
//http://img-cdn-qiniu.dcloud.net.cn/static/images/activity/plugin-side.png
// var downUrl = "https://www.baidu.com/img/bd_logo1.png"
var savePath = "image/"
var savePath = "pdf/"
function success(res) {
alert(res)
// alert(res)
console.log(1)
plus.runtime.openFile(res, {}, function(e) {
alert('打开失败')
})
}
function error(res) {
......@@ -213,6 +215,9 @@
function presence(res) {
alert(res)
plus.runtime.openFile(res, {}, function(e) {
alert('打开失败')
})
}
for (var i = 0; i < arr.length; i++) {
......@@ -222,7 +227,12 @@
$("#uuid").on("click", function() {
getUuid(function success(res) {
alert(res)
// alert(res)
console.log(2)
alert(1)
plus.runtime.openFile(res, {}, function(e) {
alert('打开失败')
})
})
})
$("#upload").on("click", function() {
......@@ -274,4 +284,7 @@
plus.nativeUI.showWaiting('指纹识别中...');
}
}
</script>
......@@ -188,7 +188,7 @@ function readerFile(path, name, success, error) {
setUrlFromLocal(d.filename, callback)
function callback(res) {
alert(res)
success(res)
}
} else {
//下载失败,需删除 本地临时文件,否则下次进来时会检查到文件已存在
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment