|
@@ -330,15 +330,17 @@ const submitForm = async (formEl) => {
|
|
|
const res = await store.create(info)
|
|
|
if (res.errcode === 0) {
|
|
|
const form = { ...{ user: get(res.data, '_id'), ...get(data, 'info') } }
|
|
|
- const expert = await companyStore.create(form)
|
|
|
- if (expert.errcode === 0) {
|
|
|
+ const arr = await companyStore.create(form)
|
|
|
+ if (arr.errcode === 0) {
|
|
|
ElMessage({
|
|
|
message: '注册用户成功,审核中请稍后登录',
|
|
|
type: 'success'
|
|
|
})
|
|
|
router.push({ path: '/login' })
|
|
|
+ } else {
|
|
|
+ ElMessage({ message: `${arr.errmsg}`, type: 'error' })
|
|
|
}
|
|
|
- }
|
|
|
+ } else ElMessage.error(res.message)
|
|
|
} else {
|
|
|
console.log('error submit!', fields)
|
|
|
}
|