fix: bug
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user