初始提交

This commit is contained in:
wanyongkang
2020-10-07 20:25:03 +08:00
commit d318014316
3809 changed files with 263103 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using Hncore.Infrastructure.Extension;
using System;
namespace Hncore.Wx.Open
{
public class ResponseBase
{
public int errcode { get; set; }
public string errmsg { get; set; }
public int expires_in { get; set; }
public long create_from { get; set; }
public virtual bool need_to_refresh_token
{
get
{
var timespan = (DateTime.Now.TimestampFrom19700101() - create_from);
//此处不应该等于0 errcode=0表明微信返回的token有错误 需要刷新 ==0是正确的
//提前10分钟过期
return errcode != 0 || timespan < 0 || timespan > expires_in-10*60;
}
}
}
}