<template>
  <div class="wrapper">
    <div class="poster">
      <img class="backIcon" src="@/assets/common/back_icon_2.png" alt="" @click="back" />
    </div>
    <div class="footbutton">
      <van-button class="button" color="#EB4E3F" @click="detail">产品详情</van-button>
      <van-button class="button" color="#EB4E3F" @click="register">立即申请</van-button>
    </div>
  </div>
</template>

<script>
import Vue from "vue";
import { Button } from "vant";

Vue.use(Button);
export default {
  methods: {
    back() {
      if (window.android !== undefined) {
        window.android.backHome();
      } else {
        window.webkit && window.webkit.messageHandlers.backHome.postMessage("");
      }
    },
    detail() {
      this.$router.push({
        name: "QuickLoansDetail",
        query: {
          noTitle: 1,
        },
      });
    },
    register() {
      window.location.href =
        "app:中国农业银行_bankabc://%7b%22method%22%3a%22jumpToSharedProduct%22%2c%22param%22%3a%22rR4uOmAzpF49gqwDYQiLpzHEyZ12Eb2zSvUIvqC1Tz4%2fknUug5sQ4eBk%2fcV61d99026ljSbdORzNlVBXexpjmAfX0Wl1lPPFcVOexJLrQZs%3d%22%7d";
    },
  },
};
</script>

<style lang="stylus" scoped>
.wrapper {
  height 100vh;
  background #fff;
  overflow auto

  .poster {
    position: relative;
    width 100%;
    height 1164px;
    background url('~@/assets/loans/loans_bg.png');
    background-size cover

    .backIcon {
      position absolute;
      top: 64px;
      left 30px;
      width 40px;
      height 41px;
    }
  }

  .footbutton {
    position absolute;
    bottom: 30px;
    left 0;
    width 100%;
    display flex;
    justify-content space-around;

    .button {
      width 335px;
      height 90px;
      border-radius: 8px;
      font-size: 36px;
      font-weight: 500;
    }
  }
}
</style>
