user username to login

This commit is contained in:
Pan
2017-08-30 18:13:44 +08:00
parent b44c7384dc
commit 25a4be5a93
4 changed files with 92 additions and 78 deletions

View File

@@ -2,10 +2,9 @@
* Created by jiachenpan on 16/11/18.
*/
/* 是否是公司邮箱*/
export function isWscnEmail(str) {
const reg = /^[a-z0-9](?:[-_.+]?[a-z0-9]+)*@wallstreetcn\.com$/i
return reg.test(str.trim())
export function isvalidUsername(str) {
const valid_map = ['admin', 'editor']
return valid_map.indexOf(str.trim()) >= 0
}
/* 合法uri*/