mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-12 14:50:25 +08:00
优化操作系统和浏览器统计相关程序
This commit is contained in:
21
internal/db/models/formal_client_system_model_ext.go
Normal file
21
internal/db/models/formal_client_system_model_ext.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
|
||||
)
|
||||
|
||||
// DecodeCodes 解析代号
|
||||
func (this *FormalClientSystem) DecodeCodes() []string {
|
||||
if IsNull(this.Codes) {
|
||||
return nil
|
||||
}
|
||||
|
||||
var result = []string{}
|
||||
err := json.Unmarshal(this.Codes, &result)
|
||||
if err != nil {
|
||||
remotelogs.Error("FormalClientSystem.DecodeCodes", err.Error())
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user