2.2提交
This commit is contained in:
@@ -239,8 +239,8 @@
|
||||
if(item.id == cell.id) {
|
||||
console.log(2222222222);
|
||||
console.log(item.localPath);
|
||||
if(isAndroid){
|
||||
plus.runtime.openFile(item.localPath, function(e) {
|
||||
// if(isAndroid){
|
||||
plus.runtime.openFile(item.localPath, function(e) {
|
||||
console.log('打开成功');
|
||||
}, function(e) {
|
||||
uni.showToast({
|
||||
@@ -250,19 +250,15 @@
|
||||
});
|
||||
console.log('打开失败:' + e.message);
|
||||
});
|
||||
}else{
|
||||
uni.openDocument({
|
||||
filePath: item.localPath,
|
||||
success: () => console.log('打开成功'),
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: '打开失败:' + err.message,
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// }else{
|
||||
// uni.sendNativeEvent('openDocument', {
|
||||
// msg: item.localPath.replaceAll('_doc/uniapp_save/',''),
|
||||
// }, ret => {
|
||||
// console.log(ret);
|
||||
// });
|
||||
// }
|
||||
|
||||
// plus.runtime.openFile(item.localPath, function(e) {
|
||||
// console.log('打开成功');
|
||||
// }, function(e) {
|
||||
|
||||
Reference in New Issue
Block a user