Blame view

ant-design-vue-jeecg/src/views/user/alteration/Step4.vue 980 Bytes
肖超群 authored
1
2
<template>
  <div>
肖超群 authored
3
    <a-form style="margin: 40px auto 0;">
肖超群 authored
4
5
      <result title="更改密码成功" :is-success="true">
        <div class="toLogin">
肖超群 authored
6
          <h3>将在<span>{{ time }}</span>秒后返回登录页面.</h3>
肖超群 authored
7
8
9
        </div>
      </result>
肖超群 authored
10
    </a-form>
肖超群 authored
11
12
13
14
  </div>
</template>

<script>
肖超群 authored
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Result from '@/views/result/Result'

export default {
  name: "Step4",
  props: ['userList'],
  components: {
    Result
  },
  data() {
    return {
      loading: false,
      time: 0,
    }
  },
  methods: {
    countDown() {
肖超群 authored
31
      let that = this;
肖超群 authored
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
      that.time--;
    }
  },
  mounted() {
    let that = this;
    that.time = 5;
    setInterval(that.countDown, 1000);
  },
  watch: {
    time: function (newVal, oldVal) {
      if (newVal == 0) {
        var params = {
          username: this.userList.username
        };
        this.$router.push({name: 'login', params})
肖超群 authored
47
48
49
      }
    }
  }
肖超群 authored
50
}
肖超群 authored
51
52
</script>
<style scoped>
肖超群 authored
53
54
55
.toLogin {
  text-align: center;
}
肖超群 authored
56
</style>