Browse Source

刷新,user

lyn7568 6 years ago
parent
commit
0cd98e8cec

+ 1 - 0
src/views/accountSettings/modifyAccountInformation.vue

@ -130,6 +130,7 @@
130 130
          if (valid) {
131 131
            that.$http.put(modifyUrl, that.ruleForm2, (response) => {
132 132
              if (response.success) {
133
                that.$refs[formName].resetFields()
133 134
                that.$message({
134 135
                  message: '资料修改成功',
135 136
                  type: 'success'

+ 7 - 6
src/views/accountSettings/modifyPassword.vue

@ -66,11 +66,12 @@
66 66
    },
67 67
    methods: {
68 68
      submitForm(formName) {
69
        this.$refs[formName].validate((valid) => {
69
        var that = this
70
        that.$refs[formName].validate((valid) => {
70 71
          if (valid) {
71
            this.$http.post(passUrl, { npw: this.ruleForm2.pass }, (response) => {
72
            that.$http.post(passUrl, { npw: that.ruleForm2.pass }, (response) => {
72 73
              if (response.success) {
73
                this.$confirm('密码已修改,快去登录吧!', '修改密码', {
74
                that.$confirm('密码已修改,快去登录吧!', '修改密码', {
74 75
                  confirmButtonText: '确定',
75 76
                  cancelButtonText: '取消',
76 77
                  center: true,
@ -79,16 +80,16 @@
79 80
                  closeOnClickModal: false,
80 81
                  type: 'success'
81 82
                }).then(() => {
82
                  this.$store.dispatch('LogOut').then((response) => {
83
                  that.$refs[formName].resetFields()
84
                  that.$store.dispatch('LogOut').then((response) => {
83 85
                    if (response.success) {
84
                      this.$router.push('/login')
86
                      that.$router.push('/login')
85 87
                    }
86 88
                  })
87 89
                })
88 90
              }
89 91
            })
90 92
          } else {
91
            console.log('error submit!!')
92 93
            return false
93 94
          }
94 95
        })