wangrong
2026-08-30 4c949c0dc9bcae785c281c9d8125295f09810b15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export function isExternal(path) {
  return (
    /^(https?:|mailto:|tel:)/.test(path) ||
    /^(http?:|mailto:|tel:)/.test(path) ||
    path.startsWith('/api/pluginCommon/staticInfo')
  )
}
 
export function validUsername(str) {
  const valid_map = ['admin', 'cyw']
  return valid_map.indexOf(str.trim()) >= 0
}
 
export const PHONE_REGEX = '^1[3|4|5|7|8][0-9]{9}$'
 
export const EMAIL_REGEX = '^[a-zA-Z0-9_._-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$'