using Assets.Scripts.Apis.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Assets.Scripts.Apis { public class MapApi :ApiBase { public string GetMapToken(string name) { return Get($"Map/GetMapToken?name={name}"); } /// /// 获取路线数据 /// /// /// public MapDataModel GetData(int id) { return Newtonsoft.Json.JsonConvert.DeserializeObject(Get("Map/GetData?routeId="+id)); } /// /// 从服务端获取记录信息 /// /// public List GetRecordFileFromServer(List id) { return Post>>("Map/GetCyclingRecordsById", id).data; } /// /// 通过Id获取路书 /// /// /// public JsonResult GetById(int id) { return Get>($"Map/GetMapRouteById?id={id}"); } /// /// /// /// /// /// 名称,地址,编号 /// 距离,格式0-10 /// /// hot, distance /// asc /// public JsonResult> GetList(int pageIndex, int pageSize, string name, string distance="", string hands="", bool is3D=false, string sort="", string sortDire = "") { var url = $"Map/GetRoute?pageIndex={ pageIndex }&pageSize={ pageSize }&name={ name }&distance={ distance }&hands={ hands }&is3D={ is3D }&sort={ sort }&sortDire={ sortDire }"; return Get>>(url); } /// /// 从服务端获取Key /// /// public Dictionary GetServiceKeyFromServer() { return Get>>($"Map/GetServiceKey").data; } } }