public string GetUserInfo(string wechatUserId, ref UserInfo user) { string msg = ""; user = UserInfoManage.GetUserInfo(wechatUserId, ref msg); if (user != null) { return("success"); } else { return(msg); } }
public string GetUserInfo(string token, string wechatUserId, ref UserInfo user) { //string url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token={0}&userid={1}", // token, userId); //string res = HttpHelper.Get(url); //Dictionary<string, object> dict = JsonHelper.DeserializeJsonToObject<Dictionary<string, object>>(res); //if (!dict.Keys.Contains("userid"))//获取用户信息失败 //{ // return res; //} string msg = ""; user = UserInfoManage.GetUserInfo(wechatUserId, ref msg); if (user != null) { return("success"); } else { return(msg); } }