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:
commit
cd20c889d7
|
@ -144,6 +144,11 @@ export class StarLockNumber extends StarBaseElement {
|
||||||
this.spanContainer.style.visibility = `hidden`
|
this.spanContainer.style.visibility = `hidden`
|
||||||
this.parent.style.visibility = `hidden`
|
this.parent.style.visibility = `hidden`
|
||||||
this.changeText = this.$l('create-password-success')
|
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
|
break
|
||||||
case 'digicipher-passcode-verify-success':
|
case 'digicipher-passcode-verify-success':
|
||||||
this.guess = ''
|
this.guess = ''
|
||||||
|
@ -203,30 +208,23 @@ export class StarLockNumber extends StarBaseElement {
|
||||||
this.makeZero()
|
this.makeZero()
|
||||||
//点击反馈
|
//点击反馈
|
||||||
this.changeNumberBgColor()
|
this.changeNumberBgColor()
|
||||||
if (this.clicks < 5) {
|
if (this.clicks <= 6) {
|
||||||
//圆点变化
|
//圆点变化
|
||||||
this.savemode
|
this.savemode
|
||||||
? this.changeBgColor('#000000', this.clicks, 1)
|
? this.changeBgColor('#000000', this.clicks, 1)
|
||||||
: this.changeBgColor('#F4F4F4', this.clicks, 1)
|
: this.changeBgColor('#F4F4F4', this.clicks, 1)
|
||||||
this.clicks += 1
|
this.clicks += 1
|
||||||
this.guess += (e.target as HTMLElement).dataset.num
|
this.guess += (e.target as HTMLElement).dataset.num
|
||||||
// console.log('###this.guess', this.guess)
|
if (this.clicks == 6) {
|
||||||
} else if (this.clicks == 5) {
|
if (this.savemode) {
|
||||||
this.guess += (e.target as HTMLElement).dataset.num
|
if (!this.confirm) {
|
||||||
// console.log('guess', this.guess)
|
this.changePasswd()
|
||||||
for (let i = 0; i < 6; i++) {
|
} else {
|
||||||
this.savemode
|
this.confirmPasswd()
|
||||||
? this.changeBgColor('#000000', i, 0.1)
|
}
|
||||||
: this.changeBgColor('#F4F4F4', i, 0.4)
|
|
||||||
}
|
|
||||||
if (this.savemode) {
|
|
||||||
if (!this.confirm) {
|
|
||||||
this.changePasswd()
|
|
||||||
} else {
|
} else {
|
||||||
this.confirmPasswd()
|
this.dispatchPasswd()
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
this.dispatchPasswd()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ((e.target as Element).className === 'delete') {
|
} else if ((e.target as Element).className === 'delete') {
|
||||||
|
@ -294,14 +292,8 @@ export class StarLockNumber extends StarBaseElement {
|
||||||
//发送密码
|
//发送密码
|
||||||
dispatchPasswd() {
|
dispatchPasswd() {
|
||||||
this.passwd = this.guess
|
this.passwd = this.guess
|
||||||
// console.log('send passwd', this.passwd)
|
|
||||||
this.guess = ''
|
this.guess = ''
|
||||||
this.clicks = 0
|
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(
|
this.dispatchEvent(
|
||||||
new CustomEvent('star-digicipher-passwd', {
|
new CustomEvent('star-digicipher-passwd', {
|
||||||
detail: {
|
detail: {
|
||||||
|
@ -331,11 +323,6 @@ export class StarLockNumber extends StarBaseElement {
|
||||||
if (this.savewd.toString() == this.guess.toString()) {
|
if (this.savewd.toString() == this.guess.toString()) {
|
||||||
this.passwd = this.savewd
|
this.passwd = this.savewd
|
||||||
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.guess = ''
|
||||||
this.clicks = 0
|
this.clicks = 0
|
||||||
this.changeText = this.$l('create-password-success')
|
this.changeText = this.$l('create-password-success')
|
||||||
|
|
Loading…
Reference in New Issue