添加验证码选择,可以自己选择使用算数或字符串

This commit is contained in:
yazzyk 2025-06-25 17:31:43 +08:00
parent 56efd5d206
commit c377b6b92d
2 changed files with 26 additions and 37 deletions

View File

@ -54,8 +54,8 @@ importers:
specifier: ^3.0.1 specifier: ^3.0.1
version: 3.0.1 version: 3.0.1
naive-ui: naive-ui:
specifier: ^2.39.0 specifier: ^2.41.0
version: 2.39.0(vue@3.4.38(typescript@5.5.4)) version: 2.42.0(vue@3.4.38(typescript@5.5.4))
pinia: pinia:
specifier: ^2.2.2 specifier: ^2.2.2
version: 2.2.2(typescript@5.5.4)(vue@3.4.38(typescript@5.5.4)) version: 2.2.2(typescript@5.5.4)(vue@3.4.38(typescript@5.5.4))
@ -488,10 +488,6 @@ packages:
peerDependencies: peerDependencies:
'@babel/core': ^7.0.0-0 '@babel/core': ^7.0.0-0
'@babel/runtime@7.25.6':
resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==}
engines: {node: '>=6.9.0'}
'@babel/template@7.25.0': '@babel/template@7.25.0':
resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -2081,14 +2077,10 @@ packages:
resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==} resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==}
engines: {node: '>=12'} engines: {node: '>=12'}
date-fns-tz@2.0.1: date-fns-tz@3.2.0:
resolution: {integrity: sha512-fJCG3Pwx8HUoLhkepdsP7Z5RsucUi+ZBOxyM5d0ZZ6c4SdYustq0VMmOu6Wf7bli+yS/Jwp91TOCqn9jMcVrUA==} resolution: {integrity: sha512-sg8HqoTEulcbbbVXeg84u5UnlsQa8GS5QXMqjjYIhS4abEVVKIUwe0/l/UhrZdKaL/W5eWZNlbTeEIiOXTcsBQ==}
peerDependencies: peerDependencies:
date-fns: 2.x date-fns: ^3.0.0 || ^4.0.0
date-fns@2.30.0:
resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==}
engines: {node: '>=0.11'}
date-fns@3.6.0: date-fns@3.6.0:
resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==}
@ -3461,8 +3453,8 @@ packages:
mz@2.7.0: mz@2.7.0:
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
naive-ui@2.39.0: naive-ui@2.42.0:
resolution: {integrity: sha512-5oUJzRG+rtLSH8eRU+fJvVYiQids2BxF9jp+fwGoAqHOptEINrBlgBu9uy+95RHE5FLJ7Q/z41o+qkoGnUrKxQ==} resolution: {integrity: sha512-c7cXR2YgOjgtBadXHwiWL4Y0tpGLAI5W5QzzHksOi22iuHXoSGMAzdkVTGVPE/PM0MSGQ/JtUIzCx2Y0hU0vTQ==}
peerDependencies: peerDependencies:
vue: ^3.0.0 vue: ^3.0.0
@ -3891,9 +3883,6 @@ packages:
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
engines: {node: '>=8.10.0'} engines: {node: '>=8.10.0'}
regenerator-runtime@0.14.1:
resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==}
regexp.prototype.flags@1.5.2: regexp.prototype.flags@1.5.2:
resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
@ -4561,8 +4550,8 @@ packages:
peerDependencies: peerDependencies:
vue: ^3.0.1 vue: ^3.0.1
vueuc@0.4.58: vueuc@0.4.64:
resolution: {integrity: sha512-Wnj/N8WbPRSxSt+9ji1jtDHPzda5h2OH/0sFBhvdxDRuyCZbjGg3/cKMaKqEoe+dErTexG2R+i6Q8S/Toq1MYg==} resolution: {integrity: sha512-wlJQj7fIwKK2pOEoOq4Aro8JdPOGpX8aWQhV8YkTW9OgWD2uj2O8ANzvSsIGjx7LTOc7QbS7sXdxHi6XvRnHPA==}
peerDependencies: peerDependencies:
vue: ^3.0.11 vue: ^3.0.11
@ -4916,10 +4905,6 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@babel/runtime@7.25.6':
dependencies:
regenerator-runtime: 0.14.1
'@babel/template@7.25.0': '@babel/template@7.25.0':
dependencies: dependencies:
'@babel/code-frame': 7.24.7 '@babel/code-frame': 7.24.7
@ -6665,13 +6650,9 @@ snapshots:
dargs@8.1.0: {} dargs@8.1.0: {}
date-fns-tz@2.0.1(date-fns@2.30.0): date-fns-tz@3.2.0(date-fns@3.6.0):
dependencies: dependencies:
date-fns: 2.30.0 date-fns: 3.6.0
date-fns@2.30.0:
dependencies:
'@babel/runtime': 7.25.6
date-fns@3.6.0: {} date-fns@3.6.0: {}
@ -8250,7 +8231,7 @@ snapshots:
object-assign: 4.1.1 object-assign: 4.1.1
thenify-all: 1.6.0 thenify-all: 1.6.0
naive-ui@2.39.0(vue@3.4.38(typescript@5.5.4)): naive-ui@2.42.0(vue@3.4.38(typescript@5.5.4)):
dependencies: dependencies:
'@css-render/plugin-bem': 0.15.14(css-render@0.15.14) '@css-render/plugin-bem': 0.15.14(css-render@0.15.14)
'@css-render/vue3-ssr': 0.15.14(vue@3.4.38(typescript@5.5.4)) '@css-render/vue3-ssr': 0.15.14(vue@3.4.38(typescript@5.5.4))
@ -8260,8 +8241,8 @@ snapshots:
async-validator: 4.2.5 async-validator: 4.2.5
css-render: 0.15.14 css-render: 0.15.14
csstype: 3.1.3 csstype: 3.1.3
date-fns: 2.30.0 date-fns: 3.6.0
date-fns-tz: 2.0.1(date-fns@2.30.0) date-fns-tz: 3.2.0(date-fns@3.6.0)
evtd: 0.2.4 evtd: 0.2.4
highlight.js: 11.10.0 highlight.js: 11.10.0
lodash: 4.17.21 lodash: 4.17.21
@ -8271,7 +8252,7 @@ snapshots:
vdirs: 0.1.8(vue@3.4.38(typescript@5.5.4)) vdirs: 0.1.8(vue@3.4.38(typescript@5.5.4))
vooks: 0.2.12(vue@3.4.38(typescript@5.5.4)) vooks: 0.2.12(vue@3.4.38(typescript@5.5.4))
vue: 3.4.38(typescript@5.5.4) vue: 3.4.38(typescript@5.5.4)
vueuc: 0.4.58(vue@3.4.38(typescript@5.5.4)) vueuc: 0.4.64(vue@3.4.38(typescript@5.5.4))
nanoid@3.3.7: {} nanoid@3.3.7: {}
@ -8668,8 +8649,6 @@ snapshots:
dependencies: dependencies:
picomatch: 2.3.1 picomatch: 2.3.1
regenerator-runtime@0.14.1: {}
regexp.prototype.flags@1.5.2: regexp.prototype.flags@1.5.2:
dependencies: dependencies:
call-bind: 1.0.7 call-bind: 1.0.7
@ -9413,7 +9392,7 @@ snapshots:
sortablejs: 1.14.0 sortablejs: 1.14.0
vue: 3.4.38(typescript@5.5.4) vue: 3.4.38(typescript@5.5.4)
vueuc@0.4.58(vue@3.4.38(typescript@5.5.4)): vueuc@0.4.64(vue@3.4.38(typescript@5.5.4)):
dependencies: dependencies:
'@css-render/vue3-ssr': 0.15.14(vue@3.4.38(typescript@5.5.4)) '@css-render/vue3-ssr': 0.15.14(vue@3.4.38(typescript@5.5.4))
'@juggle/resize-observer': 3.4.0 '@juggle/resize-observer': 3.4.0

View File

@ -12,6 +12,15 @@
</n-radio-group> </n-radio-group>
</n-form-item> </n-form-item>
<n-form-item label="验证码方式" path="loginCaptchaType">
<n-radio-group v-model:value="formValue.loginCaptchaType" name="loginCaptchaType">
<n-space>
<n-radio :value="1">字符</n-radio>
<n-radio :value="2">算数</n-radio>
</n-space>
</n-radio-group>
</n-form-item>
<n-form-item label="注册开关" path="loginRegisterSwitch"> <n-form-item label="注册开关" path="loginRegisterSwitch">
<n-radio-group v-model:value="formValue.loginRegisterSwitch" name="cashSwitch"> <n-radio-group v-model:value="formValue.loginRegisterSwitch" name="cashSwitch">
<n-space> <n-space>
@ -113,6 +122,7 @@
const formValue = ref({ const formValue = ref({
loginRegisterSwitch: 1, loginRegisterSwitch: 1,
loginCaptchaSwitch: 1, loginCaptchaSwitch: 1,
loginCaptchaType: 1, // 1: 'str' or 2: 'numMath'
loginForceInvite: 2, loginForceInvite: 2,
loginAutoOpenId: 2, loginAutoOpenId: 2,
loginAvatar: '', loginAvatar: '',