diff --git a/schema.sql b/schema.sql index ddb1903..ecc0778 100644 --- a/schema.sql +++ b/schema.sql @@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `users` ( `lastLogin` datetime DEFAULT now(), -- 最后一次登录时间 `searchHistory` 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`), UNIQUE KEY `username` (`username`), UNIQUE KEY `email` (`email`) diff --git a/view/scripts/controllers/login-controller.js b/view/scripts/controllers/login-controller.js index 69a43ff..b2d0ede 100644 --- a/view/scripts/controllers/login-controller.js +++ b/view/scripts/controllers/login-controller.js @@ -70,7 +70,7 @@ app.controller('loginCtr', ['$scope', '$filter', '$state', '$http', '$cookieStor toastr.error('账号只能是数字字母,且长度必须为3到12位', "错误"); 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('邮箱格式输入有误', "错误"); return; }