智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/e5/e5c9e013877ac3185c174084fe2...

25 lines
506 B

import {
urlToFile
} from 'uni-platform/helpers/file'
const {
invokeCallbackHandler: invoke
} = UniServiceJSBridge
export function getFileInfo ({
filePath
} = {}, callbackId) {
// TODO 计算文件摘要
urlToFile(filePath).then((res) => {
invoke(callbackId, {
errMsg: 'getFileInfo:ok',
size: res.size
})
}).catch((err) => {
invoke(callbackId, {
errMsg: 'getFileInfo:fail 文件[' +
filePath +
'] getFileInfo 失败:' + err.message
})
})
}