|
|
|
|
@ -595,68 +595,47 @@ export class SmsPageComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onChange() {
|
|
|
|
|
|
|
|
|
|
// tslint:disable-next-line: only-arrow-functions
|
|
|
|
|
|
|
|
|
|
const filtered = this.smc_code.filter(function (el) {
|
|
|
|
|
|
|
|
|
|
if (el) {
|
|
|
|
|
|
|
|
|
|
return el;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (filtered.length === 4 && !this.isAutoRead) {
|
|
|
|
|
|
|
|
|
|
this.checkVerificationCode();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
goToNextInput(e) {
|
|
|
|
|
|
|
|
|
|
const key = e.which;
|
|
|
|
|
|
|
|
|
|
const t = e.target;
|
|
|
|
|
|
|
|
|
|
const sib = t.nextElementSibling;
|
|
|
|
|
|
|
|
|
|
goToNextInput(e) {
|
|
|
|
|
const key = e.which;
|
|
|
|
|
const t = e.target;
|
|
|
|
|
const sib = t.nextElementSibling;
|
|
|
|
|
const sibPre = t.previousElementSibling;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (key === undefined && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (key === undefined && e.target.value.length==4 && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
|
|
|
|
|
this.checkActivation(e.target.value, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (key !== 9 && (key < 48 || key > 57)) {
|
|
|
|
|
|
|
|
|
|
if (key === 8 || key === 46) {
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (key === 9) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (sib) {
|
|
|
|
|
if (e.target.value === '') {
|
|
|
|
|
sibPre.setFocus();
|
|
|
|
|
@ -665,4 +644,6 @@ export class SmsPageComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|