33 lines
973 B
C#
33 lines
973 B
C#
|
|
using Assets.Scripts.Apis.Models;
|
|||
|
|
using Newtonsoft.Json;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
namespace Assets.Scripts.Apis
|
|||
|
|
{
|
|||
|
|
public class MailApi : ApiBase
|
|||
|
|
{
|
|||
|
|
public async Task<JsonResult<List<MailModel>>> GetList(int pageIndex,int pageSize, int type)
|
|||
|
|
{
|
|||
|
|
var result = await GetAsync<JsonResult<List<MailModel>>>($"Message/GetList?pageIndex={pageIndex}&pageSize={pageSize}&type={type}");
|
|||
|
|
return result;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public async Task<JsonResult<object>> MarkRead(int id)
|
|||
|
|
{
|
|||
|
|
var result = await PostAsync<JsonResult<object>>("Message/MarkRead",new { id});
|
|||
|
|
return result;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public async Task<JsonResult<object>> Delete(int id)
|
|||
|
|
{
|
|||
|
|
var result = await PostAsync<JsonResult<object>>("Message/Delete", new { id });
|
|||
|
|
return result;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|