Showing
2 changed files
with
13 additions
and
3 deletions
| @@ -5,7 +5,7 @@ import router from '@ohos.router' | @@ -5,7 +5,7 @@ import router from '@ohos.router' | ||
| 5 | import { WDRouterRule, WDRouterPage } from 'wdRouter'; | 5 | import { WDRouterRule, WDRouterPage } from 'wdRouter'; |
| 6 | import { SettingPasswordParams } from './SettingPasswordLayout' | 6 | import { SettingPasswordParams } from './SettingPasswordLayout' |
| 7 | import { Router } from '@ohos.arkui.UIContext' | 7 | import { Router } from '@ohos.arkui.UIContext' |
| 8 | -import { CustomToast, EmitterEventId, EmitterUtils, NetworkUtil, SPHelper, ToastUtils } from 'wdKit/Index' | 8 | +import { CustomToast, EmitterEventId, EmitterUtils, NetworkUtil, SPHelper, StringUtils, ToastUtils } from 'wdKit/Index' |
| 9 | import { SpConstants } from 'wdConstant/Index' | 9 | import { SpConstants } from 'wdConstant/Index' |
| 10 | import { emitter } from '@kit.BasicServicesKit' | 10 | import { emitter } from '@kit.BasicServicesKit' |
| 11 | 11 | ||
| @@ -23,6 +23,7 @@ struct ForgetPasswordPage { | @@ -23,6 +23,7 @@ struct ForgetPasswordPage { | ||
| 23 | loginViewModel: LoginViewModel = new LoginViewModel() | 23 | loginViewModel: LoginViewModel = new LoginViewModel() |
| 24 | @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件 | 24 | @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件 |
| 25 | pageType:number = (router.getParams() as Record<string, number>)['pageType']; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 | 25 | pageType:number = (router.getParams() as Record<string, number>)['pageType']; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 |
| 26 | + phone:string = (router.getParams() as Record<string, number>)['phone'] + ""; //登录 密码登录 填写手机号 点击忘记密码 带过来手机号 | ||
| 26 | @State pageTitle:string = '找回密码'; | 27 | @State pageTitle:string = '找回密码'; |
| 27 | @State codeStateSuccess:boolean=false | 28 | @State codeStateSuccess:boolean=false |
| 28 | onCodeSend() { | 29 | onCodeSend() { |
| @@ -30,6 +31,7 @@ struct ForgetPasswordPage { | @@ -30,6 +31,7 @@ struct ForgetPasswordPage { | ||
| 30 | this.sendVerifyCode() | 31 | this.sendVerifyCode() |
| 31 | } | 32 | } |
| 32 | } | 33 | } |
| 34 | + | ||
| 33 | @State toastText:string = "" | 35 | @State toastText:string = "" |
| 34 | dialogToast: CustomDialogController = new CustomDialogController({ | 36 | dialogToast: CustomDialogController = new CustomDialogController({ |
| 35 | builder: CustomToast({ | 37 | builder: CustomToast({ |
| @@ -91,6 +93,9 @@ struct ForgetPasswordPage { | @@ -91,6 +93,9 @@ struct ForgetPasswordPage { | ||
| 91 | } | 93 | } |
| 92 | if (this.pageType == 0){ | 94 | if (this.pageType == 0){ |
| 93 | this.pageTitle = '找回密码' | 95 | this.pageTitle = '找回密码' |
| 96 | + if(StringUtils.isNotEmpty(this.phone) && this.phone.indexOf("****") === -1){ | ||
| 97 | + this.phoneContent = this.phone | ||
| 98 | + } | ||
| 94 | }else if (this.pageType == 1){ | 99 | }else if (this.pageType == 1){ |
| 95 | this.pageTitle = '验证当前手机号' | 100 | this.pageTitle = '验证当前手机号' |
| 96 | }else if (this.pageType == 2){ | 101 | }else if (this.pageType == 2){ |
| @@ -165,8 +165,13 @@ struct LoginPage { | @@ -165,8 +165,13 @@ struct LoginPage { | ||
| 165 | Text('忘记密码').fontColor('#666666').fontSize(14).margin({ top: 16 }) | 165 | Text('忘记密码').fontColor('#666666').fontSize(14).margin({ top: 16 }) |
| 166 | .onClick(() => { | 166 | .onClick(() => { |
| 167 | // router.pushUrl({ url: 'pages/login/ForgetPasswordPage' }) | 167 | // router.pushUrl({ url: 'pages/login/ForgetPasswordPage' }) |
| 168 | - let pageType = { 'pageType': 0 } as Record<string, number>; | ||
| 169 | - WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) | 168 | + if(StringUtils.isNotEmpty(this.accountContent) && StringUtils.photoMatch(this.accountContent)){ |
| 169 | + let pageType = { 'pageType': 0, 'phone': Number(this.accountContent) } as Record<string, number>; | ||
| 170 | + WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) | ||
| 171 | + }else{ | ||
| 172 | + let pageType = { 'pageType': 0 } as Record<string, number>; | ||
| 173 | + WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) | ||
| 174 | + } | ||
| 170 | }) | 175 | }) |
| 171 | } | 176 | } |
| 172 | 177 |
-
Please register or login to post a comment