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.
 
 
 
 

43 lines
1.1 KiB

namespace learun.wechat
{
/// <summary>
/// 版 本 EasyCode EC管理后台
/// Copyright (c) 2019-present EC管理有限公司
/// 创建人:tobin
/// 日 期:2019.11.06
/// 描 述:OpenToken获取
/// </summary>
public class OpenTokenGet : OperationRequestBase<OpenTokenGetResult, HttpGetRequest>
{
private string url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={0}&secret={1}&code={2}&grant_type=authorization_code";
/// <summary>
///
/// </summary>
/// <returns></returns>
protected override string Url()
{
return string.Format(url, appid, secret, code);
}
/// <summary>
/// 应用唯一标识,在微信开放平台提交应用审核通过后获得
/// </summary>
/// <returns></returns>
[IsNotNull]
public string appid { get; set; }
/// <summary>
/// 应用密钥AppSecret,在微信开放平台提交应用审核通过后获得
/// </summary>
/// <returns></returns>
[IsNotNull]
public string secret { get; set; }
/// <summary>
/// 填写第一步获取的code参数
/// </summary>
[IsNotNull]
public string code { get; set; }
}
}