登录页面和文件打开方式
This commit is contained in:
@@ -475,6 +475,7 @@
|
||||
uploadCloudDbFile,
|
||||
deleteCloudDb
|
||||
} from '@/utils/cloud-api.js';
|
||||
import { openFile as openFileNative } from '@/utils/fileOpener.js'
|
||||
|
||||
const userToken = ref('');
|
||||
const userId = ref('');
|
||||
@@ -826,19 +827,10 @@
|
||||
}
|
||||
};
|
||||
|
||||
// 使用系统默认应用打开
|
||||
// 打开文件(弹出应用选择菜单)
|
||||
const openFile = (filePath) => {
|
||||
uni.openDocument({
|
||||
filePath: filePath,
|
||||
success: () => uni.showToast({
|
||||
title: '打开成功',
|
||||
icon: 'success'
|
||||
}),
|
||||
fail: (err) => {
|
||||
console.error('打开文件失败:', err);
|
||||
// 如果默认应用打开失败,尝试弹出选择菜单
|
||||
openFileWithMenu(filePath);
|
||||
}
|
||||
openFileNative(filePath, () => {
|
||||
openFileWithMenu(filePath);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user