read.vue 749 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view >
  3. <view style="width: 100%;" id="app">
  4. <web-view :src="webUrl"></web-view>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. webUrl : 'https://file-dev.xyyxt.net/oss/images/20210602/2021_6_2_1763607338.pdf'
  13. }
  14. },
  15. onLoad(option) {
  16. /* uni.downloadFile({
  17. url: 'http://192.168.0.222:8080/img/test.pdf',
  18. success: function (res) {
  19. var filePath = res.tempFilePath;
  20. uni.openDocument({
  21. filePath: filePath,
  22. success: function (res) {
  23. console.log('打开文档成功');
  24. }
  25. });
  26. }
  27. }); */
  28. },
  29. onShow(){
  30. },
  31. methods: {
  32. },
  33. }
  34. </script>
  35. <style scope>
  36. page {
  37. background: #FFFFFF;
  38. }
  39. </style>