mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-09 03:50:26 +08:00
实现节点看板(仅对企业版开放)
This commit is contained in:
@@ -1 +1,19 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
func (this *NodeValue) DecodeMapValue() maps.Map {
|
||||
if len(this.Value) == 0 {
|
||||
return maps.Map{}
|
||||
}
|
||||
var m = maps.Map{}
|
||||
err := json.Unmarshal([]byte(this.Value), &m)
|
||||
if err != nil {
|
||||
// 忽略错误
|
||||
return m
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user