dtl.vue 720 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <view>
  3. <web-view :src="webUrl"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. webUrl: ''
  11. };
  12. },
  13. onLoad(options) {
  14. const params = uni.getStorageSync('MD_contractObj')
  15. // 解析传递过来的参数对象
  16. if (options.id) {
  17. try {
  18. if (options.id && params.id == options.id) {
  19. this.webUrl = `https://h5.fangpiaovip.com/readPdf/index/index.html?${decodeURIComponent(params.url)}&tname=${params.tname}`
  20. }
  21. } catch (error) {
  22. console.error('Error parsing params:', error);
  23. }
  24. }
  25. }
  26. };
  27. </script>
  28. <style scoped>
  29. /* 样式可以根据需要进行调整 */
  30. </style>