接口文件

This commit is contained in:
“wanyongkang”
2024-04-10 13:55:27 +08:00
parent fff6bee06a
commit ed3b2c653e
3190 changed files with 268248 additions and 1 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;
}
}
}
}