<template>
  <view class="webview-container">
    <web-view :src="url"></web-view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      url: ''
    }
  },
  onLoad(options) {
    if (options.url) {
      this.url = decodeURIComponent(options.url)
    } else {
      uni.showToast({
        title: '网址不存在',
        icon: 'none'
      })
      uni.navigateBack()
    }
  }
}
</script>