<template>
  <view>
    <web-view :src="webUrl"></web-view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      webUrl: ''
    };
  },
  onLoad(options) {
    
    const params = uni.getStorageSync('MD_contractObj')
    
    // 解析传递过来的参数对象
    if (options.id) {
        try {
            if (options.id && params.id == options.id) {
              this.webUrl = `https://h5.fangpiaovip.com/readPdf/index/index.html?${decodeURIComponent(params.url)}&tname=${params.tname}`
            }

        } catch (error) {
            console.error('Error parsing params:', error);
        }
    }
  }
};
</script>

<style scoped>
/* 样式可以根据需要进行调整 */
</style>