|
|
@@ -9,7 +9,6 @@ import { CodeInputType } from '../models'
|
|
|
@Component
|
|
|
export struct LoginView {
|
|
|
@State private loginCollect: LoginCollect = new LoginCollect('login')
|
|
|
- @State private isPassword: boolean = false
|
|
|
private inputCaptchaType: CodeInputType = {
|
|
|
txt: '验证码',
|
|
|
placeHolder: '请输入验证码'
|
|
|
@@ -53,7 +52,7 @@ export struct LoginView {
|
|
|
this.loginCollect.phonenumber = value
|
|
|
}
|
|
|
})
|
|
|
- if (this.isPassword) {
|
|
|
+ if (this.loginCollect.isPassword) {
|
|
|
LoginInput({
|
|
|
item: this.inputPasswordType,
|
|
|
inputData: this.loginCollect.password,
|
|
|
@@ -84,13 +83,13 @@ export struct LoginView {
|
|
|
})
|
|
|
|
|
|
Row() {
|
|
|
- if (!this.isPassword) {
|
|
|
+ if (!this.loginCollect.isPassword) {
|
|
|
Text('密码登录')
|
|
|
.fontColor($r('[basic].color.main_ac_color_dark'))
|
|
|
.fontSize(12)
|
|
|
.fontWeight(700)
|
|
|
.onClick(() => {
|
|
|
- this.isPassword = true
|
|
|
+ this.loginCollect.isPassword = true
|
|
|
})
|
|
|
Blank()
|
|
|
} else {
|
|
|
@@ -99,7 +98,7 @@ export struct LoginView {
|
|
|
.fontWeight(700)
|
|
|
.fontSize(12)
|
|
|
.onClick(() => {
|
|
|
- this.isPassword = false
|
|
|
+ this.loginCollect.isPassword = false
|
|
|
})
|
|
|
Blank()
|
|
|
Text('忘记密码?')
|