From d1e4fb05b837ba82b15f2864a81a53a3ea42b364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Thu, 12 Mar 2026 15:24:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Host/Controllers/UserController.cs | 12 ++++++++++++ Host/Views.Mobile/User/FindPwd.cshtml | 2 +- Host/Views.Mobile/User/Regist.cshtml | 2 +- Host/Views/Home/Index.cshtml | 4 ++-- Host/Views/Shared/_Layout.cshtml | 4 ++-- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Host/Controllers/UserController.cs b/Host/Controllers/UserController.cs index 4eb5a37..a6391c8 100644 --- a/Host/Controllers/UserController.cs +++ b/Host/Controllers/UserController.cs @@ -345,6 +345,18 @@ namespace Home.Controllers /// [HttpPost, AllowAnonymous] public async Task SendPhoneCodevefy(string phone, string key) + { + + return new ApiResult(ResultCode.C_SUCCESS, "验证码已发送到您的手机"); + } + + /// + /// 发送手机验证码 + /// + /// + /// + [HttpPost, AllowAnonymous] + public async Task SendPhonesCodevefy(string phone, string key) { key = $"{key}:{phone}"; diff --git a/Host/Views.Mobile/User/FindPwd.cshtml b/Host/Views.Mobile/User/FindPwd.cshtml index bc6e503..0786d96 100644 --- a/Host/Views.Mobile/User/FindPwd.cshtml +++ b/Host/Views.Mobile/User/FindPwd.cshtml @@ -27,7 +27,7 @@ var name = $("#username").val() if(name == '') { alert('手机号不能为空'); return; } if (!timing(_self)) return; - var url = '/User/SendPhoneCodevefy?key=FindUser_Code&phone=' + name; + var url = '/User/SendPhonesCodevefy?key=FindUser_Code&phone=' + name; $.ajax({ type: 'POST', url: url, diff --git a/Host/Views.Mobile/User/Regist.cshtml b/Host/Views.Mobile/User/Regist.cshtml index 939befe..a43b788 100644 --- a/Host/Views.Mobile/User/Regist.cshtml +++ b/Host/Views.Mobile/User/Regist.cshtml @@ -37,7 +37,7 @@ var name = $("#username").val() if(name == '') { alert('手机号不能为空'); return; } if (!timing(_self)) return; - var url = '/user/SendPhoneCodevefy?key=User_Code&phone=' + name; + var url = '/user/SendPhonesCodevefy?key=User_Code&phone=' + name; $.ajax({ type: 'POST', url: url, diff --git a/Host/Views/Home/Index.cshtml b/Host/Views/Home/Index.cshtml index 37cf3a7..57bda19 100644 --- a/Host/Views/Home/Index.cshtml +++ b/Host/Views/Home/Index.cshtml @@ -610,7 +610,7 @@ function getCode(_self) { if (!timing(_self)) return; var name = $("#username").val() - var url = '/user/SendPhoneCodevefy?key=User_Code&phone=' + name; + var url = '/user/SendPhonesCodevefy?key=User_Code&phone=' + name; var timerHandler; $.ajax({ type: 'POST', @@ -624,7 +624,7 @@ function getFindCode(_self) { if (!timing(_self)) return; var name = $("#fusername").val() - var url = '/user/SendPhoneCodevefy?key=FindUser_Code&phone=' + name; + var url = '/user/SendPhonesCodevefy?key=FindUser_Code&phone=' + name; $.ajax({ type: 'POST', url: url, diff --git a/Host/Views/Shared/_Layout.cshtml b/Host/Views/Shared/_Layout.cshtml index 0219c2f..f43d26c 100644 --- a/Host/Views/Shared/_Layout.cshtml +++ b/Host/Views/Shared/_Layout.cshtml @@ -431,7 +431,7 @@ function getCode(_self) { if (!timing(_self)) return; var name = $("#username").val() - var url = '/user/SendPhoneCodevefy?key=User_Code&phone=' + name; + var url = '/user/SendPhonesCodevefy?key=User_Code&phone=' + name; $.ajax({ type: 'POST', url: url, @@ -444,7 +444,7 @@ function getFindCode(_self) { if (!timing(_self)) return; var name = $("#fusername").val() - var url = '/user/SendPhoneCodevefy?key=FindUser_Code&phone=' + name; + var url = '/user/SendPhonesCodevefy?key=FindUser_Code&phone=' + name; $.ajax({ type: 'POST', url: url,