<template>
  <div class="f-main">
    <div class="content-top">
      <p>密码重置</p>
    </div>
    <template v-if="stepLast === 'new'">
      <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="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-last',
    props: ['stepLast'],
    data () {
      return {
        valid: {
          mobile: '',
          captcha: ''
        }
      }
    },
    methods: {
      sureAccount () {
        if (this.$route.query.returnURL) {
          window.location.href = decodeURIComponent(this.$route.query.returnURL)
        } else {
          this.$router.push('/')
        }
      }
    }
  }
</script>
