fix: 状态码使用常量避免后续变更
This commit is contained in:
@@ -5,6 +5,7 @@ import { register } from '@/api/login';
|
||||
import { regExpPasswd, regExpUserName } from '@/utils/regular-utils';
|
||||
import { useRouter } from 'vue-router';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -44,7 +45,7 @@ function fnFinish() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
register(toRaw(state.form))
|
||||
.then(res => {
|
||||
if (res.code === 1) {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
Modal.success({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.register.tipContent', {
|
||||
|
||||
Reference in New Issue
Block a user