using Newtonsoft.Json;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace FlexJobApi.Core.Utils.WxmpUtils
|
{
|
/// <summary>
|
/// 微信小程序获取接口调用凭据
|
/// </summary>
|
public class WxmpGetAccessTokenRequest
|
{
|
/// <summary>
|
/// 填写 client_credential
|
/// </summary>
|
[JsonProperty("grant_type")]
|
public string GrantType { get; set; } = "client_credential";
|
|
/// <summary>
|
/// 小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态
|
/// </summary>
|
[JsonProperty("appid")]
|
public string Appid { get; set; }
|
|
/// <summary>
|
/// 小程序唯一凭证密钥,即 AppSecret,获取方式同 appid
|
/// </summary>
|
[JsonProperty("secret")]
|
public string Secret { get; set; }
|
}
|
|
/// <summary>
|
/// 微信小程序获取接口调用凭据-结果
|
/// </summary>
|
public class WxmpGetAccessTokenResponse
|
{
|
/// <summary>
|
/// 获取到的凭证
|
/// </summary>
|
[JsonProperty("access_token")]
|
public string AccessToken { get; set; }
|
/// <summary>
|
/// 凭证有效时间,单位:秒。目前是7200秒之内的值。
|
/// </summary>
|
[JsonProperty("expires_in")]
|
public int ExpiresIn { get; set; }
|
}
|
}
|