guhongwei 4 years ago
parent
commit
85d616e5dd
2 changed files with 4 additions and 4 deletions
  1. 3 1
      src/layout/layout-part/parts/passwdDia.vue
  2. 1 3
      src/store/login.js

+ 3 - 1
src/layout/layout-part/parts/passwdDia.vue

@@ -42,7 +42,9 @@ export default {
         if (valid) {
           this.form.id = this.user.id;
           let res = this.loginUpdate(this.form);
-          console.log(res);
+          if (this.$checkRes(res)) {
+            this.$router.push('/login');
+          }
         } else {
           console.log('error submit!!');
           return false;

+ 1 - 3
src/store/login.js

@@ -94,9 +94,7 @@ const actions = {
     commit('deleteUser');
   },
   async update({ commit }, payload) {
-    let res = await this.$axios.$post(`${api.uppasswdInfo}`, {
-      payload,
-    });
+    const res = await this.$axios.$post(`${api.uppasswdInfo}`, payload);
     return res;
   },
 };