|
@@ -59,18 +59,18 @@ export class ModalUserLoginMainComponent implements OnInit {
|
|
//随机生成四位数的验证码
|
|
//随机生成四位数的验证码
|
|
this.trueVerCode = (Math.floor(Math.random() * 9000) + 1000).toString();
|
|
this.trueVerCode = (Math.floor(Math.random() * 9000) + 1000).toString();
|
|
console.log("获取验证码成功" + this.trueVerCode);
|
|
console.log("获取验证码成功" + this.trueVerCode);
|
|
- // const apiUrl = `http://api.smsbao.com/sms?u=peppa&p=94d5a383c32c4d85bfbfc2599e64a8dc&m=${this.phoneNumber}&c=${encodeURIComponent("【衣靠】您的验证码是" + this.trueVerCode)}`;
|
|
|
|
- // console.log("请求地址:" + apiUrl);
|
|
|
|
- // this.http.get(apiUrl).subscribe(response => {
|
|
|
|
- // if (response === '0') {
|
|
|
|
- // console.log("短信发送成功");
|
|
|
|
- // // 处理登录成功逻辑
|
|
|
|
- // } else {
|
|
|
|
- // console.error("短信发送失败", response);
|
|
|
|
- // }
|
|
|
|
- // }, error => {
|
|
|
|
- // console.error("请求失败", error);
|
|
|
|
- // });
|
|
|
|
|
|
+ const apiUrl = `http://api.smsbao.com/sms?u=peppa&p=94d5a383c32c4d85bfbfc2599e64a8dc&m=${this.phoneNumber}&c=${encodeURIComponent("【衣靠】您的验证码是" + this.trueVerCode)}`;
|
|
|
|
+ console.log("请求地址:" + apiUrl);
|
|
|
|
+ this.http.get(apiUrl).subscribe(response => {
|
|
|
|
+ if (response === '0') {
|
|
|
|
+ console.log("短信发送成功");
|
|
|
|
+ // 处理登录成功逻辑
|
|
|
|
+ } else {
|
|
|
|
+ console.error("短信发送失败", response);
|
|
|
|
+ }
|
|
|
|
+ }, error => {
|
|
|
|
+ console.error("请求失败", error);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
phoneToHide(phone: string): string {
|
|
phoneToHide(phone: string): string {
|
|
//将手机号隐藏中间四位数字,只显示前三位和后四位
|
|
//将手机号隐藏中间四位数字,只显示前三位和后四位
|