From fbed0735684addcc524d8a6e6f15d82260d261b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Fri, 3 Jan 2025 11:41:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=201.=E5=AE=8C=E6=88=90=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=8A=9F=E8=83=BD=202.=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=BF=98=E8=AE=B0=E5=AF=86=E7=A0=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/regular-expressions.ts | 6 +- src/pages/get-code/get-code.vue | 2 +- src/pages/login/login.vue | 7 +- src/pages/reset-password/reset-password.vue | 111 ++++++++++++++++++-- 4 files changed, 111 insertions(+), 15 deletions(-) diff --git a/src/constants/regular-expressions.ts b/src/constants/regular-expressions.ts index 1fcc6be..38bb893 100644 --- a/src/constants/regular-expressions.ts +++ b/src/constants/regular-expressions.ts @@ -1,3 +1,5 @@ -export const phoneRegExp = /^1[3-9]\d{9}$/ +export const phoneRegExp: RegExp = /^1[3-9]\d{9}$/ -export const passwordRegExp = /^(?![0-9]+$)(?![a-zA-Z]+$)(?![^0-9a-zA-Z]+$).{8,20}$/ +export const passwordRegExp: RegExp = /^(?![0-9]+$)(?![a-zA-Z]+$)(?![^0-9a-zA-Z]+$).{8,20}$/ + +export const codeRegExp: RegExp = /^[0-9]{6}$/ diff --git a/src/pages/get-code/get-code.vue b/src/pages/get-code/get-code.vue index a486c2c..f2c5e95 100644 --- a/src/pages/get-code/get-code.vue +++ b/src/pages/get-code/get-code.vue @@ -62,7 +62,7 @@ uni.hideLoading() if (result.errorCode === Result.Success.code) { await uni.navigateTo({ - url: `/pages/code/code?phone=${phone.value}&type=reset-password` + url: `/pages/reset-password/reset-password?phone=${phone.value}` }) } else { await uni.showToast({ diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue index 1fe0326..95577e3 100644 --- a/src/pages/login/login.vue +++ b/src/pages/login/login.vue @@ -147,7 +147,7 @@