You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserGetuserinfo.cs 894 B

4 years ago
12345678910111213141516171819202122232425262728
  1. 
  2. namespace Learun.Application.WeChat
  3. {
  4. public class UserGetuserinfo : OperationRequestBase<UserGetuserinfoResult, HttpGetRequest>
  5. {
  6. private string url =
  7. "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?access_token=ACCESS_TOKEN&code={0}&agentid={1}";
  8. protected override string Url()
  9. {
  10. return string.Format(url, code, agentid);
  11. }
  12. /// <summary>
  13. /// 通过员工授权获取到的code,每次员工授权带上的code将不一样,code只能使用一次,5分钟未被使用自动过期
  14. /// </summary>
  15. /// <returns></returns>
  16. [IsNotNull]
  17. public string code { get; set; }
  18. /// <summary>
  19. /// 跳转链接时所在的企业应用ID
  20. /// </summary>
  21. /// <returns></returns>
  22. [IsNotNull]
  23. public string agentid { get; set; }
  24. }
  25. }