<template>
  <view class="contractSigning-container">
    <web-view
      :src="contractUrl"
      @onPageStarted="onPageStarted"
      @onPageFinished="onPageFinished"
    />
  </view>
</template>
<script>
import favoriteLoading from "@/components/favorite-loading/favorite-loading.vue";
import { mapActions } from "vuex";
export default {
  data() {
    return {
      contractUrl: "",

      time: null,
    };
  },
  onUnload() {
    this.backPage();
  },
  onLoad(options) {
    if (options) {
      clearTimeout(this.time);

      uni.showLoading({
        title: "合同页加载中...",
        mask: true,
      });

      this.showLoading = true;

      this.contractUrl = options.url;

      setTimeout(() => {
        uni.hideLoading();
      }, 4000);
    }
  },
  methods: {
    ...mapActions("audit", ["backPage"]),
  },
};
</script>

<style lang="scss">
.contractSigning-container {
  .loading {
    margin: 70% auto;
    display: flex;
  }
}
</style>
