/// <summary> /// 4、用户详情设置与获取 get /// </summary> /// <param name="userid">如果为空返回当前用户</param> /// <returns></returns> /// Jerry Shi public UserProfileResponse profile(string token, string userid) { UserProfileResponse userProfileResponse = new UserProfileResponse(); try { string ApiResponse = string.Empty; Dictionary<string, string> sPara = new Dictionary<string, string>(); sPara.Add("userid", userid.ToString()); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "ucenter/user/profile?token=" + token); userProfileResponse = JsonHelper.DeserializeJsonToObject<UserProfileResponse>(ApiResponse); } catch (Exception ex) { //AppLog.Instance.Write("UserProfileResponse", AppLog.LogMessageType.Error, ex); } return userProfileResponse; }
/// <summary> /// 4、用户详情设置与获取 get /// </summary> /// <param name="token"></param> /// <param name="username"></param> /// <param name="truename"></param> /// <param name="deptid"></param> /// <param name="avatar"></param> /// <param name="age"></param> /// <returns></returns> /// Jack Ding public string getProfiles(string token, string username, string email, string deptid, string avatar, string sex, string ethnic, string height, string weight, string address, string doctorid, string userid, string mobile, string telphone, string num_il) { try { string ApiResponse = string.Empty; UserProfileResponse userProfileResponse = new UserProfileResponse(); Dictionary<string, string> sPara = new Dictionary<string, string>(); sPara.Add("username", username); sPara.Add("mobile", mobile); sPara.Add("email", email); sPara.Add("tel", telphone); //sPara.Add("deptid", deptid); if (avatar != string.Empty) { sPara.Add("avatar", avatar); } if (sex != string.Empty) { sPara.Add("sex", sex); } if (ethnic != string.Empty) { sPara.Add("ethnic", ethnic); } if (userid != string.Empty) { sPara.Add("userid", userid); } sPara.Add("height", height); sPara.Add("weight", weight); sPara.Add("address", address); sPara.Add("doctorid", doctorid); sPara.Add("num_ill", num_il); ApiResponse = F8YLSubmit.BuildRequest(sPara, "ucenter/user/profile?token=" + token); return ApiResponse; } catch (Exception) { throw; } }
/// <summary> /// 4、用户详情设置与获取 get /// </summary> /// <param name="token"></param> /// <param name="username"></param> /// <param name="truename"></param> /// <param name="deptid"></param> /// <param name="avatar"></param> /// <param name="age"></param> /// <returns></returns> /// Jack Ding public string getProfile(string token, string userid) { try { string ApiResponse = string.Empty; UserProfileResponse userProfileResponse = new UserProfileResponse(); Dictionary<string, string> sPara = new Dictionary<string, string>(); sPara.Add("userid", userid); ApiResponse = F8YLSubmit.BuildGetRequest(sPara, "ucenter/user/profile?token=" + token); return ApiResponse; } catch (Exception) { throw; } }