<template>
  <view>
    <u-navbar back-text="" title="" back-icon-color="#FFFFFF" :background="{ background: '#3D5D4C' }" :border-bottom="false"></u-navbar>
    <web-view class="web-view" :src="pdfUrl"></web-view>
  </view>
</template>

<script lang="renderjs" module="test">
export default {
  data() {
    return {
      pdfUrl: ''
    };
  },
  onLoad(page) {
    if (page.fileUrl) {
      this.pdfUrl = `${this.config.previewPdfUrl}?file=${ encodeURIComponent(page.fileUrl) }`;
    }
  },
};
</script>

<style lang="scss" scoped>
.web-view {
  top: 44px;
}
</style>
