1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
| <template>
| <div>
| <a-form style="margin: 40px auto 0;">
| <result title="更改密码成功" :is-success="true">
| <div class="toLogin">
| <h3>将在<span>{{time}}</span>秒后返回登录页面.</h3>
| </div>
| </result>
|
| </a-form>
| </div>
| </template>
|
| <script>
| import Result from '@/views/result/Result'
| export default {
| name: "Step4",
| props:['userList'],
| components: {
| Result
| },
| data () {
| return {
| loading: false,
| time: 0,
| }
| },
| methods: {
| countDown(){
| let that = this;
| 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})
| }
| }
| }
| }
| </script>
| <style scoped>
| .toLogin{
| text-align: center;
| }
| </style>
|
|