Showing
3 changed files
with
8 additions
and
8 deletions
| @@ -37,7 +37,7 @@ export struct LoginInputComponent { | @@ -37,7 +37,7 @@ export struct LoginInputComponent { | ||
| 37 | .type(InputType.PhoneNumber) | 37 | .type(InputType.PhoneNumber) |
| 38 | .onChange((content) => { | 38 | .onChange((content) => { |
| 39 | this.phoneContent = content | 39 | this.phoneContent = content |
| 40 | - this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6) | 40 | + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4) |
| 41 | if (content.length >= 11) { | 41 | if (content.length >= 11) { |
| 42 | this.codeBtnState = true | 42 | this.codeBtnState = true |
| 43 | } else { | 43 | } else { |
| @@ -55,7 +55,7 @@ export struct LoginInputComponent { | @@ -55,7 +55,7 @@ export struct LoginInputComponent { | ||
| 55 | .type(InputType.Number) | 55 | .type(InputType.Number) |
| 56 | .onChange((content) => { | 56 | .onChange((content) => { |
| 57 | this.phoneContent = content | 57 | this.phoneContent = content |
| 58 | - this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6) | 58 | + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4) |
| 59 | if (content.length >= 11) { | 59 | if (content.length >= 11) { |
| 60 | this.codeBtnState = true | 60 | this.codeBtnState = true |
| 61 | } else { | 61 | } else { |
| @@ -78,7 +78,7 @@ export struct LoginInputComponent { | @@ -78,7 +78,7 @@ export struct LoginInputComponent { | ||
| 78 | // .backgroundImageSize(ImageSize.Contain) | 78 | // .backgroundImageSize(ImageSize.Contain) |
| 79 | .onChange((value) => { | 79 | .onChange((value) => { |
| 80 | this.codeContent = value | 80 | this.codeContent = value |
| 81 | - this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 6) | 81 | + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4) |
| 82 | }) | 82 | }) |
| 83 | 83 | ||
| 84 | Text(this.isCodeSend ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新发送') | 84 | Text(this.isCodeSend ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新发送') |
| @@ -13,9 +13,9 @@ export class LoginModel { | @@ -13,9 +13,9 @@ export class LoginModel { | ||
| 13 | sendVerifyCode(number: string) { | 13 | sendVerifyCode(number: string) { |
| 14 | let bean: Record<string, string> = {}; | 14 | let bean: Record<string, string> = {}; |
| 15 | bean['phoneNum'] = number | 15 | bean['phoneNum'] = number |
| 16 | - return new Promise<string>((success, fail) => { | ||
| 17 | - HttpRequest.post<ResponseDTO<string>>(HttpUrlUtils.getVerifyCodeUrl(), bean).then((data: ResponseDTO<string>) => { | ||
| 18 | - if (!data || !data.data) { | 16 | + return new Promise<object>((success, fail) => { |
| 17 | + HttpRequest.post<ResponseDTO<object>>(HttpUrlUtils.getVerifyCodeUrl(), bean).then((data: ResponseDTO<object>) => { | ||
| 18 | + if (!data) { | ||
| 19 | fail("数据为空") | 19 | fail("数据为空") |
| 20 | return | 20 | return |
| 21 | } | 21 | } |
| @@ -23,7 +23,7 @@ export class LoginModel { | @@ -23,7 +23,7 @@ export class LoginModel { | ||
| 23 | fail(data.message) | 23 | fail(data.message) |
| 24 | return | 24 | return |
| 25 | } | 25 | } |
| 26 | - success(data.data) | 26 | + success(data) |
| 27 | }, (error: Error) => { | 27 | }, (error: Error) => { |
| 28 | fail(error.message) | 28 | fail(error.message) |
| 29 | Logger.debug("LoginViewModel:error ", error.toString()) | 29 | Logger.debug("LoginViewModel:error ", error.toString()) |
| @@ -22,7 +22,7 @@ export class LoginViewModel { | @@ -22,7 +22,7 @@ export class LoginViewModel { | ||
| 22 | 22 | ||
| 23 | //发送验证码 | 23 | //发送验证码 |
| 24 | sendVerifyCode(number: string) { | 24 | sendVerifyCode(number: string) { |
| 25 | - return new Promise<string>((success, fail) => { | 25 | + return new Promise<object>((success, fail) => { |
| 26 | this.loginModel.sendVerifyCode(number).then((data) => { | 26 | this.loginModel.sendVerifyCode(number).then((data) => { |
| 27 | success(data) | 27 | success(data) |
| 28 | }).catch((message: string) => { | 28 | }).catch((message: string) => { |
-
Please register or login to post a comment