<template>
  <div id="download" class="app">
    <img src="../../assets/image/down.jpg" alt="" />
    <div class="button">
      <van-button
        type="danger"
        style="border-color: #f51919; background-color: #f51919"
        round
        hairline
        block
        >下载</van-button
      >
    </div>
  </div>
</template>

<script>
import { Button as vanButton } from "vant";
import "vant/lib/button/style";

export default {
  name: "app",
  data: function() {
    return {
      isAndroid: true,
      isWindows: false,
      isIphone: false
    };
  },
  methods: {},
  mounted() {
    const sys = window.navigator.userAgent;
    this.isAndroid = /Android/g.test(sys);
    this.isWindows = /Windows/g.test(sys);
    if (/iPhone/g.test(sys)) {
      window.location.href =
        "itms-apps://itunes.apple.com/app/id1563693329?action=write-review";
    }
  },
  beforeDestroy: function() {},
  components: { vanButton }
};
</script>
<style lang="scss">
#download {
  max-width: 750px;
  margin: 0 auto;
  .button {
    position: fixed;
    bottom: 0;
    padding: 1em 2em;
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
  }
}
</style>
