let filepathss = plus.io.convertLocalFileSystemURL(data.tempFilePath);
plus.io.resolveLocalFileSystemURL(filepathss,function(entry){
const tempFileName = entry.name;
entry.getParent(function (parentDicEntry) {
console.log(parentDicEntry.fullPath)
entry.moveTo({ fullPath: parentDicEntry.fullPath+'/'},`学生.xlsx`,function (newFile) {
uni.openDocument({
fileType: 'xlsx',
filePath: newFile.fullPath,
success: function (res2) {
console.log('打开文档成功');
},
fail: function (err) {
if(err.errCode == 1 || err.code == 1){
uni.showToast({
title: `未找到能打开xlsx类型文件的手机应用`,
icon: 'none'
})
}
console.log(err)
}
});
},function(moveError){
uni.showToast({
title: `已在第三方应用中打开过,请在第三方应用查看时保存`,
icon: 'none'
})
})
})
})
}