添加TapTap登录
This commit is contained in:
33
Assets/Scripts/Online/Models/LoginCacheData.cs
Normal file
33
Assets/Scripts/Online/Models/LoginCacheData.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace IchniOnline.Online.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录缓存数据,使用 ES3 持久化
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class LoginCacheData
|
||||
{
|
||||
public string openId;
|
||||
public string unionId;
|
||||
public string name;
|
||||
public string avatar;
|
||||
public string email;
|
||||
public long cacheTimestamp;
|
||||
|
||||
public LoginCacheData() { }
|
||||
|
||||
public LoginCacheData(string openId, string unionId, string name, string avatar, string email)
|
||||
{
|
||||
this.openId = openId;
|
||||
this.unionId = unionId;
|
||||
this.name = name;
|
||||
this.avatar = avatar;
|
||||
this.email = email;
|
||||
this.cacheTimestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
}
|
||||
|
||||
public bool IsValid => !string.IsNullOrEmpty(openId);
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Online/Models/LoginCacheData.cs.meta
Normal file
2
Assets/Scripts/Online/Models/LoginCacheData.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ee42a7bb6e8fed448dea34e8644a944
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Online.Models
|
||||
namespace IchniOnline.Online.Models
|
||||
{
|
||||
public enum UserPermission
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user