Compare commits
2 Commits
2f14f45621
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7c3c038a8 | ||
|
|
d1e4fb05b8 |
@@ -345,6 +345,18 @@ namespace Home.Controllers
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost, AllowAnonymous]
|
[HttpPost, AllowAnonymous]
|
||||||
public async Task<ApiResult> SendPhoneCodevefy(string phone, string key)
|
public async Task<ApiResult> SendPhoneCodevefy(string phone, string key)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new ApiResult(ResultCode.C_SUCCESS, "验证码已发送到您的手机");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发送手机验证码
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, AllowAnonymous]
|
||||||
|
public async Task<ApiResult> SendPhonesCodevefy(string phone, string key)
|
||||||
{
|
{
|
||||||
key = $"{key}:{phone}";
|
key = $"{key}:{phone}";
|
||||||
|
|
||||||
|
|||||||
@@ -845,7 +845,7 @@
|
|||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
this.order_info.account = this.randomString(2) + (Math.floor(Math.random() * 10000) + 1);
|
this.order_info.account = this.randomString(2) + (Math.floor(Math.random() * 10000) + 1);
|
||||||
this.order_info.password = (Math.floor(Math.random() * 1000) + 1);
|
this.order_info.password = (Math.floor(Math.random() * 1000000) + 1);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
randomString(len) {
|
randomString(len) {
|
||||||
@@ -1077,8 +1077,8 @@
|
|||||||
alert('账号长度至少5位!');
|
alert('账号长度至少5位!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.order_info.password.length < 3 && this.hasNumAndChar(this.order_info.password)) {
|
if (this.order_info.password.length < 6 && this.hasNumAndChar(this.order_info.password)) {
|
||||||
alert('密码长度至少3位!');
|
alert('密码长度至少6位!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
var name = $("#username").val()
|
var name = $("#username").val()
|
||||||
if(name == '') { alert('手机号不能为空'); return; }
|
if(name == '') { alert('手机号不能为空'); return; }
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var url = '/User/SendPhoneCodevefy?key=FindUser_Code&phone=' + name;
|
var url = '/User/SendPhonesCodevefy?key=FindUser_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
var name = $("#username").val()
|
var name = $("#username").val()
|
||||||
if(name == '') { alert('手机号不能为空'); return; }
|
if(name == '') { alert('手机号不能为空'); return; }
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var url = '/user/SendPhoneCodevefy?key=User_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=User_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@@ -610,7 +610,7 @@
|
|||||||
function getCode(_self) {
|
function getCode(_self) {
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var name = $("#username").val()
|
var name = $("#username").val()
|
||||||
var url = '/user/SendPhoneCodevefy?key=User_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=User_Code&phone=' + name;
|
||||||
var timerHandler;
|
var timerHandler;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@@ -624,7 +624,7 @@
|
|||||||
function getFindCode(_self) {
|
function getFindCode(_self) {
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var name = $("#fusername").val()
|
var name = $("#fusername").val()
|
||||||
var url = '/user/SendPhoneCodevefy?key=FindUser_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=FindUser_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@@ -1215,7 +1215,7 @@
|
|||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
this.order_info.account = this.randomString(2) + (Math.floor(Math.random() * 10000) + 1);
|
this.order_info.account = this.randomString(2) + (Math.floor(Math.random() * 10000) + 1);
|
||||||
this.order_info.password = (Math.floor(Math.random() * 1000) + 1);
|
this.order_info.password = (Math.floor(Math.random() * 1000000) + 1);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
randomString(len) {
|
randomString(len) {
|
||||||
@@ -1446,8 +1446,8 @@
|
|||||||
alert('账号长度至少5位!');
|
alert('账号长度至少5位!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.order_info.password.length < 3 && this.hasNumAndChar(this.order_info.password)) {
|
if (this.order_info.password.length < 6 && this.hasNumAndChar(this.order_info.password)) {
|
||||||
alert('密码长度至少3位!');
|
alert('密码长度至少6位!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -431,7 +431,7 @@
|
|||||||
function getCode(_self) {
|
function getCode(_self) {
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var name = $("#username").val()
|
var name = $("#username").val()
|
||||||
var url = '/user/SendPhoneCodevefy?key=User_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=User_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
@@ -444,7 +444,7 @@
|
|||||||
function getFindCode(_self) {
|
function getFindCode(_self) {
|
||||||
if (!timing(_self)) return;
|
if (!timing(_self)) return;
|
||||||
var name = $("#fusername").val()
|
var name = $("#fusername").val()
|
||||||
var url = '/user/SendPhoneCodevefy?key=FindUser_Code&phone=' + name;
|
var url = '/user/SendPhonesCodevefy?key=FindUser_Code&phone=' + name;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
Reference in New Issue
Block a user