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.

OpenUserGet.cs 852 B

4 years ago
123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Learun.Application.WeChat
  7. {
  8. public class OpenUserGet : OperationRequestBase<OpenUserGetResult, HttpGetRequest>
  9. {
  10. private string url = "https://api.weixin.qq.com/sns/userinfo?access_token={0}&openid={1}lang=zh_CN";
  11. protected override string Url()
  12. {
  13. return string.Format(url, access_token, openid);
  14. }
  15. /// <summary>
  16. /// 普通用户标识,对该公众帐号唯一
  17. /// </summary>
  18. /// <returns></returns>
  19. [IsNotNull]
  20. public string openid { get; set; }
  21. /// <summary>
  22. /// token
  23. /// </summary>
  24. /// <returns></returns>
  25. [IsNotNull]
  26. public string access_token { get; set; }
  27. }
  28. }