Browse Source

fix: 移除打开文件失败时的冗余提示并添加showMenu选项

移除uni.openDocument失败时的冗余toast提示,同时添加showMenu选项以提供更好的用户体验
master
前端-胡立永 1 month ago
parent
commit
5381ea0c47
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      pages_order/work/postConsult.vue

+ 1
- 5
pages_order/work/postConsult.vue View File

@ -152,17 +152,13 @@
success: (res) => {
if (res.statusCode === 200) {
uni.openDocument({
showMenu: true,
filePath: res.tempFilePath,
success: () => {
console.log('文件打开成功')
},
fail: (err) => {
console.log('文件打开失败', err)
uni.showToast({
title: '文件已保存,请在文件管理器中查看',
icon: 'none',
duration: 3000
})
}
})
}


Loading…
Cancel
Save