heyujie
2021-11-26 e904a0672267d8f1b25fe92d0b08282f8b5b8d18
增加接口 GetUserProfile
1个文件已修改
15 ■■■■■ 已修改文件
userApi.go 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
userApi.go
@@ -63,6 +63,21 @@
    return res.Success,res.Data
}
func (api UserApi) GetUserProfile(userId string) (bool,interface{}) {
    url := "/data/api-u/users/profile"
    netNode := getNetNode(url2Topic(Topic_System_Service, url))
    client := NewClient(WithNodes(netNode))
    respBody, err := client.DoGetRequest(url,nil, nil)
    if err != nil {
        return false,nil
    }
    var res Result
    if err = json.Unmarshal(respBody, &res); err != nil {
        return false,nil
    }
    return res.Success,res.Data
}
func (api UserApi) SaveAuth(paramBody map[string]interface{}) (bool,interface{}) {
    url := "/data/api-u/users/saveAuth"
    netNode := getNetNode(url2Topic(Topic_System_Service, url))