ComTools class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
formatCNcharacters(String str, {int len = 16, String etc = '…'})
→ String
-
截取字符串,中文算两个字符,英文算一个字符
-
formatDateTime(int mills, {bool yyMMdd = false, bool hhmmss = false})
→ String
-
格式化显示时间
-
formatDenyDateTime(int deny)
→ String
-
格式化封号时间
-
formatTeamNick(Team team)
→ String
-
格式化群组显示名称
-
formatTeamUserNick(TeamShip ship, User user)
→ String
-
格式化群组成员昵称
-
formatUserNick(User user)
→ String
-
格式化用户显示昵称
-
formatUserNo(User user, {required String empty})
→ String
-
格式化用户显示账号
-
formatUserShipNick(UserShip ship, User user)
→ String
-
格式化用户好友昵称
-
formatUserShowArea(User who)
→ String
-
格式化用户显示地址
-
formatWaitShipApply(UserShip ship, {required String empty})
→ String
-
格式化好友申请内容
-
generateUserEnterSign(String secret, String token, String uid, int mill)
→ String
-
生成userEnter路由的签名
-
isTeamAdmin(Team team, ObjectId uid)
→ bool
-
拥有群组超级管理权限或普通管理权限
-
isTeamNormalAdmin(Team team, ObjectId uid)
→ bool
-
拥有群组普通管理权限,且无超级管理权限
-
isTeamShipFromSystem(TeamShip ship)
→ bool
-
是否为来源于系统级的群组关系
-
isTeamSuperAdmin(Team team, ObjectId uid)
→ bool
-
拥有群组超级管理权限
-
isUserShipFromSystem(UserShip ship)
→ bool
-
是否为来源于系统级的用户关系
-
validateUserEnterSign(String secret, String token, String uid, int mill, String sign)
→ bool
-
验证userEnter路由的签名