修改细节

This commit is contained in:
Caiyanpeng committed 2021-04-30 21:09:21 +08:00
1 parent 9f4e446850
commit af34243c28
8 files changed
+1443 -1322

No files matched your search

+2 -3
View File
@@ -117,10 +117,9 @@ namespace Assets.Scripts.Apis
/// 获取个人中心的统计信息
/// </summary>
/// <returns></returns>
public JsonResult<SummaryResultModel> GetSummary()
public async Task<JsonResult<SummaryResultModel>> GetSummary()
{
var result = Get<JsonResult<SummaryResultModel>>("User/GetSummary");
var result = await GetAsync<JsonResult<SummaryResultModel>>("User/GetSummary");
return result;
}
+1 -1
View File
@@ -8,7 +8,7 @@ using System.Net;
public static class App
{
public static string Host = "http://192.168.0.97:5082/";
public static string Host = "http://192.168.0.101:5083/";
public static string AppVersion = "1.0.0";
+3 -1
View File
@@ -383,6 +383,8 @@ public class LoginController : MonoBehaviour
else
{
signContainer.gameObject.SetActive(true);
wxLogin1.gameObject.SetActive(false);
wxLogin1.GetComponent<RectTransform>().localPosition = new Vector3(0, -573, 0);
pageNums = 4;
//wxLogin3.gameObject.SetActive(false);
StartScrollPanel(1);
@@ -872,7 +874,7 @@ public class LoginController : MonoBehaviour
userResult.Sex = _genders.SelectedIndex + 1;
userResult.Country = UIManager.Instance.loginRegOptions.GetCountryName(_countrys.SelectedIndex);
userResult.Unit = _units.SelectedIndex;
userResult.Weight = int.Parse(_weight.Text);
userResult.Weight = double.Parse(_weight.Text);
userResult.Height = int.Parse(_height.Text);
if (string.IsNullOrEmpty(userResult.Nickname))
{
@@ -316,9 +316,9 @@ public class EditUserController : PFUIPanel
}
user.FTP = int.Parse(mFTP.Text);
user.Height = int.Parse(mHeight.Text);
user.Weight = int.Parse(mWeight.Text);
user.Weight = double.Parse(mWeight.Text);
user.MaxHeartRate = int.Parse(mMHR.Text);
user.BicycleWeight = int.Parse(mBW.Text);
user.BicycleWeight = double.Parse(mBW.Text);
user.WheelDiameter = int.Parse(mWD.Text);
user.Unit = mUnitDropdown.SelectedIndex;
user.Contact = mName.Text;
@@ -334,7 +334,7 @@ public class EditUserController : PFUIPanel
}
else
{
App.CurrentUser = user;
App.CurrentUser = JObject.FromObject(result.data).ToObject<UserResultModel>();
var userinfos = UIManager.Instance.userInfos;
var i = userinfos.FindIndex(x => x.Id == App.CurrentUser.Id);
if (i != -1)
@@ -170,9 +170,9 @@ public class HomeController : PFUIPanel
? App.CurrentUser.LastUpdateFtpTime.ToString("yyyy.MM.dd")
: App.CurrentUser.LastUpdateWeightTime.ToString("yyyy.MM.dd");
}
void GetSummary()
async void GetSummary()
{
var res = ConfigHelper.userApi.GetSummary();
var res = await ConfigHelper.userApi.GetSummary();
if (res.result)
{
//App.CurrentUser.Distance = res.data.TotalDistance;
@@ -66,14 +66,14 @@ public class UserInfoController : PFUIPanel
summaryPanel.Find("Panel").Find("RideResultList").GetComponent<ResultListController>().Load();
}
}
void Load()
async void Load()
{
//if (!App.FromLogin)
//{
// var result = await userApi.Login("15651831367", "123456", "");
// App.CurrentUser = result.data;
//}
var r = ConfigHelper.userApi.GetSummary();
var r = await ConfigHelper.userApi.GetSummary();
if (r.result)
{
var summary = r.data;