From dd67d8ee640bd56e58e2ceea55bc4ea7fe14cf65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B05BEE13=2E=E5=8D=A2=E9=83=B4=E7=BE=A4?= Date: Wed, 12 May 2021 14:53:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Daa.bb@outlook.com=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=B3=A8=E5=86=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema.sql | 2 +- view/scripts/controllers/login-controller.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }