修复aa.bb@outlook.com无法注册的问题

This commit is contained in:
B05BEE13.卢郴群 2021-05-12 14:53:32 +08:00
parent 075ff1fd0b
commit dd67d8ee64
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `users` (
`lastLogin` datetime DEFAULT now(), -- 最后一次登录时间 `lastLogin` datetime DEFAULT now(), -- 最后一次登录时间
`searchHistory` varchar(512) DEFAULT NULL, -- 历史搜索记录 `searchHistory` varchar(512) DEFAULT NULL, -- 历史搜索记录
`avatar` varchar(512) DEFAULT NULL, -- 头像地址 `avatar` varchar(512) DEFAULT NULL, -- 头像地址
`quickUrl` varchar(2048) DEFAULT '{\"B\":\"https://www.baidu.com/\",\"G\":\"https://www.google.com.hk/\",\"V\":\"https://www.v2ex.com/\",\"L\":\"http://luchenqun.com/\",\"H\":\"https://github.com/\",\"Q\":\"http://www.iqiyi.com/\",\"J\":\"https://www.jd.com/\"}', -- 全局快捷地址 `quickUrl` varchar(2048) DEFAULT '{\"B\":\"https://www.baidu.com/\",\"G\":\"https://www.google.com.hk/\",\"H\":\"https://github.com/\"}', -- 全局快捷地址
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`), UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`) UNIQUE KEY `email` (`email`)

View File

@ -70,7 +70,7 @@ app.controller('loginCtr', ['$scope', '$filter', '$state', '$http', '$cookieStor
toastr.error('账号只能是数字字母且长度必须为3到12位', "错误"); toastr.error('账号只能是数字字母且长度必须为3到12位', "错误");
return; return;
} }
if (!/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test($scope.emailRegister)) { if (!/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test($scope.emailRegister)) {
toastr.error('邮箱格式输入有误', "错误"); toastr.error('邮箱格式输入有误', "错误");
return; return;
} }