From 48a65ed1c14c8f6c37ab86271fc35706fd673109 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 18 Apr 2018 19:32:23 +0800 Subject: [PATCH] JS Interface --- libs/utils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/utils.js b/libs/utils.js index 59cfb06f..aaf82da3 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -324,6 +324,11 @@ utils.prototype.readFile = function (success, error, readType) { ////// 下载文件到本地 ////// utils.prototype.download = function (filename, content) { + if (core.isset(window.jsinterface)) { + window.jsinterface.download(filename, content); + return; + } + // Step 0: 不为http/https,直接不支持 if (!core.platform.isOnline) { alert("离线状态下不支持下载操作!");