| | |
| | | package bhomedbapi |
| | | |
| | | import ( |
| | | json "github.com/json-iterator/go" |
| | | jsoniter "github.com/json-iterator/go" |
| | | ) |
| | | |
| | | type SysMenuApi struct { |
| | | |
| | | } |
| | | |
| | | func (api SysMenuApi) MenuTree(userId string) (bool,interface{}) { |
| | | func (api SysMenuApi) MenuTree(userId string) (bool, interface{}) { |
| | | url := DATA_URL_PREFIX + "/menu/tree" |
| | | netNode := getNetNode(url2Topic(Topic_System_Service, url)) |
| | | client := NewClient(WithNodes(netNode)) |
| | |
| | | } |
| | | body, err := client.DoGetRequest(url, query, nil) |
| | | if err != nil { |
| | | return false,nil |
| | | return false, nil |
| | | } |
| | | |
| | | var json = jsoniter.ConfigCompatibleWithStandardLibrary |
| | | var res Result |
| | | if err = json.Unmarshal(body, &res); err != nil { |
| | | return false,nil |
| | | return false, nil |
| | | } |
| | | return true,res.Data |
| | | return true, res.Data |
| | | } |