From 045235121ba199cc885a8dd4f21b65fea8cdcc2a Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Thu, 09 Oct 2025 15:12:30 +0800
Subject: [PATCH] 1

---
 src/views/register/index.vue |   49 ++++++++++++++++++++++++++++++++++---------------
 1 files changed, 34 insertions(+), 15 deletions(-)

diff --git a/src/views/register/index.vue b/src/views/register/index.vue
index 0a6bca8..de0ff1c 100644
--- a/src/views/register/index.vue
+++ b/src/views/register/index.vue
@@ -10,33 +10,40 @@
             <!-- <div class="textColor1" :class="activeIndex == 0 ? 'active' : ''" @click="changeIndex(0)">{{
                 $t('account')
             }}</div> -->
-            <div class="textColor1" :class="activeIndex == 1 ? 'active' : ''" @click="changeIndex(1)">{{ $t('email') }}
+            <div class="textColor1" :class="activeIndex == 1 ? 'active' : ''" @click="changeIndex(1)">
+                {{ $t('电子邮箱') }}
             </div>
-            <div class="textColor1" :class="activeIndex == 2 ? 'active' : ''" @click="changeIndex(2)">{{
-                $t('phoneNum')
-                }}</div>
+            <div class="textColor1" :class="activeIndex == 2 ? 'active' : ''" @click="changeIndex(2)">
+                {{ $t('手机号码') }}
+            </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('设置登录密码')" :placeholderText="$t('passwordTips')" v-model="password"
+        <ExInput :label="$t('设置登录密码')" :placeholderText="$t('请输入8-16位字符,必须包含大写字母、和特殊字符')" v-model="password"
             typeText="password" />
-        <ExInput :label="$t('确认登录密码')" :placeholderText="$t('surePassword')" v-model="repassword"
-            typeText="password" />
-        <ExInput :label="$t('setSafeword')" :placeholderText="$t('设置6位数字资金密码')" v-model="safeword" typeText="password"
-            v-if="activeIndex === 1 || activeIndex === 2" />
+        <ExInput :label="$t('确认登录密码')" :placeholderText="$t('surePassword')" v-model="repassword" typeText="password" />
+        <ExInput :label="$t('setSafeword')" :placeholderText="$t('请输入6位阿拉伯数字的资金密码')" v-model="safeword"
+            typeText="password" v-if="activeIndex === 1 || activeIndex === 2" />
         <div class="inputCom" v-if="activeIndex === 1 || activeIndex === 2">
             <p class="label  textColor" v-if="activeIndex == 1">{{ $t('邮箱验证码') }}</p>
+            <p class="label  textColor" v-else-if="activeIndex == 2">{{ $t('手机验证码') }}</p>
             <p class="label  textColor" v-else>{{ $t('验证码') }}</p>
             <div class="iptbox inputBackground">
-                <input class="inputBackground textColor" type="text" :placeholder="$t('entryVerifyCode')"
+
+                <input class="inputBackground textColor" type="text"
+                    :placeholder="activeIndex == 1 ? $t('请输入邮箱验证码') : activeIndex == 2 ? $t('请输入手机验证码') : $t('entryVerifyCode')"
                     v-model="verifyCode">
-                <span v-if="type !== 3" @click="senCode">{{ $t('sendVerifyCode') }}
+
+                <span v-if="type !== 3" @click="senCode">
+                    <span v-if="activeIndex == 1">{{ $t('发送邮箱验证码') }}</span>
+                    <span v-else-if="activeIndex == 2">{{ $t('发送手机验证码') }}</span>
+                    <span v-else>{{ $t('sendVerifyCode') }}</span>
                     <template v-if="time">({{ time }})s</template>
                 </span>
             </div>
         </div>
-        <ExInput :label="$t('金融机构代码')" :placeholderText="$t('请输入')" v-model="invitCode" :clearBtn="false" />
+        <ExInput :label="$t('金融机构代码')" :placeholderText="$t('请输入金融机构识别码')" v-model="invitCode" :clearBtn="false" />
         <div class="protocol textColor">
             <i @click="agreeProt">
                 <img v-show="agree" src="../../assets/image/login/prot2.png" alt="" />
@@ -143,9 +150,9 @@
         case 0:
             return bFlag ? t('account') : t('entryAccount');
         case 1:
-            return bFlag ? t('email') : t('entryEmail');
+            return bFlag ? t('电子邮箱') : t('entryEmail');
         case 2:
-            return bFlag ? t('phoneNum') : t('entryPhone');
+            return bFlag ? t('手机号码') : t('请输入手机号码');
     }
 }
 
@@ -195,6 +202,13 @@
 const agreeProt = () => {
     agree.value = !agree.value
 }
+
+// 密码验证
+const validatePassword = (password) => {
+    const passwordRegex = /^(?=.*[A-Z])(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]).{8,16}$/;
+    return passwordRegex.test(password);
+}
+
 const register = () => {
     console.log(activeIndex.value, 'activeIndex.value')
     if (activeIndex.value == 0) {
@@ -234,7 +248,8 @@
         showToast(t('entryPassword'));
         return
     }
-    if (password.value.length < 6) {
+
+    if (!validatePassword(password.value)) {
         showToast(t('passwordTips'));
         return
     }
@@ -242,6 +257,10 @@
         showToast(t('noSamePassword'));
         return
     }
+    if (invitCode.value.length == '') {
+        showToast(t('请输入金融机构代码'));
+        return
+    }
     if (!agree.value) {
         showToast(t('agreeServiceCond'));
         return

--
Gitblit v1.9.3