cun
This commit is contained in:
@@ -147,6 +147,9 @@ namespace Assets.MyGame.Scripts.Net
|
||||
dic_API[APIType.User_GetNoReadCount] = "/api/User/GetNoReadCount";
|
||||
dic_API[APIType.User_GetEmailByPage] = "/api/User/GetEmailByPage";
|
||||
|
||||
// ---------------- Rank ----------------
|
||||
dic_API[APIType.Rank_GetUserList] = "/api/User/GetUserList";
|
||||
|
||||
// ---------------- Customer ----------------
|
||||
dic_API[APIType.Customer_Start] = "/customerapi/Customer/start";
|
||||
dic_API[APIType.Customer_Message] = "/customerapi/Customer/message";
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIRequest.Params
|
||||
{
|
||||
/// <summary>
|
||||
/// 通用分页查询参数(排行榜/用户列表共用)
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BaseListPageParam : RequestParamBase
|
||||
{
|
||||
public string keyWord;
|
||||
public int pageIndex;
|
||||
public int pageSize;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4cddc697ed7d2f640b59af8f06ab52f8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -2,6 +2,7 @@
|
||||
using Assets.MyGame.Scripts.Net.APIRequest;
|
||||
using Assets.MyGame.Scripts.Net.APIRequest.Objs;
|
||||
using Assets.MyGame.Scripts.Net.APIRequest.Params;
|
||||
using Assets.MyGame.Scripts.Net.APIResponses;
|
||||
using Assets.MyGame.Scripts.Net.APIResponses.HomeMain_User;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
@@ -96,6 +97,18 @@ namespace Assets.MyGame.Scripts.Net
|
||||
|
||||
#endregion
|
||||
|
||||
#region Rank
|
||||
|
||||
/// <summary>
|
||||
/// 获取排行榜(用户列表分页)(POST)
|
||||
/// </summary>
|
||||
public static void GetRankList(BaseListPageParam req, Action<List<UserListItemDto>> callback)
|
||||
{
|
||||
APIManager.Response<List<UserListItemDto>>(APIType.Rank_GetUserList, req, callback);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Notice_公告
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -63,6 +63,10 @@ public class UserBaseInfo
|
||||
}
|
||||
}
|
||||
action?.Invoke(avatarSprite);
|
||||
|
||||
// 兜底:下载或加载失败 → 用默认头像
|
||||
if (avatarSprite == null)
|
||||
action?.Invoke(GameManager.Instance.GetAvatarSprite(null));
|
||||
}
|
||||
public void UpdateAvatar(System.Action<Sprite> action)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace Assets.MyGame.Scripts.Net.APIResponses
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户列表项DTO(排行榜用)
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UserListItemDto
|
||||
{
|
||||
public string id;
|
||||
public string number;
|
||||
public string userName;
|
||||
public string avatarUrl;
|
||||
public string mobile;
|
||||
public long createTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7f3e620112ad5b4aa52623a9a739847
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -298,6 +298,11 @@ namespace Assets.MyGame.Scripts.Net
|
||||
User_GetEmailByPage,
|
||||
|
||||
|
||||
// ---------------- Rank ----------------
|
||||
/// <summary>排行榜(用户列表分页)(POST)</summary>
|
||||
Rank_GetUserList,
|
||||
|
||||
|
||||
// ---------------- Customer ----------------
|
||||
/// <summary>发起会话(POST)</summary>
|
||||
Customer_Start,
|
||||
|
||||
Reference in New Issue
Block a user