fix: bug

This commit is contained in:
杨航
2025-11-28 15:27:51 +08:00
parent 10c9fde2fa
commit 0e3baa12cf
6 changed files with 68 additions and 86 deletions
+17 -16
View File
@@ -465,22 +465,23 @@
});
break;
case 'preview':
if (getPhoneEnvBool('AND')) {
common.navigateTo('/pages/index/preview?fileId=' + info.docId);
} else {
const base_url = get_base_url('/traask/traFilePreview/');
let fileUrl = base_url + '/traask/traFilePreview/' + info.docId + userParams;
const localFilePath = '_doc/pdf_view/' + info.docName + '.pdf';
downloadAndSaveAvatar(fileUrl, localFilePath).then((res) => {
uni.openDocument({
filePath: res,
showMenu: true,
success: function() {
console.log('打开文档成功');
}
});
});
}
common.navigateTo('/pages/index/preview?fileId=' + info.docId);
// if (getPhoneEnvBool('AND')) {
// common.navigateTo('/pages/index/preview?fileId=' + info.docId);
// } else {
// const base_url = get_base_url('/traask/traFilePreview/');
// let fileUrl = base_url + '/traask/traFilePreview/' + info.docId + userParams;
// const localFilePath = '_doc/pdf_view/' + info.docName + '.pdf';
// downloadAndSaveAvatar(fileUrl, localFilePath).then((res) => {
// uni.openDocument({
// filePath: res,
// showMenu: true,
// success: function() {
// console.log('打开文档成功');
// }
// });
// });
// }
break;
case 'toCourse':
console.log(type, data, id);