划船机暂存

This commit is contained in:
Caiyanpeng committed 2021-09-28 11:27:24 +08:00
1 parent 1c73701e73
commit c73545d912
164 files changed
+38281 -2181

No files matched your search

+3 -2
View File
@@ -24,9 +24,10 @@ namespace Assets.Scripts.Apis
return jsonResult;
}
public async Task<JsonResult<List<RouteResult>>> GetMapInterruptRecord(string keyword, int pageIndex, int pageSize, string type)
public async Task<JsonResult<List<JObject>>> GetMapInterruptRecord(string keyword, int pageIndex, int pageSize, string type)
{
return await GetAsync<JsonResult<List<RouteResult>>>($"MapRecord/v1/GetList?keyword={keyword}&pageIndex={pageIndex}&pageSize={pageSize}&type={type}");
//RouteResult
return await GetAsync<JsonResult<List<JObject>>>($"MapRecord/v1/GetList?keyword={keyword}&pageIndex={pageIndex}&pageSize={pageSize}&type={type}");
}
/// <summary>
/// 通过ID获取设备商
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Assets.Scripts.Apis.Models
{
public class RowerRecordModel
{
public string Id { get; set; }
public string ManufacturerName { get; set; }
public string DeviceNumber { get; set; }
public double? Kj { get; set; }
public int Ticks { get; set; }
public double Weight { get; set; }
public DateTime StartTime { get; set; }
public DateTime CreateTime { get; set; }
public int MaxPower { get; set; }
public ushort MaxPace { get; set; }
public uint MaxRate { get; set; }
public double AvgPace { get; set; }
public double AvgPower { get; set; }
public double AvgRate { get; set; }
public int MaxHeartRate { get; set; }
public int AvgHeartRate { get; set; }
public ushort StrokeCount { get; set; }
public uint TotalDistance { get; set; }
public int TotalTime { get; set; }
}
public class RowerChartModel
{
public int Power { get; set; }
public ushort Pace { get; set; }
public uint Rate { get; set; }
public int HeartRate { get; set; }
}
public class RowerResultModel
{
public string Id { get; set; }
public string ManufacturerName { get; set; }
public string DeviceNumber { get; set; }
public double? Kj { get; set; }
public DateTime StartTime { get; set; }
public DateTime CreateTime { get; set; }
public int MaxPower { get; set; }
public ushort MaxPace { get; set; }
public uint MaxRate { get; set; }
public double AvgPace { get; set; }
public double AvgPower { get; set; }
public double AvgRate { get; set; }
public int MaxHeartRate { get; set; }
public int AvgHeartRate { get; set; }
public ushort StrokeCount { get; set; }
public uint TotalDistance { get; set; }
public int TotalTime { get; set; }
public List<RowerChartModel> ChartList { get; set; }
public string Cover { get; set; }
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e4f2fe5f1bd49b143bbbca0b57371de9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+40
View File
@@ -0,0 +1,40 @@
using Assets.Scripts.Apis.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Assets.Scripts.Apis
{
public class RowerApi : ApiBase
{
/// <summary>
/// 上传划船记录到服务端
/// </summary>
/// <param name="interruptRecord"></param>
public JsonResult<object> Add(RowerRecordModel record, List<string> fileNames)
{
var result = Upload("Rower/AddRecord", record, fileNames);
var jsonResult = JsonConvert.DeserializeObject<JsonResult<object>>(result);
return jsonResult;
}
public async Task<JsonResult<List<JObject>>> GetList(int pageIndex, int pageSize)
{
return await GetAsync<JsonResult<List<JObject>>>($"Rower/GetList?pageIndex={pageIndex}&pageSize={pageSize}");
}
public async Task<JsonResult<RowerResultModel>> GetDetail(string id)
{
return await GetAsync<JsonResult<RowerResultModel>>($"Rower/GetDetail?Id={id}");
}
public async Task<JsonResult<object>> Delete(string Id)
{
return await PostAsync<JsonResult<object>>($"Rower/Delete",new { Id});
}
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 41164280104edad45bc16ffa81b9ab9f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: