mirror of
https://github.com/qiurunze123/miaosha.git
synced 2023-11-19 22:41:03 +08:00
注解拦截器
This commit is contained in:
parent
6105201cce
commit
c9e7239065
|
@ -64,7 +64,7 @@
|
|||
#### [秒杀安全 -- 安全性设计]()
|
||||
秒杀接口隐藏
|
||||
数字公式验证码
|
||||
接口防刷限流
|
||||
接口防刷限流(通用 注解,拦截器方式)
|
||||
#### [通用缓存key的封装采用什么设计模式]()
|
||||
模板模式的优点
|
||||
-具体细节步骤实现定义在子类中,子类定义详细处理算法是不会改变算法整体结构
|
||||
|
|
|
@ -20,11 +20,24 @@
|
|||
function refreshVerifyCode(){
|
||||
$("#verifyCodeImg").attr("src", "/miaosha/verifyCodeRegister");
|
||||
};
|
||||
function register_go() {
|
||||
|
||||
function checkPhone(phone){
|
||||
if(!(/^1[34578]\d{9}$/.test(phone))){
|
||||
alert("手机号码有误,请重填");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function register_go() {
|
||||
var username =$("#username").val();
|
||||
var inputPass = $("#password").val();
|
||||
var passwordrepeat = $("#repassword").val();
|
||||
var verifyCode = $("#verifyCode").val();
|
||||
var check = checkPhone(username);
|
||||
if(check){
|
||||
alert("手机号不符合要求");
|
||||
return ;
|
||||
}
|
||||
if(inputPass==""||inputPass==null||inputPass == undefined ){
|
||||
alert("密码不能为空!");
|
||||
return ;
|
||||
|
|
Loading…
Reference in New Issue
Block a user