Jelajahi Sumber

feat: 国内分销商门户注册登录调整

周玉环 1 Minggu lalu
induk
melakukan
c11112733d

+ 145 - 0
xinkeaboard-web/components/login/Email.vue

@@ -0,0 +1,145 @@
+<template>
+  <div class="center">
+    <div class="item account">
+      <span
+        style="color: #bbb; font-size: 19px; padding-top: 7px"
+        class="icon iconfont icon-wode"
+      ></span>
+      <input
+        type="text"
+        v-model="name"
+        :placeholder="L['请输入邮箱']"
+        class="input"
+        @blur="validateEmail"
+        autocomplete="off"
+      />
+      <div data-type="userName" class="cancel" @click="clearInputVal('name')">
+        <span style="color: #bbb" class="iconfont icon-cuowu"></span>
+      </div>
+    </div>
+    <div class="error" v-if="emailErrorMsg">
+      <span
+        style="color: #e1251b; font-size: 14px"
+        class="iconfont icon-jubao"
+      ></span>
+      {{ emailErrorMsg }}
+    </div>
+    <div class="item password">
+      <span
+        style="color: #bbb; font-size: 21px; padding-top: 7px"
+        class="icon iconfont icon-mima1"
+      ></span>
+      <input
+        type="password"
+        v-model="password"
+        :placeholder="L['请输入密码']"
+        class="input"
+        autocomplete="new-password"
+      />
+      <div
+        data-type="password"
+        class="cancel"
+        @click="clearInputVal('password')"
+      >
+        <span style="color: #bbb" class="iconfont icon-cuowu"></span>
+      </div>
+    </div>
+
+    <div class="error" v-if="errorMsg">
+      <span
+        style="color: #e1251b; font-size: 14px"
+        class="iconfont icon-jubao"
+      ></span>
+      {{ errorMsg }}
+    </div>
+    <el-button
+      @click="login"
+      :class="{ submit: true, disabled: loginDisabled }"
+      :disabled="loginDisabled"
+      :loading="props.loginLoding"
+      >{{ L["登录"] }}</el-button
+    >
+  </div>
+</template>
+
+<script setup>
+const props = defineProps({
+  loginLoding: {
+    type: Boolean,
+    default: false
+  },
+});
+const emits = defineEmits(["login"]);
+const errorMsg = ref(); //错误提示
+const name = ref(""); //账户
+const password = ref(""); //密码
+const emailCalc = ref();
+const pwdCalc = ref();
+const emailErrorMsg = ref("");
+const loginType = ref(1); //登陆类型:1-账号密码登陆,2-手机验证码登陆
+
+const L = getCurLanguage();
+
+const loginDisabled = computed(() => !name.value || !password.value);
+
+// 校验邮箱
+const validateEmail = () => {
+  //邮箱非空的验证
+  if (!name.value) {
+    emailErrorMsg.value = L["请输入邮箱"];
+    return false;
+  }
+
+  // 邮箱格式验证
+  emailCalc.value = checkEmail(name.value);
+  if (emailCalc.value !== true) {
+    emailErrorMsg.value = emailCalc.value;
+    return false;
+  }
+  emailErrorMsg.value = "";
+
+  return true;
+};
+
+//清空输入框内容
+const clearInputVal = (type) => {
+  if (type == "name") {
+    name.value = "";
+  } else if (type == "password") {
+    password.value = "";
+  }
+};
+
+const login = () => {
+  let param = {};
+  param.username = name.value;
+  param.password = password.value;
+  param.loginType = loginType.value;
+
+  //邮箱验证
+  if (!validateEmail()) return;
+
+  //密码校验
+  if (!param.password) {
+    errorMsg.value = L["请输入密码"];
+    return false;
+  } else {
+    pwdCalc.value = checkPwd(param.password);
+    if (pwdCalc.value !== true) {
+      errorMsg.value = pwdCalc.value;
+      return false;
+    }
+  }
+  errorMsg.value = "";
+  loginLoding.value = true;
+  emits("login", param);
+};
+
+const updateErrorMsg = (val) => {
+  errorMsg.value = val
+}
+
+defineExpose({
+  updateErrorMsg
+})
+</script>

+ 148 - 0
xinkeaboard-web/components/login/Phone.vue

@@ -0,0 +1,148 @@
+<template>
+  <div class="center">
+    <div class="item account">
+      <span
+        style="color: #bbb; font-size: 19px; padding-top: 7px"
+        class="icon iconfont icon-wode"
+      ></span>
+      <input
+        type="text"
+        v-model="phone"
+        :placeholder="L['请输入手机号']"
+        class="input"
+        @blur="validatePhone"
+        autocomplete="off"
+      />
+      <div data-type="userName" class="cancel" @click="clearInputVal('phone')">
+        <span style="color: #bbb" class="iconfont icon-cuowu"></span>
+      </div>
+    </div>
+    <div class="error" v-if="phoneErrorMsg">
+      <span
+        style="color: #e1251b; font-size: 14px"
+        class="iconfont icon-jubao"
+      ></span>
+      {{ phoneErrorMsg }}
+    </div>
+    <div class="item password">
+      <span
+        style="color: #bbb; font-size: 21px; padding-top: 7px"
+        class="icon iconfont icon-mima1"
+      ></span>
+      <input
+        type="password"
+        v-model="password"
+        :placeholder="L['请输入密码']"
+        class="input"
+        autocomplete="new-password"
+      />
+      <div
+        data-type="password"
+        class="cancel"
+        @click="clearInputVal('password')"
+      >
+        <span style="color: #bbb" class="iconfont icon-cuowu"></span>
+      </div>
+    </div>
+
+    <div class="error" v-if="errorMsg">
+      <span
+        style="color: #e1251b; font-size: 14px"
+        class="iconfont icon-jubao"
+      ></span>
+      {{ errorMsg }}
+    </div>
+    <el-button
+      @click="login"
+      :class="{ submit: true, disabled: loginDisabled }"
+      :disabled="loginDisabled"
+      :loading="props.loginLoding"
+      >{{ L["登录"] }}</el-button
+    >
+  </div>
+</template>
+
+<script setup>
+const props = defineProps({
+  loginLoding: {
+    type: Boolean,
+    default: false
+  },
+});
+const emits = defineEmits(["login"]);
+
+const errorMsg = ref(); //错误提示
+const phone = ref(""); //手机号
+const password = ref(""); //密码
+const phoneCalc = ref();
+const pwdCalc = ref();
+const phoneErrorMsg = ref("");
+const loginLoding = ref(false);
+const loginType = ref(1); //登陆类型:1-账号密码登陆,2-手机验证码登陆
+
+const L = getCurLanguage();
+
+const loginDisabled = computed(() => !phone.value || !password.value);
+
+// 校验邮箱
+const validatePhone = () => {
+  //邮箱非空的验证
+  if (!phone.value) {
+    phoneErrorMsg.value = L["请输入手机号"];
+    return false;
+  }
+
+  // 邮箱格式验证
+  phoneCalc.value = checkPhone(phone.value);
+  if (phoneCalc.value !== true) {
+    phoneErrorMsg.value = phoneCalc.value;
+    return false;
+  }
+  phoneErrorMsg.value = "";
+
+  return true;
+};
+
+//清空输入框内容
+const clearInputVal = (type) => {
+  if (type == "phone") {
+    phone.value = "";
+  } else if (type == "password") {
+    password.value = "";
+  }
+};
+
+const login = () => {
+  let param = {};
+  param.phone = phone.value;
+  param.password = password.value;
+  param.loginType = loginType.value;
+
+  //邮箱验证
+  if (!validatePhone()) return;
+
+  //密码校验
+  if (!param.password) {
+    errorMsg.value = L["请输入密码"];
+    return false;
+  } else {
+    pwdCalc.value = checkPwd(param.password);
+    if (pwdCalc.value !== true) {
+      errorMsg.value = pwdCalc.value;
+      return false;
+    }
+  }
+  errorMsg.value = ''
+
+  loginLoding.value = true;
+  emits("login", param);
+};
+
+const updateErrorMsg = (val) => {
+  errorMsg.value = val
+}
+
+defineExpose({
+  updateErrorMsg
+})
+</script>

+ 13 - 1
xinkeaboard-web/components/register/RegisterAccount.vue

@@ -142,6 +142,10 @@ const props = defineProps({
     type: String,
     default: "",
   },
+  phone: {
+    type: String,
+    default: "",
+  }
 });
 
 const agreeFlag = ref(false); //同意注册协议标识,默认不同意
@@ -193,12 +197,20 @@ const joinForFree = () => {
 
   // 注册账号
   joinForFreeLoading.value = true;
-  post("/v3/member/front/active/register", {
+  const baseParams = {
     confirmPassword: confirmPassword.value,
     email: props.email,
     nickName: name.value,
     password: password.value,
+    phone: props.phone
+  }
+  const params = {}
+  Object.keys(baseParams).forEach(key => {
+    if (baseParams[key]) {
+      params[key] = baseParams[key]
+    }
   })
+  post("/v3/member/front/active/register", params)
     .then((res) => {
       if (res.state === 200) {
         showMessage({

+ 38 - 39
xinkeaboard-web/components/register-distributor/RegistPhone.vue → xinkeaboard-web/components/register/RegisterPhone.vue

@@ -10,8 +10,8 @@
       ></span>
       <input
         type="text"
-        v-model="email"
-        :placeholder="L['请输入邮箱']"
+        v-model="phone"
+        :placeholder="L['请输入手机号']"
         class="input"
         autocomplete="off"
       />
@@ -19,21 +19,21 @@
         <span style="color: #bbb" class="iconfont icon-cuowu"></span>
       </div>
     </div>
-    <div class="error" v-if="emailErrorMsg">
+    <div class="error" v-if="phoneErrorMsg">
       <span
         style="color: #e1251b; font-size: 14px"
         class="iconfont icon-jubao"
       ></span>
-      {{ emailErrorMsg }}
+      {{ phoneErrorMsg }}
     </div>
-    <!-- 邮箱验证码 -->
+    <!-- 手机号验证码 -->
     <div class="verify-code">
       <span class="verify-code-icon">
         <img src="/register/mail_success.png" alt="" />
       </span>
       <input
         type="text"
-        v-model="emailCode"
+        v-model="phoneCode"
         :placeholder="L['请输入验证码']"
         class="input"
         autocomplete="off"
@@ -49,12 +49,12 @@
         </el-button>
       </span>
     </div>
-    <div class="error" v-if="emailCodeErrorMsg">
+    <div class="error" v-if="phoneCodeErrorMsg">
       <span
         style="color: #e1251b; font-size: 14px"
         class="iconfont icon-jubao"
       ></span>
-      {{ emailCodeErrorMsg }}
+      {{ phoneCodeErrorMsg }}
     </div>
     <el-button
       @click="next"
@@ -88,11 +88,11 @@ const emits = defineEmits(["success"]);
 
 const L = getCurLanguage();
 
-const emailCalc = ref();
-const email = ref(""); //邮箱
-const emailCode = ref(""); // 邮箱验证码
-const emailErrorMsg = ref(); //错误提示
-const emailCodeErrorMsg = ref(); //验证码错误提示
+const phoneCalc = ref();
+const phone = ref(""); //手机号
+const phoneCode = ref(""); // 手机号验证码
+const phoneErrorMsg = ref(); //错误提示
+const phoneCodeErrorMsg = ref(); //验证码错误提示
 
 // 人机验证弹窗显示标识
 const modalVisible = ref(false);
@@ -114,13 +114,13 @@ const codeText = computed(() => {
     : L["register"]["获取验证码"];
 });
 
-// 注册邮箱时按钮置灰状态
-const nextDisabled = computed(() => !email.value || !emailCode.value);
+// 注册手机号时按钮置灰状态
+const nextDisabled = computed(() => !phone.value || !phoneCode.value);
 
 //开启人机校验
 const showHMVerify = () => {
-  // 校验邮箱非空以及格式
-  if (!validateEmail()) return;
+  // 校验手机号非空以及格式
+  if (!validatePhone()) return;
   modalVisible.value = true;
 };
 
@@ -128,7 +128,7 @@ const showHMVerify = () => {
 const getVerifyCode = () => {
   getVerifyCodeLoading.value = true;
   post("v3/member/front/active/verification/code", {
-    email: email.value,
+    phone: phone.value,
     source: 1,
     type: 1,
   })
@@ -167,43 +167,42 @@ const verifyFail = () => {
   });
 };
 
-// 校验邮箱
-const validateEmail = () => {
-  //邮箱非空的验证
-  if (!email.value) {
-    emailErrorMsg.value = L["请输入邮箱"];
+// 校验手机号
+const validatePhone = () => {
+  //手机号非空的验证
+  if (!phone.value) {
+    phoneErrorMsg.value = L["请输入手机号"];
     return false;
   }
-
-  // 邮箱格式验证
-  emailCalc.value = checkEmail(email.value);
-  if (emailCalc.value !== true) {
-    emailErrorMsg.value = emailCalc.value;
+  // 手机号格式验证
+  phoneCalc.value = checkPhone(phone.value);
+  if (phoneCalc.value !== true) {
+    phoneErrorMsg.value = phoneCalc.value;
     return false;
   }
-  emailErrorMsg.value = "";
+  phoneErrorMsg.value = "";
 
   return true;
 };
 
-// 邮箱验证码验证
-const validateEmailCode = () => {
-  if (!emailCode.value) {
-    emailCodeErrorMsg.value = L["register"]["请输入邮箱验证码"];
+// 手机号验证码验证
+const validatephoneCode = () => {
+  if (!phoneCode.value) {
+    phoneCodeErrorMsg.value = L["register"]["请输入手机号验证码"];
     return false;
   }
-  emailCodeErrorMsg.value = "";
+  phoneCodeErrorMsg.value = "";
 
   return true;
 };
 
 const next = () => {
-  if (!validateEmail() || !validateEmailCode()) return;
+  if (!validatephone() || !validatephoneCode()) return;
   nextActionLoading.value = true;
   post("v3/member/front/active/check/verification/code", {
-    email: email.value,
+    phone: phone.value,
     type: 1,
-    verificationCode: emailCode.value,
+    verificationCode: phoneCode.value,
   })
     .then((res) => {
       if (res.state == 200) {
@@ -212,7 +211,7 @@ const next = () => {
         //   type: "success",
         // });
         //成功提示,并返回到登录页面
-        emits("success", email.value);
+        emits("success", phone.value);
       } else {
         //提示错误
         showMessage({
@@ -228,7 +227,7 @@ const next = () => {
 
 //清空输入框内容
 const clearInputVal = (type) => {
-  email.value = "";
+  phone.value = "";
 };
 </script>
 <style lang="scss">

+ 48 - 195
xinkeaboard-web/pages/login.vue

@@ -35,71 +35,8 @@
           <div class="top">
             <div class="item1">{{ L["账号登录"] }}</div>
           </div>
-          <div class="center">
-            <div class="item account">
-              <span
-                style="color: #bbb; font-size: 19px; padding-top: 7px"
-                class="icon iconfont icon-wode"
-              ></span>
-              <input
-                type="text"
-                v-model="name"
-                :placeholder="L['请输入邮箱']"
-                class="input"
-                @blur="validateEmail"
-                autocomplete="off"
-              />
-              <div
-                data-type="userName"
-                class="cancel"
-                @click="clearInputVal('name')"
-              >
-                <span style="color: #bbb" class="iconfont icon-cuowu"></span>
-              </div>
-            </div>
-            <div class="error" v-if="emailErrorMsg">
-              <span
-                style="color: #e1251b; font-size: 14px"
-                class="iconfont icon-jubao"
-              ></span>
-              {{ emailErrorMsg }}
-            </div>
-            <div class="item password">
-              <span
-                style="color: #bbb; font-size: 21px; padding-top: 7px"
-                class="icon iconfont icon-mima1"
-              ></span>
-              <input
-                type="password"
-                v-model="password"
-                :placeholder="L['请输入密码']"
-                class="input"
-                autocomplete="new-password"
-              />
-              <div
-                data-type="password"
-                class="cancel"
-                @click="clearInputVal('password')"
-              >
-                <span style="color: #bbb" class="iconfont icon-cuowu"></span>
-              </div>
-            </div>
-
-            <div class="error" v-if="errorMsg">
-              <span
-                style="color: #e1251b; font-size: 14px"
-                class="iconfont icon-jubao"
-              ></span>
-              {{ errorMsg }}
-            </div>
-            <el-button
-              @click="login"
-              :class="{ submit: true, disabled: loginDisabled }"
-              :disabled="loginDisabled"
-              :loading="loginLoding"
-              >{{ L["登录"] }}</el-button
-            >
-          </div>
+          <LoginEmail ref="loginEmail" v-if="appType === 'user'" :loginLoding="loginLoding" @login="login" />
+          <LoginPhone ref="loginPhone" v-if="appType === 'distributor'" :loginLoding="loginLoding" @login="login" />
           <div
             :class="{
               bottom: true,
@@ -128,29 +65,26 @@ import { useUserInfo } from "@/store/user.js";
 import { useFiltersStore } from "@/store/filter.js";
 const configInfo = useUserInfo();
 const filtersStore = useFiltersStore();
-const isLoading = ref(false);
 
-// const L = lang_zn;
+const loginEmail = ref();
+const loginPhone = ref()
+
+const config = useRuntimeConfig();
+const appType = config.public.appType;
+
 const L = getCurLanguage();
 const router = useRouter();
 const route = useRoute();
 const { proxy } = getCurrentInstance();
-const keyEnter = ref(true);
-const errorMsg = ref(); //错误提示
-const name = ref(""); //账户
-const password = ref(""); //密码
-const loginType = ref(1); //登陆类型:1-账号密码登陆,2-手机验证码登陆
+// const keyEnter = ref(true);
+const loginLoding = ref(false)
+
 const defaultImg = ref("/common_top_logo.png");
 const defaultBgImg = ref("/login_bg.png");
 const fromurl = ref("");
 const wxEnable = ref("");
-const pwdCalc = ref();
 const ImgBG = ref("");
-const loginLoding = ref(false);
-const emailCalc = ref();
-const emailErrorMsg = ref('')
 
-const loginDisabled = computed(() => !name.value || !password.value);
 useHead({
   title: "Login",
   meta: [
@@ -165,15 +99,15 @@ useHead({
   ],
 });
 
-//由于这里的回车键触发事件和商品搜索框的回车键触发事件冲突,引入keyEnter变量判断
-if (process.client) {
-  document.onkeydown = function () {
-    var key = window.event.keyCode;
-    if (key == 13 && keyEnter.value) {
-      login();
-    }
-  };
-}
+// //由于这里的回车键触发事件和商品搜索框的回车键触发事件冲突,引入keyEnter变量判断
+// if (process.client) {
+//   document.onkeydown = function () {
+//     var key = window.event.keyCode;
+//     if (key == 13 && keyEnter.value) {
+//       // login();
+//     }
+//   };
+// }
 
 //获取背景图
 const getBg = () => {
@@ -185,103 +119,39 @@ const getBg = () => {
 };
 getBg();
 
-// 校验邮箱
-const validateEmail = () => {
-  //邮箱非空的验证
-  if (!name.value) {
-    emailErrorMsg.value = L["请输入邮箱"];
-    return false;
-  }
-
-  // 邮箱格式验证
-  emailCalc.value = checkEmail(name.value);
-  if (emailCalc.value !== true) {
-    emailErrorMsg.value = emailCalc.value;
-    return false;
-  }
-  emailErrorMsg.value = "";
-
-  return true;
-};
-
-const login = () => {
-  let param = {};
-  param.username = name.value;
-  param.password = password.value;
-  param.loginType = loginType.value;
-
-  //邮箱验证
-  if (!validateEmail()) return;
-
-  //密码校验
-  if (!param.password) {
-    errorMsg.value = L["请输入密码"];
-    return false;
-  } else {
-    pwdCalc.value = checkPwd(param.password);
-    if (pwdCalc.value !== true) {
-      errorMsg.value = pwdCalc.value;
-      return false;
-    }
-  }
-
+const login = (param) => {
   loginLoding.value = true;
-  post("v3/frontLogin/oauth/token", param).then((res) => {
-    if (res.state == 200) {
-      //将用户信息存缓存,并跳转到首页
-      filtersStore.setLoginStatus(true);
-      filtersStore.setToken(res.data.access_token);
-      filtersStore.setRefreshToken(res.data.refresh_token);
-      filtersStore.setTime(new Date().getTime().toString()); //存储refresh_token更新时间
-      //获取用户信息,并同步信息到pinia
+  post("v3/frontLogin/oauth/token", param)
+    .then((res) => {
+      if (res.state == 200) {
+        //将用户信息存缓存,并跳转到首页
+        filtersStore.setLoginStatus(true);
+        filtersStore.setToken(res.data.access_token);
+        filtersStore.setRefreshToken(res.data.refresh_token);
+        filtersStore.setTime(new Date().getTime().toString()); //存储refresh_token更新时间
+        //获取用户信息,并同步信息到pinia
 
-      get("v3/member/front/member/getInfo")
-        .then((res) => {
+        get("v3/member/front/member/getInfo").then((res) => {
           if (res.state == 200) {
             filtersStore.setMemberInfo(res.data);
             router.replace({
-              path: '/'
-            })
-            localStorage.setItem('isLoggedIn', 'true');
-             setTimeout(() => {
-                localStorage.removeItem('isLoggedIn');
-            }, 200)
-            // if (window.history.state.back) {
-            //   router.replace({
-            //     path: '/'
-            //   })
-            //   // if(window.history.state.back == '/register' || window.history.state.back == '/member/login/forget' || window.history.state.back == '/member/login/forget' || window.history.state.back == '/member/login/forget'){
-            //   // window.location.href = "/";
-            //   // }else{
-            //   //   window.location.href = window.history.state.back;
-            //   // }
-            // } else {
-            //   router.replace({ path: "/member/home" });
-            // }
+              path: "/",
+            });
+            localStorage.setItem("isLoggedIn", "true");
+            setTimeout(() => {
+              localStorage.removeItem("isLoggedIn");
+            }, 200);
           }
-        })
-    } else {
-      //提示错误
-      errorMsg.value = res.msg;
-    }
-  }).finally(() => {
-    loginLoding.value = false;
-  })
-};
-//清空输入框内容
-const clearInputVal = (type) => {
-  if (type == "name") {
-    name.value = "";
-  } else if (type == "password") {
-    password.value = "";
-  }
-};
-//登录方式切换
-const changeLoginType = (type) => {
-  loginType.value = type;
-  name.value = "";
-  password.value = "";
-  errorMsg.value = "";
+        });
+      } else {
+        //提示错误
+        const instance = appType === 'user' ? loginEmail.value : loginPhone.value;
+        instance.updateErrorMsg(res.msg)
+      }
+    })
+    .finally(() => {
+      loginLoding.value = false;
+    });
 };
 
 //通过replace方式跳转页面
@@ -291,20 +161,6 @@ const goToPage = (type) => {
   });
 };
 
-watch([name, password], () => {
-  if (loginType.value == 1) {
-    password.value = password.value.substring(0, 20);
-    // name.value = memberEmail.value.substring(0, 20)
-  } else {
-    password.value = password.value.substring(0, 6);
-    // name.value = memberEmail.value.substring(0, .gitignore)
-  }
-
-  if (password.value || name.value) {
-    errorMsg.value = "";
-  }
-});
-
 onMounted(() => {
   if (route.query.redirectUrl) {
     fromurl.value =
@@ -318,13 +174,10 @@ onMounted(() => {
   }
 });
 
-// onBeforeRouteLeave(() => {
-//   keyEnter.value = false;
-// });
 </script>
 <style lang="scss" scoped>
 @import "@/assets/style/register.scss";
-.center {
+:deep(.center) {
   padding: 30px 30px 40px;
 
   .item {

+ 11 - 7
xinkeaboard-web/pages/register.vue

@@ -35,8 +35,9 @@
           <div class="top">
             <div class="item1">{{ title }}</div>
           </div>
-          <RegisterMail v-if="currentStep === 'mail'" @success="(val) => { currentStep = 'account'; email = val  }" />
-          <RegisterAccount v-if="currentStep === 'account'" :email="email" @success="currentStep = 'finish'"/>
+          <RegisterPhone v-if="currentStep === 'first' && appType === 'distributor'" @success="(val) => { currentStep = 'second'; phone = val  }" />
+          <RegisterMail v-if="currentStep === 'first' && appType === 'user'" @success="(val) => { currentStep = 'second'; email = val  }" />
+          <RegisterAccount v-if="currentStep === 'second'" :email="email" :phone="phone" @success="currentStep = 'finish'"/>
           <RegisterSuccess v-if="currentStep === 'finish'"/>
           <div :class="{ bottom: true, flex_row_between_center: true, 'row-reverse': currentStep !== 'emai' }">
             <a href="javascript:void(0)" @click="goToPage('/login')">{{
@@ -62,6 +63,7 @@ import { ElMessage } from "element-plus";
 import { getCurLanguage } from "@/composables/common.js";
 import { useUserInfo } from "@/store/user.js";
 import { useFiltersStore } from "@/store/filter.js";
+import RegisterPhone from "~/components/register/RegisterPhone.vue";
 
 const filtersStore = useFiltersStore();
 const configInfo = useUserInfo();
@@ -73,16 +75,18 @@ const defaultBgImg = ref("/login_bg.png");
 const fromurl = ref("");
 const ImgBG = ref("");
 const email = ref('');
+const phone = ref('')
+
+const config = useRuntimeConfig()
+const appType = config.public.appType;
 
 // 当前步骤标识
-const currentStep = ref("mail");
-// const config = useRuntimeConfig()
-// const appType = config.public.appType;
+const currentStep = ref('first');
 
 const title =
-  currentStep.value === "mail"
+  currentStep.value === "first"
     ? L["注册账号"]
-    : currentStep.value === "account"
+    : currentStep.value === "second"
     ? L["下一步"]
     : "";