Browse Source

修改操作

zs 1 year ago
parent
commit
dd36c437b6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/center/index.vue

+ 2 - 2
src/views/center/index.vue

@@ -262,7 +262,7 @@ const submitForm = async (formEl) => {
     if (valid) {
       const data = cloneDeep(form.value)
       const res = await store.update(data)
-      if (res.errcode === 0) search()
+      if ($checkRes(res, true)) search()
     } else {
       console.log('error submit!', fields)
     }
@@ -279,7 +279,7 @@ const submit = async (formEl) => {
         _id: user.value._id,
         password: data.password
       })
-      if (res.errcode === 0) {
+      if ($checkRes(res, true)) {
         userStore.logOut()
         router.push('/login')
       }