TempleteModel.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #region Apache License Version 2.0
  2. /*----------------------------------------------------------------
  3. Copyright 2019 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd.
  4. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
  5. except in compliance with the License. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software distributed under the
  8. License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  9. either express or implied. See the License for the specific language governing permissions
  10. and limitations under the License.
  11. Detail: https://github.com/JeffreySu/WeiXinMPSDK/blob/master/license.md
  12. ----------------------------------------------------------------*/
  13. #endregion Apache License Version 2.0
  14. /*----------------------------------------------------------------
  15. Copyright (C) 2019 Senparc
  16. 文件名:TempleteModel.cs
  17. 文件功能描述:模板消息接口需要的数据
  18. 创建标识:Senparc - 20150211
  19. 修改标识:Senparc - 20150303
  20. 修改描述:整理接口
  21. 修改标识:Senparc - 20170328
  22. 修改描述:添加对小程序的支持
  23. ----------------------------------------------------------------*/
  24. namespace Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage
  25. {
  26. /// <summary>
  27. /// 普通模板消息参数
  28. /// </summary>
  29. public class TempleteModel
  30. {
  31. /// <summary>
  32. /// 目标用户OpenId
  33. /// </summary>
  34. public string touser { get; set; }
  35. /// <summary>
  36. /// 模板ID
  37. /// </summary>
  38. public string template_id { get; set; }
  39. /// <summary>
  40. /// 模板消息顶部颜色(16进制),默认为#FF0000
  41. /// </summary>
  42. public string topcolor { get; set; }
  43. /// <summary>
  44. /// 模板跳转链接
  45. /// </summary>
  46. public string url { get; set; }
  47. /// <summary>
  48. /// 跳小程序所需数据,不需跳小程序可不用传该数据
  49. /// </summary>
  50. public TempleteModel_MiniProgram miniprogram { get; set; }
  51. /// <summary>
  52. /// 数据
  53. /// </summary>
  54. public object data { get; set; }
  55. public TempleteModel()
  56. {
  57. topcolor = "#FF0000";
  58. }
  59. }
  60. /// <summary>
  61. /// 小程序定义
  62. /// </summary>
  63. //[Senparc.Weixin.Helpers.JsonSetting.IgnoreValue(false)]
  64. public class TempleteModel_MiniProgram
  65. {
  66. /// <summary>
  67. /// 小程序AppId
  68. /// </summary>
  69. public string appid { get; set; }
  70. /// <summary>
  71. /// 路径,如:index?foo=bar
  72. /// </summary>
  73. public string pagepath { get; set; }
  74. }
  75. }