BUG: #155264 修复锁屏界面输入第六位密码,第六个点不会加深显示

This commit is contained in:
duanzhijiang 2023-01-09 21:14:12 +08:00
parent d3327c5809
commit 3a1f88a09d
1 changed files with 14 additions and 27 deletions

View File

@ -158,6 +158,11 @@ export class StarLockNumber extends StarBaseElement {
this.spanContainer.style.visibility = `hidden`
this.parent.style.visibility = `hidden`
this.changeText = this.$l('create-password-success')
for (let i = 0; i < 6; i++) {
this.savemode
? this.changeBgColor('#000000', i, 0.1)
: this.changeBgColor('#F4F4F4', i, 0.4)
}
break
case 'digicipher-passcode-verify-success':
this.guess = ''
@ -217,22 +222,14 @@ export class StarLockNumber extends StarBaseElement {
this.makeZero()
//点击反馈
this.changeNumberBgColor()
if (this.clicks < 5) {
if (this.clicks <= 6) {
//圆点变化
this.savemode
? this.changeBgColor('#000000', this.clicks, 1)
: this.changeBgColor('#F4F4F4', this.clicks, 1)
this.clicks += 1
this.guess += (e.target as HTMLElement).dataset.num
// console.log('###this.guess', this.guess)
} else if (this.clicks == 5) {
this.guess += (e.target as HTMLElement).dataset.num
// console.log('guess', this.guess)
for (let i = 0; i < 6; i++) {
this.savemode
? this.changeBgColor('#000000', i, 0.1)
: this.changeBgColor('#F4F4F4', i, 0.4)
}
if (this.clicks == 6) {
if (this.savemode) {
if (!this.confirm) {
this.changePasswd()
@ -243,6 +240,7 @@ export class StarLockNumber extends StarBaseElement {
this.dispatchPasswd()
}
}
}
} else if ((e.target as Element).className === 'delete') {
if (this.clicks == 0) {
} else {
@ -308,14 +306,8 @@ export class StarLockNumber extends StarBaseElement {
//发送密码
dispatchPasswd() {
this.passwd = this.guess
// console.log('send passwd', this.passwd)
this.guess = ''
this.clicks = 0
for (let i = 0; i < 6; i++) {
this.savemode
? this.changeBgColor('#000000', i, 0.1)
: this.changeBgColor('#F4F4F4', i, 0.4)
}
this.dispatchEvent(
new CustomEvent('star-digicipher-passwd', {
detail: {
@ -345,11 +337,6 @@ export class StarLockNumber extends StarBaseElement {
if (this.savewd.toString() == this.guess.toString()) {
this.passwd = this.savewd
this.savewd = ''
for (let i = 0; i < 6; i++) {
this.savemode
? this.changeBgColor('#000000', i, 0.1)
: this.changeBgColor('#F4F4F4', i, 0.4)
}
this.guess = ''
this.clicks = 0
this.changeText = this.$l('create-password-success')