<template>
  <div class="order-success-wrap pr">
    <nav-bar title="留学租房找hooli" v-if="!isInHooliApp"/>
    <img src="../../assets/imgs/share@2x.jpg" alt="">
    <div class="wrap pr">
      <div class="done">
        <img src="../../assets/imgs/hoolihome.png" class="logo" alt="">
        <h4>留学租房找公寓</h4>
        <h4>用hooli APP</h4>
        <p></p>
        <div class="list">
          <p>
            <i class="icon icon-xuanxiang"></i>
            <span>新人享优惠</span>
          </p>
          <p>
            <i class="icon icon-xuanxiang"></i>
            <span>一对一专属服务</span>
          </p>
          <p>
            <i class="icon icon-xuanxiang"></i>
            <span>价格透明</span>
          </p>
          <p>
            <i class="icon icon-xuanxiang"></i>
            <span>流程简洁</span>
          </p>
        </div>
        <div class="btn">
          <a href="https://itunes.apple.com/cn/app/id1261296346?mt=8" v-if="env === 'ios'">下载APP即刻体验</a>
          <a href="https://sj.qq.com/myapp/detail.htm?apkName=com.hooli.hoolihome" v-else>下载APP即刻体验</a>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import NavBar from "@/components/common/NavBar";

export default {
  name: "Share",
  components: {
    NavBar
  },
  data() {
    return {
      isInHooliApp: false,
      env: null
    };
  },
  created: function() {
    if (this.$util.checkIsHooliAndroid() || this.$util.checkIsHooliIos()) {
      this.isInHooliApp = true;
    }
    let u = navigator.userAgent;
    if (u.indexOf("Android") > -1 || u.indexOf("Adr") > -1)
      this.env = "android";
    if (u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) this.env = "ios";
  },
  methods: {}
};
</script>

<style scoped lang='less'>
.order-success-wrap {
  background: #fff;
  min-height: 100vh;
  > img {
    min-height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }
  .wrap {
    .done {
      position: relative;
      z-index: 2;
      padding: 15px 20px 0;
      text-align: center;
      .logo {
        width: 175px;
        padding: 30px 0 40px;
      }
      h4 {
        font-size: 30px;
        color: #333;
        font-weight: 600;
      }
      > p {
        width: 30px;
        height: 3px;
        background: rgba(255, 58, 58, 1);
        border-radius: 2px;
        margin: 20px auto 50px;
      }
      .list {
        display: flex;
        flex-direction: column;
        p {
          display: flex;
          align-items: center;
          justify-content: center;
          margin-bottom: 20px;
          i {
            font-size: 22px;
            color: #ff523d;
          }
          span {
            font-size: 15px;
            color: #333;
            margin-left: 20px;
            width: 100px;
            text-align: left;
            white-space: nowrap;
          }
        }
      }
      .btn {
        margin: 114px 20px 0;
        a {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 100%;
          height: 45px;
          background: linear-gradient(
            134deg,
            rgba(255, 143, 85, 1) 0%,
            rgba(255, 108, 80, 1) 51%,
            rgba(255, 84, 61, 1) 100%
          );
          border-radius: 25px;
          font-size: 18px;
          color: #fff;
          background: #ff523d;
          font-weight: 500;
        }
      }
    }
  }
}
</style>
