loading页&结果页面&代码结构微调
This commit is contained in:
1 parent
eb1803c9ef
commit
eed2d13624
99 files changed
+14567
-7299
No files matched your search
@@ -0,0 +1,90 @@
|
||||
using Assets.Scenes.Ride.Scripts.Model.RiderModels;
|
||||
using Assets.Scripts;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
{
|
||||
public class ReviewModel : BaseCycling
|
||||
{
|
||||
public List<MapRecordRanking> rankings;
|
||||
|
||||
public ReviewModel(Route route1, RouteResultParam param)
|
||||
: base(route1, CyclingModel.Review)
|
||||
{
|
||||
//rankings = service.GetMapRecordRankingsFromServe(param.RankingsId);
|
||||
riders = new List<BaseRider>();
|
||||
//riders.Add(new OnlineRiderModel()
|
||||
//{
|
||||
// NickName = App.CurrentUser.Nickname,
|
||||
// UserId = App.CurrentUser.Id,
|
||||
// WxHeadImg = App.CurrentUser.WxHeadImg,
|
||||
// Point = new GeoJSON.Net.Geometry.GeographicPosition(this.route.RouteInstance.Point[0], this.route.RouteInstance.Point[1])
|
||||
//});
|
||||
//foreach (var item in rankings)
|
||||
//{
|
||||
// riders.Add(new ReviewRiderModel()
|
||||
// {
|
||||
// NickName = item.NickName,
|
||||
// UserId = item.UserId,
|
||||
// WxHeadImg = item.WxHeadImg,
|
||||
// record = item.record,
|
||||
// Point = new GeoJSON.Net.Geometry.GeographicPosition(this.route.RouteInstance.Point[0], this.route.RouteInstance.Point[1])
|
||||
// });
|
||||
//}
|
||||
recorderData = new RecorderDataModel()
|
||||
{
|
||||
CurrentUser = App.CurrentUser,
|
||||
//BelongUserId = PubCommData.CurrentUser.Id,
|
||||
Competitionid = 0,
|
||||
ContinueIndex = 0,
|
||||
ContinueMark = Guid.NewGuid().ToString(),
|
||||
EndDistance = 0,
|
||||
PreDistance = 0,
|
||||
IsCompleted = false,
|
||||
IsNeedRanking = true,
|
||||
CyclingState = CyclingStateEnum.Prepare,
|
||||
//ManufacturerId = ManufacturerId,
|
||||
CurrentRoute = route,
|
||||
CurrentRouteStartDistance = 0,
|
||||
//DeviceNumber = DeviceNumber,
|
||||
//AntModelId = antModelId
|
||||
};
|
||||
|
||||
//recorderData = recorderData1;
|
||||
this.IsRecord = true;
|
||||
//riders = riders1;
|
||||
|
||||
}
|
||||
|
||||
public override void Run(TargetData targetData)
|
||||
{
|
||||
|
||||
#region 获取当前路线在线用户
|
||||
riders.RemoveAll(r => r.IsSelf == false);
|
||||
var onlineUsers = MapUDPService.GetOnlineUsers(recorderData.CurrentRoute.RouteInstance.Id).Where(d => d.IsSelf == false)
|
||||
.ToList();
|
||||
foreach (var item in onlineUsers)
|
||||
{
|
||||
riders.Add(new OnlineRiderModel()
|
||||
{
|
||||
NickName = item.Name,
|
||||
UserId = item.Id,
|
||||
WxHeadImg = item.HeadImage,
|
||||
Point = new GeoJSON.Net.Geometry.GeographicPosition(item.Point[0], item.Point[1]),
|
||||
EndDistance = item.EndDistance,
|
||||
PreDistance = item.PreDistance,
|
||||
WeightKg = item.WeightKg,
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
base.Run(targetData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user