|
@@ -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')
|
|
|
}
|