结果页面移除划船记录&设备断开扔保留之前的厂商序列号
This commit is contained in:
parent
2697103479
commit
5b39dd985b
@ -95,7 +95,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &3111753855602397197
|
--- !u!224 &3111753855602397197
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1615,7 +1615,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &1724308109339741718
|
--- !u!224 &1724308109339741718
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c3d55e1747cadce45aef1d770b8f95bd
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: a1e43bb033650884fa2d63c2b3705140
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
30
Assets/Scripts/Apis/Models/DeviceDetail.cs
Normal file
30
Assets/Scripts/Apis/Models/DeviceDetail.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Assets.Scripts.Apis.Models
|
||||||
|
{
|
||||||
|
public class DeviceDetail
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public int? AntManufacturerId { get; set; }
|
||||||
|
|
||||||
|
public int? AntModelId { get; set; }
|
||||||
|
|
||||||
|
public string AdvertisingData { get; set; }
|
||||||
|
|
||||||
|
public bool SupportsBluetooth { get; set; }
|
||||||
|
|
||||||
|
public bool SupportsAnt { get; set; }
|
||||||
|
|
||||||
|
//public SensorType SensorType { get; set; }
|
||||||
|
|
||||||
|
public int? PairingHelpId { get; set; }
|
||||||
|
|
||||||
|
public int? BestPracticesId { get; set; }
|
||||||
|
|
||||||
|
public DateTime Updated { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Apis/Models/DeviceDetail.cs.meta
Normal file
11
Assets/Scripts/Apis/Models/DeviceDetail.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7d697543a3cdf6f46adc75828232116d
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -293,6 +293,10 @@ namespace Assets.Scripts.Apis
|
|||||||
{
|
{
|
||||||
return await GetAsync<JsonResult<JObject>>("/home/getversions");
|
return await GetAsync<JsonResult<JObject>>("/home/getversions");
|
||||||
}
|
}
|
||||||
|
public async Task<JsonResult<List<DeviceDetail>>> GetDeviceList()
|
||||||
|
{
|
||||||
|
return await GetAsync<JsonResult<List<DeviceDetail>>>("/home/GetDeviceList");
|
||||||
|
}
|
||||||
public async Task<JsonResult<JObject>> ResetPassword(string phone, string captcha, string newPwd)
|
public async Task<JsonResult<JObject>> ResetPassword(string phone, string captcha, string newPwd)
|
||||||
{
|
{
|
||||||
return await PostAsync<JsonResult<JObject>>("NoAuth/v1/ResetPassword", new {phone,captcha,newPwd });
|
return await PostAsync<JsonResult<JObject>>("NoAuth/v1/ResetPassword", new {phone,captcha,newPwd });
|
||||||
|
|||||||
@ -1,21 +1,13 @@
|
|||||||
using Assets.Scripts.Apis.Models;
|
using Assets.Scripts.Apis.Models;
|
||||||
using Assets.Scripts.UI.Prefab.Login;
|
using Assets.Scenes.Ride.Scripts.Model;
|
||||||
using Assets.Scenes.Ride.Scripts.Model;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Globalization;
|
|
||||||
using System.Threading;
|
|
||||||
using Assets.Scripts.Devices;
|
using Assets.Scripts.Devices;
|
||||||
using Assets.Scripts;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Timers;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Facebook.Unity;
|
using Facebook.Unity;
|
||||||
using Assets.Scenes.Ride.Scripts;
|
using Assets.Scenes.Ride.Scripts;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
public delegate void ChangeLanguageDelegate();
|
public delegate void ChangeLanguageDelegate();
|
||||||
|
|
||||||
@ -61,6 +53,8 @@ public static class App
|
|||||||
//全局用,弹多个广告
|
//全局用,弹多个广告
|
||||||
public static Queue<ActivityModel> adQueue;
|
public static Queue<ActivityModel> adQueue;
|
||||||
|
|
||||||
|
public static List<DeviceDetail> deviceList;
|
||||||
|
|
||||||
public static RideSetting RideSetting = new RideSetting();
|
public static RideSetting RideSetting = new RideSetting();
|
||||||
public static string pageName { get; set; }
|
public static string pageName { get; set; }
|
||||||
public static int firstEnter { get; set; }
|
public static int firstEnter { get; set; }
|
||||||
|
|||||||
@ -365,9 +365,17 @@ public class MainController : BaseScene
|
|||||||
}
|
}
|
||||||
ShowGameRoomInviteConfirm();
|
ShowGameRoomInviteConfirm();
|
||||||
UIManager.UpdateJoinCompetition();//查询当前我参加的赛事
|
UIManager.UpdateJoinCompetition();//查询当前我参加的赛事
|
||||||
|
//await GetDeviceListAsync(); PC品牌
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task GetDeviceListAsync()
|
||||||
|
{
|
||||||
|
var result = await ConfigHelper.userApi.GetDeviceList();
|
||||||
|
if (result != null && result.result)
|
||||||
|
{
|
||||||
|
App.deviceList = result.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
float emptyt = 0;//用于无消息计时
|
float emptyt = 0;//用于无消息计时
|
||||||
float t = 1f;
|
float t = 1f;
|
||||||
float scanTicks = 0;
|
float scanTicks = 0;
|
||||||
|
|||||||
@ -293,7 +293,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
currentSlope = pointList[CurrentIndex].Grade;
|
currentSlope = pointList[CurrentIndex].Grade;
|
||||||
//格式化坡度最大不能超过15,-15
|
//格式化坡度最大不能超过15,-15
|
||||||
PreSlope = PreSlope > 0 ?Math.Min(PreSlope, 15) : Math.Max(PreSlope, -15);
|
PreSlope = PreSlope > 0 ?Math.Min(PreSlope, 15) : Math.Max(PreSlope, -15);
|
||||||
currentSlope = currentSlope > 0? Math.Min(PreSlope, 15) : Math.Max(PreSlope, -15);
|
currentSlope = currentSlope > 0? Math.Min(currentSlope, 15) : Math.Max(currentSlope, -15);
|
||||||
CurrentDistance = pointList[CurrentIndex].Distance;
|
CurrentDistance = pointList[CurrentIndex].Distance;
|
||||||
//计算下一个海拔和坡度&当前区间距离
|
//计算下一个海拔和坡度&当前区间距离
|
||||||
nextSlope = pointList[nextIndex].Grade > 0 ? Math.Min(pointList[nextIndex].Grade, 15) : Math.Max(pointList[nextIndex].Grade, -15);
|
nextSlope = pointList[nextIndex].Grade > 0 ? Math.Min(pointList[nextIndex].Grade, 15) : Math.Max(pointList[nextIndex].Grade, -15);
|
||||||
|
|||||||
@ -38,25 +38,36 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
(_device as IRequiresRiderWeight).RiderWeight = App.CurrentUser.Weight;
|
(_device as IRequiresRiderWeight).RiderWeight = App.CurrentUser.Weight;
|
||||||
}
|
}
|
||||||
if (_device.Network == NetworkType.ANT)
|
SetDeviceInfo();
|
||||||
{
|
|
||||||
var antDevice = _device as AbstractAntDevice;
|
|
||||||
ManufacturerId = antDevice.ManufacturerId;
|
|
||||||
AntModelId = antDevice.AntModelId;
|
|
||||||
DeviceNumber = $"{ antDevice.DeviceNumber },{ antDevice.DeviceType}";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var bleDevice = _device as BleDevice;
|
|
||||||
DeviceNumber = $"{ Helper.FormateMacAddress(bleDevice.Address) },{ ServiceUuids.GetBySensor(bleDevice.Sensor) }";
|
|
||||||
ManufacturerName = bleDevice.Name + "," + bleDevice.Network + "," + bleDevice.Sensor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return _device;
|
return _device;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetDeviceInfo()
|
||||||
|
{
|
||||||
|
if (_device.Network == NetworkType.ANT)
|
||||||
|
{
|
||||||
|
var antDevice = _device as AbstractAntDevice;
|
||||||
|
if (antDevice != null)
|
||||||
|
{
|
||||||
|
ManufacturerId = antDevice.ManufacturerId > 0 ? antDevice.ManufacturerId : ManufacturerId;
|
||||||
|
AntModelId = antDevice.AntModelId > 0 ? antDevice.AntModelId : AntModelId;
|
||||||
|
DeviceNumber = $"{ antDevice.DeviceNumber },{ antDevice.DeviceType}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var bleDevice = _device as BleDevice;
|
||||||
|
if (bleDevice != null)
|
||||||
|
{
|
||||||
|
DeviceNumber = $"{ Helper.FormateMacAddress(bleDevice.Address) },{ ServiceUuids.GetBySensor(bleDevice.Sensor) }";
|
||||||
|
ManufacturerName = bleDevice.Name + "," + bleDevice.Network + "," + bleDevice.Sensor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新速度(KM/H)
|
/// 更新速度(KM/H)
|
||||||
///
|
///
|
||||||
@ -130,6 +141,10 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
public bool CheckAnt()
|
public bool CheckAnt()
|
||||||
{
|
{
|
||||||
//_antConnector = AntConnector.Instance();
|
//_antConnector = AntConnector.Instance();
|
||||||
|
if (_device == null || App.CurrentUser.FTP <= 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
var devices = App.MainDeviceAdapter.GetDevices().Where(d => d.State == DeviceState.Connected && (d.Sensor == SensorType.Trainer || d.Sensor == SensorType.Power));
|
var devices = App.MainDeviceAdapter.GetDevices().Where(d => d.State == DeviceState.Connected && (d.Sensor == SensorType.Trainer || d.Sensor == SensorType.Power));
|
||||||
if (devices.Count() > 0)
|
if (devices.Count() > 0)
|
||||||
{
|
{
|
||||||
@ -138,34 +153,12 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
(_device as IRequiresRiderWeight).RiderWeight = App.CurrentUser.Weight;
|
(_device as IRequiresRiderWeight).RiderWeight = App.CurrentUser.Weight;
|
||||||
}
|
}
|
||||||
if (_device.Network == NetworkType.ANT)
|
SetDeviceInfo();
|
||||||
{
|
|
||||||
var antDevice = _device as AbstractAntDevice;
|
|
||||||
ManufacturerId = antDevice.ManufacturerId;
|
|
||||||
AntModelId = antDevice.AntModelId;
|
|
||||||
DeviceNumber = $"{ antDevice.DeviceNumber },{ antDevice.DeviceType}";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var bleDevice =_device as BleDevice;
|
|
||||||
DeviceNumber = $"{ bleDevice.Address },{ bleDevice.Sensor }";
|
|
||||||
ManufacturerName = bleDevice.Name + " " + bleDevice.Network + " " + bleDevice.Sensor;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (App.CurrentUser.FTP <= 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (_device == null)
|
|
||||||
{
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//设备列表
|
//设备列表
|
||||||
|
|||||||
@ -1,13 +1,8 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Assets.Scenes.Ride.Scripts.Model;
|
|
||||||
using UnityEngine.SceneManagement;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using Assets.Scenes.Ride.Scripts.Model.RiderModels;
|
|
||||||
using System;
|
using System;
|
||||||
using ChartAndGraph;
|
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using Assets.Scenes.Ride.Scripts.Model;
|
||||||
using Assets.Scenes.Ride.Scripts.Model.CyclingModels;
|
using Assets.Scenes.Ride.Scripts.Model.CyclingModels;
|
||||||
|
|
||||||
namespace Assets.Scenes.Ride.Scripts
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
@ -159,10 +154,6 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//public void InitGraph(int index)
|
|
||||||
//{
|
|
||||||
// chartDataSourceScript.InitHorizontalScrolling(index);
|
|
||||||
//}
|
|
||||||
//移动海拔图头像
|
//移动海拔图头像
|
||||||
protected override void MoveGraphHead(bool init = false)
|
protected override void MoveGraphHead(bool init = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -96,26 +96,16 @@ public class ResultListController : PFUIPanel
|
|||||||
UIManager.AddEvent(matchScroll.gameObject, UnityEngine.EventSystems.EventTriggerType.EndDrag, OnEndDrag);
|
UIManager.AddEvent(matchScroll.gameObject, UnityEngine.EventSystems.EventTriggerType.EndDrag, OnEndDrag);
|
||||||
}
|
}
|
||||||
scrolls = new Transform[] { routeScroll, matchScroll};
|
scrolls = new Transform[] { routeScroll, matchScroll};
|
||||||
//GetList(0);
|
GetList(0);
|
||||||
GetList(1);
|
GetList(1);
|
||||||
#if UNITY_ANDROID || UNITY_IOS
|
|
||||||
GetList(2);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Load()
|
public void Load()
|
||||||
{
|
{
|
||||||
Debug.Log("刷新show");
|
if (contents != null && contents.Length == 2)
|
||||||
//Refresh(contents[0]);
|
|
||||||
if (contents != null && contents.Length == 3)
|
|
||||||
{
|
{
|
||||||
Debug.Log("刷新show进入");
|
|
||||||
Refresh(contents[scrollIndex]);
|
Refresh(contents[scrollIndex]);
|
||||||
}
|
}
|
||||||
//if (scroll!=null)
|
|
||||||
//{
|
|
||||||
// scroll.transform.Find("Error").gameObject.SetActive(false);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEndDrag(BaseEventData e)
|
private void OnEndDrag(BaseEventData e)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user