51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using Hncore.Infrastructure.Extension;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Etor.Wx.Open
|
|
{
|
|
public class jsapi_ticket
|
|
{
|
|
public static object get_locker = new object();
|
|
public int errcode { get; set; }
|
|
public string errmsg { get; set; }
|
|
public string ticket { get; set; }
|
|
public int expires_in { get; set; }
|
|
public int created_timestamp { get; set; }
|
|
|
|
public bool is_expired
|
|
{
|
|
get
|
|
{
|
|
var dt = (DateTime.Now.TimestampFrom19700101() - this.created_timestamp);
|
|
|
|
return errcode != 0 || dt < 0 || dt > 6000;
|
|
}
|
|
}
|
|
}
|
|
public class wx_config
|
|
{
|
|
public bool debug { get; set; }
|
|
public string appId { get; set; }
|
|
public string timestamp { get; set; }
|
|
public string nonceStr { get; set; }
|
|
public string signature { get; set; }
|
|
public List<string> jsApiList { get; set; }
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取wxjs配置请求
|
|
/// </summary>
|
|
public class GetWxJsConfigRequest
|
|
{
|
|
/// <summary>
|
|
/// 公众号appid
|
|
/// </summary>
|
|
public string Appid { get; set; }
|
|
/// <summary>
|
|
/// 当前的请求地址
|
|
/// </summary>
|
|
public string CurrentUrl { get; set; }
|
|
}
|
|
} |