|
@@ -133,7 +133,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (!String(mobile).match(a)) {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请填写正确手机号",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -149,7 +148,6 @@ export class LoginComponent implements OnInit {
|
|
|
this.totas?.openTotas('用户手机号不存在,请先注册','warning')
|
|
|
// const toast = await this.toastController.create({
|
|
|
// message: "用户手机号不存在,请先注册",
|
|
|
- // color: "danger",
|
|
|
// duration: 1000,
|
|
|
// });
|
|
|
// toast.present();
|
|
@@ -192,7 +190,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (!String(this.loginInfo.mobile).match(a)) {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请填写正确手机号",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -202,7 +199,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.loginInfo.password == '' || this.loginInfo.password.trim == '') {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请填密码",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -213,7 +209,6 @@ export class LoginComponent implements OnInit {
|
|
|
}).catch(async err=>{
|
|
|
const toast = await this.toastController.create({
|
|
|
message: err,
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -222,7 +217,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (!this.loginInfo.code) {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请填写有效验证码",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -233,7 +227,6 @@ export class LoginComponent implements OnInit {
|
|
|
}).catch(async err=>{
|
|
|
const toast = await this.toastController.create({
|
|
|
message: err,
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -265,7 +258,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (!String(this.reset.mobile).match(a)) {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请填写正确手机号",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -274,7 +266,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.reset.code == undefined || this.reset.code == '') {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请输入验证码",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -283,7 +274,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.reset.password == undefined || this.reset.password.trim() == "") {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请输入密码",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -292,7 +282,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.reset.password.length < 6 || this.reset.password.length.length > 20) {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "密码长度不得小于6位或大于20位",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -301,7 +290,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.reset.confirmPassword == undefined || this.reset.confirmPassword.trim() == "") {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请确认密码",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -310,7 +298,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.reset.password.trim() != this.reset.confirmPassword.trim()) {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "两次输入密码不一致",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -329,7 +316,6 @@ export class LoginComponent implements OnInit {
|
|
|
catchError(async (e) => { // 显示报错
|
|
|
const toast = await this.toastController.create({
|
|
|
message: e.message,
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -348,7 +334,6 @@ export class LoginComponent implements OnInit {
|
|
|
} else {
|
|
|
const toast = await this.toastController.create({ // 接口返回的错误,提示用户
|
|
|
message: res.mess,
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -393,7 +378,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.registerInfo.code == undefined || this.registerInfo.code == '') {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请输入验证码",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -402,7 +386,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.registerInfo.password == undefined || this.registerInfo.password.trim() == "") {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请输入密码",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -411,7 +394,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.registerInfo.password.length < 6 || this.registerInfo.password.length.length > 20) {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "密码长度不得小于6位或大于20位",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -420,7 +402,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.registerInfo.confirmPassword == undefined || this.registerInfo.confirmPassword.trim() == "") {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "请确认密码",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -429,7 +410,6 @@ export class LoginComponent implements OnInit {
|
|
|
if (this.registerInfo.password.trim() != this.registerInfo.confirmPassword.trim()) {
|
|
|
const toast = await this.toastController.create({
|
|
|
message: "两次输入密码不一致",
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -478,7 +458,6 @@ export class LoginComponent implements OnInit {
|
|
|
catchError(async (e) => { // 显示报错
|
|
|
const toast = await this.toastController.create({
|
|
|
message: e.message,
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|
|
@@ -505,7 +484,6 @@ export class LoginComponent implements OnInit {
|
|
|
} else {
|
|
|
const toast = await this.toastController.create({ // 接口返回的错误,提示用户
|
|
|
message: res.mess,
|
|
|
- color: "danger",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
toast.present();
|