<template>
  <div class="f-main">
    <template v-if="stepLast === 'last'">
      <div class="content-top">
        <p>验证手机</p>
      </div>
      <div class="page-part page-last">
        <h4><img src="/images/all/pass.png"><span>重置成功</span></h4>
        <p>及时更新最的手机号码能极大地提高账号安全性！</p>
      </div>
      <div class="page-part">
        <mt-button size="large" type="primary" @click="sureAccount()">完 成</mt-button>
      </div>
    </template>
    <template v-if="stepLast === 'appeal'">
      <div class="content-top">
        <p>账号申诉</p>
      </div>
      <div class="page-part page-last">
        <h4><img src="/images/all/pass.png"><span>申诉已提交</span></h4>
        <p>申诉内容已提交，请耐心等待审核</p>
      </div>
      <div class="page-part">
        <mt-button size="large" type="primary" @click="sureAccount()">确 认</mt-button>
      </div>
    </template>
  </div>
</template>

<script>
  export default {
    name: 'step-success',
    props: ['stepLast'],
    methods: {
      sureAccount () {
        if (this.$route.query.returnURL) {
          window.location.href = decodeURIComponent(this.$route.query.returnURL)
        } else {
          this.$router.push('/')
        }
      }
    }
  }
</script>
