Merge branch 'dev_cyp' into dev_ar_cyp
# Conflicts: # Assets/Resources/UI/Font/HanWangZonYi.ttf.meta # Assets/Resources/UI/language.json # Assets/Scenes/Login.unity # Assets/Scripts/Apis/Models/MapRoute.cs # Assets/Scripts/App.cs # Assets/Scripts/ConfigHelper.cs # Assets/Scripts/Scenes/Ride/Scripts/PlayerController.cs # Assets/Scripts/UIManager.cs # Assets/Scripts/Utils/Utils.cs
This commit is contained in:
commit
e513eeac5c
301 files changed
+49814
-11770
No files matched your search
@@ -191,7 +191,7 @@ namespace Assets.Scripts.Apis
|
||||
private async Task<T> ParseJsonAsync<T>(HttpResponseMessage response)
|
||||
{
|
||||
var result = await response.Content.ReadAsStringAsync();
|
||||
Console.WriteLine(result);
|
||||
//Console.WriteLine(result);
|
||||
return JsonConvert.DeserializeObject<T>(result, new JsonSerializerSettings {
|
||||
DateTimeZoneHandling = DateTimeZoneHandling.Local
|
||||
});
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 593b04d43282490459537d561d16096d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
using Assets.Scenes.Ride.Scripts.Model;
|
||||
using Assets.Scenes.Ride.Scripts.Model;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -231,6 +230,14 @@ namespace Assets.Scripts.Apis
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public async Task<JsonResult<object>> ApplyOpenRoute(int id)
|
||||
{
|
||||
var result = await PostAsync<JsonResult<object>>($"Map/ApplyOpenRoute", new { id });
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public async Task<JsonResult<List<MapRouteAreaItem>>> GetRecommendAreaList()
|
||||
{
|
||||
var result = await GetAsync<JsonResult<List<MapRouteAreaItem>>>($"MapRouteArea/GetRecommendAreaList");
|
||||
|
||||
@@ -38,5 +38,10 @@ namespace Assets.Scripts.Apis
|
||||
{
|
||||
return Get<JsonResult<AntManufacturer>>($"MapRecord/GetAntManufacturerById?id={id}");
|
||||
}
|
||||
|
||||
public async Task<JsonResult<byte[]>> GetRecordSnapShot(int id)
|
||||
{
|
||||
return await GetAsync<JsonResult<byte[]>>($"Share/GetRecordSnapShot?id={id}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.Scripts.Apis.Models
|
||||
{
|
||||
public class MailModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Desc { get; set; }
|
||||
public bool IsRead { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public int Type { get; set; }
|
||||
public int SendUserId { get; set; }
|
||||
public string SendNickName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3dd81357979eb03468cc496795d1e8fd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -120,6 +120,7 @@ namespace Assets.Scripts.Apis.Models
|
||||
//最近骑行列表使用
|
||||
public RouteResult RecentRecord { get; set; }
|
||||
|
||||
public bool IsEnabled { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public int FileSize { get; set; }
|
||||
|
||||
@@ -29,6 +29,9 @@ namespace Assets.Scripts.Apis.Models
|
||||
public ushort StrokeCount { get; set; }
|
||||
public uint TotalDistance { get; set; }
|
||||
public int TotalTime { get; set; }
|
||||
public int? Type { get; set; }
|
||||
public double? TypeValue { get; set; }
|
||||
public string ShadowIds { get; set; }
|
||||
}
|
||||
public class RowerChartModel
|
||||
{
|
||||
@@ -36,6 +39,8 @@ namespace Assets.Scripts.Apis.Models
|
||||
public ushort Pace { get; set; }
|
||||
public uint Rate { get; set; }
|
||||
public int HeartRate { get; set; }
|
||||
public int Distance { get; set; }
|
||||
public int StrokeCount { get; set; }
|
||||
}
|
||||
public class RowerResultModel
|
||||
{
|
||||
@@ -60,5 +65,55 @@ namespace Assets.Scripts.Apis.Models
|
||||
public int TotalTime { get; set; }
|
||||
public List<RowerChartModel> ChartList { get; set; }
|
||||
public string Cover { get; set; }
|
||||
public int? Type { get; set; }
|
||||
public double? TypeValue { get; set; }
|
||||
public double Ticks { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SegmentList
|
||||
{
|
||||
public int Ticks { get; set; }
|
||||
public int Distance { get; set; }
|
||||
public int Speed { get; set; }
|
||||
public int Power { get; set; }
|
||||
public int HeartRate { get; set; }
|
||||
public int StrokeCount { get; set; }
|
||||
public int Energy { get; set; }
|
||||
public int Rate { get; set; }
|
||||
}
|
||||
|
||||
public class RowerRank
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public double Time { get; set; }
|
||||
public int TotalDistance { get; set; }
|
||||
public string NickName { get; set; }
|
||||
public string WxHeadImg { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public bool isFinished { get; set; }
|
||||
public List<RowerChartModel> list { get; set; }
|
||||
public string Country { get; set; }
|
||||
public int Nid { get; set; }
|
||||
public double Ticks { get; set; }
|
||||
public int rankNum { get; set; }
|
||||
}
|
||||
|
||||
public class Info
|
||||
{
|
||||
public string CreateTime { get; set; }
|
||||
public string MyRank { get; set; }
|
||||
public int? Type { get; set; }
|
||||
public string TypeStr { get; set; }
|
||||
public string MyRankLeft { get; set; }
|
||||
}
|
||||
|
||||
public class RowerSegmentData
|
||||
{
|
||||
public List<SegmentList> segmentList { get; set; }
|
||||
public List<RowerRank> ranks { get; set; }
|
||||
public Info info { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace Assets.Scripts.Apis
|
||||
protected async override Task<HttpResponseMessage> SendAsync(
|
||||
HttpRequestMessage request, CancellationToken cancellationToken)
|
||||
{
|
||||
var badreqText = App.GetLocalLanguage() == "zh" ? "请检查网络连接是否正常" : "Please check if the network connection is normal.";
|
||||
var badreqText = App.GetLocalString("Please check the network status!");
|
||||
try
|
||||
{
|
||||
var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
@@ -32,9 +32,29 @@ namespace Assets.Scripts.Apis
|
||||
return await GetAsync<JsonResult<RowerResultModel>>($"Rower/GetDetail?Id={id}");
|
||||
}
|
||||
|
||||
public async Task<JsonResult<RowerSegmentData>> GetSegmentDataAndRanking(string id)
|
||||
{
|
||||
return await GetAsync<JsonResult<RowerSegmentData>>($"Rower/GetSegmentDataAndRanking?Id={id}");
|
||||
}
|
||||
|
||||
public async Task<JsonResult<object>> Delete(string Id)
|
||||
{
|
||||
return await PostAsync<JsonResult<object>>($"Rower/Delete",new { Id});
|
||||
}
|
||||
|
||||
public async Task<JsonResult<List<RowerRank>>> GetShadowList(RowerTaskPanel.RowerType rowerType)
|
||||
{
|
||||
return await GetAsync<JsonResult<List<RowerRank>>>($"Rower/GetShadowList?type={rowerType.type}&typeValue={rowerType.value}");
|
||||
}
|
||||
|
||||
public async Task<JsonResult<List<RowerRank>>> GetReRowShadowList(string id)
|
||||
{
|
||||
return await GetAsync<JsonResult<List<RowerRank>>>($"Rower/GetReRowShadowList?Id={id}");
|
||||
}
|
||||
|
||||
public async Task<JsonResult<byte[]>> GetRecordSnapShot(string id)
|
||||
{
|
||||
return await GetAsync<JsonResult<byte[]>>($"Share/GetRowerRecordSnapShot?Id={id}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user