增加U盘登录

This commit is contained in:
hoteas
2022-05-05 16:07:01 +08:00
parent 53f24c033c
commit 3b2a317d2b
10 changed files with 270 additions and 12 deletions
+14
View File
@@ -5,6 +5,7 @@ import (
. "code.hoteas.com/golang/hotime/common"
"errors"
"time"
"unicode/utf8"
)
// Project 管理端项目
@@ -22,6 +23,7 @@ var Project = Proj{
"search_record": SearchRecordCtr,
"sms": Sms,
"tag": TagCtr,
"upan": UpanCtr,
"user": UserCtr,
"vip_order": VipOrderCtr,
"websocket": WebsocketCtr,
@@ -109,3 +111,15 @@ func auth(that *Context, phone, companyName string) error {
return nil
}
// FilterEmoji 过滤 emoji 表情
func FilterEmoji(content string) string {
new_content := ""
for _, value := range content {
_, size := utf8.DecodeRuneInString(string(value))
if size <= 3 {
new_content += string(value)
}
}
return new_content
}