保存优化&本地记录自动上传
This commit is contained in:
1 parent
f5294b0d39
commit
0c1c2ed382
3 files changed
+35
-23
No files matched your search
@@ -62,6 +62,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
#endregion
|
||||
GameObject loadingcanvas;
|
||||
AbstratctLoadingController loadingController;
|
||||
|
||||
private async Task Login()
|
||||
{
|
||||
var result = await new UserApi().Login("15261826280", "123456", "");
|
||||
@@ -73,6 +74,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
public GraphChartBase graph { get; set; }
|
||||
|
||||
private float activeSeconds { get; set; }//移动端用户进入骑行超过2min,界面进入沉浸状态
|
||||
public int RankingId;
|
||||
public string recordId;
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
@@ -83,6 +86,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
}
|
||||
#endif
|
||||
//获取路书信息
|
||||
recordId = Guid.NewGuid().ToString();
|
||||
mapApi = ConfigHelper.mapApi;
|
||||
routeId = App.RouteIdParam > 0 ? App.RouteIdParam : 2633;
|
||||
competitionId = App.CompetionId;
|
||||
@@ -1196,14 +1200,14 @@ public BaseUIManager singleUIManager;
|
||||
var tempContent = Newtonsoft.Json.JsonConvert.SerializeObject(tempRecordData);
|
||||
System.IO.File.WriteAllText(filePath, tempContent);
|
||||
}
|
||||
public int RankingId;
|
||||
|
||||
public void Save(double totalDistance)
|
||||
{
|
||||
ClearTempFile();
|
||||
cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
|
||||
isQuit = true;
|
||||
isStart = false;
|
||||
string recordId = Guid.NewGuid().ToString();
|
||||
//string recordId = Guid.NewGuid().ToString();
|
||||
//var path = Helper.GetDataDir("MapWorkoutRecords/"+ recordId);
|
||||
var path = PFConstants.MapWorkoutRecordFolder + "/" + recordId;
|
||||
Helper.CreateDirectoryIfNotExsit(path);
|
||||
|
||||
Reference in new issue
Block a user