From 42faef34194c466f03e29d75a63ae502e4213044 Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Tue, 06 Jan 2026 10:38:46 +0800
Subject: [PATCH] 上一版是10.10的, 这版才是原始源码

---
 src/views/register/index.vue |  112 ++++++++++++++++++++++++--------------------------------
 1 files changed, 48 insertions(+), 64 deletions(-)

diff --git a/src/views/register/index.vue b/src/views/register/index.vue
index d404dda..08faeac 100644
--- a/src/views/register/index.vue
+++ b/src/views/register/index.vue
@@ -6,37 +6,33 @@
     <Step :step="1"></Step>
     <div class="title textColor">{{ $t("register") }}</div>
     <div class="flex re-tab">
-      <!-- <div class="textColor1" :class="activeIndex == 0 ? 'active' : ''" @click="changeIndex(0)">
+      <div class="textColor1" :class="activeIndex == 0 ? 'active' : ''" @click="changeIndex(0)">
         {{ $t("account") }}
-      </div> -->
-      <div class="textColor1" :class="activeIndex == 2 ? 'active' : ''" @click="changeIndex(2)">
-        {{ $t("phoneNum") }}
       </div>
       <div class="textColor1" :class="activeIndex == 1 ? 'active' : ''" @click="changeIndex(1)">
         {{ $t("email") }}
       </div>
-      <!-- yyhh -->
+	  <!-- yyhh -->
+   <!--   <div class="textColor1" :class="activeIndex == 2 ? 'active' : ''" @click="changeIndex(2)">
+        {{ $t("phoneNum") }}
+      </div> -->
     </div>
     <ExInput :label="getRegType(activeIndex, true)" :placeholderText="getRegType(activeIndex, false)" v-model="username"
       :area="isArea" :dialCode="dialCode" @selectArea="onSelectArea" :icon="icon" />
 
     <ExInput :label="$t('setPassword')" :placeholderText="$t('passwordTips')" v-model="password" typeText="password" />
     <ExInput :label="$t('repassword')" :placeholderText="$t('surePassword')" v-model="repassword" typeText="password" />
-
-    <!-- <ExInput :label="$t('setSafeword')" :placeholderText="$t('safewordTips')" v-model="safeword" typeText="password"
-      v-if="activeIndex === 1" /> -->
-
-    <div class="inputCom" v-if="activeIndex === 2">
+    <ExInput :label="$t('setSafeword')" :placeholderText="$t('safewordTips')" v-model="safeword" typeText="password"
+      v-if="activeIndex === 1" />
+    <div class="inputCom" v-if="activeIndex === 1">
       <p class="label textColor">{{ $t("验证码") }}</p>
       <div class="iptbox inputBackground">
-        <input class="inputBackground textColor" type="text" :placeholder="$t('entryVerifyCode')"
-          v-model="verifyCode" />
+        <input class="inputBackground textColor" type="text" :placeholder="$t('entryVerifyCode')" v-model="verifyCode" />
         <span v-if="type !== 3" @click="senCode">{{ $t("sendVerifyCode") }}
           <template v-if="time">({{ time }})s</template>
         </span>
       </div>
     </div>
-
     <ExInput :label="$t('invitCode')" :placeholderText="$t('entryInvitCode')" v-model="invitCode" :clearBtn="false" />
     <div class="protocol textColor">
       <i @click="agreeProt">
@@ -45,8 +41,8 @@
       </i>
       {{ $t("readAgree")
       }}<span class="colorMain" @click="router.push('/aboutUs?serviceTerm=1')">{{
-        $t("serviceConf")
-      }}</span>
+  $t("serviceConf")
+}}</span>
     </div>
     <van-button class="w-full" style="margin-top: 10px" type="primary" @click="register">{{ $t("register") }}
     </van-button>
@@ -56,8 +52,8 @@
     </div>
     <nationality-list ref="controlChildRef" :title="$t('selectArea')" @getName="getName"></nationality-list>
 
-    <Vcode :imgs="[img1, img2]" :show="show" @success="onSuccess" :canvasHeight="200" @fail="onFail"
-      @close="show = false" sliderText="" :successText="$t('vertifyPass')" :failText="$t('vertifuFail')" />
+    <Vcode :imgs="[img1, img2]" :show="show" @success="onSuccess" :canvasHeight="200" @fail="onFail" @close="show = false"
+      sliderText="" :successText="$t('vertifyPass')" :failText="$t('vertifuFail')" />
 
     <div>{{ msg }}</div>
   </div>
@@ -66,7 +62,7 @@
 <script setup>
 import ExInput from "@/components/ex-input/index.vue";
 import Step from "./step.vue";
-import { _registerUser, _sendVerifyCode, _registerVerifcodeUser } from "@/service/login.api";
+import { _registerUser, _sendVerifyCode } from "@/service/login.api";
 import { _bindEmailRegister } from "@/service/user.api.js";
 import { useUserStore } from "@/store/user";
 import { GET_USERINFO } from "@/store/types.store";
@@ -99,9 +95,9 @@
 const safeword = ref("");
 const fundPassword = ref("");
 const refundPassword = ref("");
-const activeIndex = ref(2);
+const activeIndex = ref(0);
 const typeText = ref("password");
-let isArea = ref(true);
+let isArea = ref(false);
 let dialCode = ref(0);
 let icon = ref("");
 const state = reactive({
@@ -148,7 +144,7 @@
   }
 
   _sendVerifyCode({
-    target: activeIndex.value === 1 ? username.value : `${dialCode.value}${username.value}`,
+    target: username.value,
   })
     .then((res) => {
       time.value = 60;
@@ -208,14 +204,14 @@
       showToast(t("entryCorrectEmail"));
       return;
     }
-    // if (safeword.value == "") {
-    //   showToast(t("safewordTips"));
-    //   return;
-    // }
-    // if (verifyCode.value.length < 6) {
-    //   showToast(t("entryVerifyTips"));
-    //   return;
-    // }
+    if (safeword.value == "") {
+      showToast(t("safewordTips"));
+      return;
+    }
+    if (verifyCode.value.length < 6) {
+      showToast(t("entryVerifyTips"));
+      return;
+    }
   } else if (activeIndex.value == 2) {
     if (!/(^[1-9]\d*$)/.test(username.value)) {
       showToast(t("entryPhone"));
@@ -223,10 +219,6 @@
     }
     if (username.value == "") {
       showToast(t("entryPhone"));
-      return;
-    }
-    if (verifyCode.value == "") {
-      showToast(t("请输入6位验证码"));
       return;
     }
   }
@@ -271,28 +263,22 @@
       break;
     }
   }
-  // 需要验证码
-  if (activeIndex.value === 2) {
-    // _bindEmailRegister({
-    _registerVerifcodeUser({
-      // username: username.value,
-      userName: activeIndex.value === 1 ? username.value : `${dialCode.value}${username.value}`,
+
+  if (activeIndex.value === 1) {
+    _bindEmailRegister({
+      username: username.value,
       password: password.value,
-      type: activeIndex.value === 1 ? "2" : '1', // 2邮箱,1手机号
+      type: "2", // 2邮箱
       verifcode: verifyCode.value,
-      // usercode: invitCode.value,
-      userCode: invitCode.value,
-      // safeword: safeword.value,
+      usercode: invitCode.value,
+      safeword: safeword.value,
     }).then((res) => {
       userStore[GET_USERINFO](res);
       store.state.user.userInfo = res;
       // 其他操作??
-      // router.push("/identity"); // 身份认证
-      router.push("/setFond"); // 资金密码认证
+      router.push("/identity");
     });
-  }
-  // 手机账户注册, 无需验证码 (邮箱注册也调用这)
-  else {
+  } else {
     _registerUser({
       userName:
         activeIndex.value === 0 || activeIndex.value === 1
@@ -305,22 +291,20 @@
     }).then((res) => {
       userStore[GET_USERINFO](res);
       store.state.user.userInfo = res;
-      // if (activeIndex.value != 2) {
-      router.push("/setFond");
-      // }
-      // 手机号注册跳转获取验证码
-      // else {
-      //   router.push({
-      //     name: "verify",
-      //     query: {
-      //       type: activeIndex.value,
-      //       account:
-      //         activeIndex.value == 1
-      //           ? username.value
-      //           : `${dialCode.value}${username.value}`,
-      //     },
-      //   });
-      // }
+      if (activeIndex.value == 0) {
+        router.push("/setFond");
+      } else {
+        router.push({
+          name: "verify",
+          query: {
+            type: activeIndex.value,
+            account:
+              activeIndex.value == 1
+                ? username.value
+                : `${dialCode.value}${username.value}`,
+          },
+        });
+      }
     });
   }
 };

--
Gitblit v1.9.3