Merge pull request #224 in YR/star-web-components from star-fix-digicipher-new to master

* commit '3a1f88a09d28ff810d6e7cb9c41c10976fb825a2':
  BUG: #155264 修复锁屏界面输入第六位密码,第六个点不会加深显示
This commit is contained in:
汪昌棋 2023-01-12 15:21:11 +08:00
commit cd20c889d7
1 changed files with 14 additions and 27 deletions

View File

@ -144,6 +144,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 = ''
@ -203,22 +208,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()
@ -229,6 +226,7 @@ export class StarLockNumber extends StarBaseElement {
this.dispatchPasswd()
}
}
}
} else if ((e.target as Element).className === 'delete') {
if (this.clicks == 0) {
} else {
@ -294,14 +292,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: {
@ -331,11 +323,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')