diff --git a/.env.development b/.env.development
index 09628d1..023afc4 100644
--- a/.env.development
+++ b/.env.development
@@ -12,7 +12,7 @@ VITE_DROP_CONSOLE = true
# 跨域代理,可以配置多个,请注意不要换行
#VITE_PROXY = [["/appApi","http://localhost:8001"],["/upload","http://localhost:8001/upload"]]
-VITE_PROXY=[["/api","http://192.168.124.203:8081/api"]]
+VITE_PROXY=[["/api","http://127.0.0.1:8081/api"]]
# API 接口地址
VITE_GLOB_API_URL =
diff --git a/src/views/login/RegisterForm.vue b/src/views/login/RegisterForm.vue
index e9b1a9c..1d82de3 100644
--- a/src/views/login/RegisterForm.vue
+++ b/src/views/login/RegisterForm.vue
@@ -4,12 +4,12 @@
:show-label="false"
:show-require-mark="false"
size="large"
- :model="formInline"
+ :model="formData"
:rules="rules"
class="register-form"
>
-
+
@@ -18,7 +18,7 @@
-
+
@@ -27,7 +27,7 @@
-
+
@@ -41,12 +41,7 @@
-
+
@@ -56,7 +51,7 @@
- 我同意隐私协议
+ 我同意隐私协议
@@ -108,22 +103,10 @@
const isGetCode = ref(false);
const emit = defineEmits(['backLogin']);
- // /**
- // * 定义表单接口
- // */
- // interface FormState {
- // username: string;
- // password: string;
- // retPassword: string;
- // mobile: string;
- // code: string;
- // agreement: boolean;
- // }
-
/**
* 定义表单参数
*/
- const formInline = reactive({
+ const formData = reactive({
username: '',
password: '',
retPassword: '',
@@ -160,16 +143,7 @@
loading.value = true;
formRef.value.validate(async (valid) => {
if (valid) {
- // 定义表单数据
- const params = {
- username: formInline.username,
- password: formInline.password,
- retPassword: formInline.retPassword,
- mobile: formInline.mobile,
- code: formInline.code,
- agreement: formInline.agreement,
- };
- const { code, msg } = await register(params);
+ const { code, msg } = await register(formData);
if (code == ResultEnum.SUCCESS) {
ElMessage.success('注册成功,请登录');
backLogin();
@@ -198,7 +172,7 @@
* 获取验证码
*/
function getCode() {
- if (!formInline.mobile) {
+ if (!formData.mobile) {
formRef.value.validateField('mobile');
return;
}