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.

MenuCreate.cs 894 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 MenuCreate : OperationRequestBase<OperationResultsBase, HttpPostRequest>
  9. {
  10. private string url = "https://qyapi.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN&agentid={0}";
  11. protected override string Url()
  12. {
  13. return string.Format(url, agentid);
  14. }
  15. /// <summary>
  16. /// 企业应用的id,整型。可在应用的设置页面查看
  17. /// </summary>
  18. /// <returns></returns>
  19. [IsNotNull]
  20. public string agentid { private get; set; }
  21. /// <summary>
  22. /// 一级菜单数组,个数应为1~3个
  23. /// </summary>
  24. /// <returns></returns>
  25. public List<MenuItem> button { get; set; }
  26. }
  27. }