pay-page.vue 1.1 KB
<template>
  <h-view id="pay-page" class="public-style">
    <h-header :proportion="[5,1,1]" class="bar-custom">
      <div slot="left" class="h-header-btn">
        <img src="@/assets/userBind/arrow.png" @click="changePage">
        <span>支付中心</span>
      </div>
    </h-header>
    <h-content>
      <iframe
        :src="url" sandbox="allow-scripts" frameborder="0"
        scrolling="no"
        width="100%" height="100%"/>
        <!-- <object :data="url" width="100%" height="100%" type="text/html"/> -->
    </h-content>
  </h-view>
</template>
<script>
export default {
  data () {
    return {
      name: '',
      url: '',
    }
  },
  beforeRouteEnter (to, from, next) {
    next(vm => {
      vm.name = from.name
      vm.url = vm.$route.params.url
    })
  },
  methods: {
    changePage () {
      let toPath
      if (this.name === 'PayEntry') {
        toPath = 'FirstPay'
      } else if (this.name === 'PaymentPayEntry') {
        toPath = 'NewList'
      }
      this.$router.replace({
        name: toPath,
      })
    },
  },
}
</script>
<style lang="less" scoped>
#pay-page {

}
</style>