Merge remote-tracking branch 'origin/dev_cyp' into dev_lishuo

This commit is contained in:
lishuo committed 2021-07-30 15:39:59 +08:00
commit 07a7a95aa8
8 files changed
+22 -12

No files matched your search

@@ -73,5 +73,6 @@ namespace Assets.Scripts.Apis.Models
public DateTime LastUpdateWheelStraight { get; set; }
public DateTime UpdateTime { get; set; }
public string WebHost { get; set; }//创建比赛url
public bool CanCreateRace { get; set; }//是否可以创建比赛
}
}
+5 -2
View File
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace Assets.Scripts.Apis
{
@@ -73,6 +74,7 @@ namespace Assets.Scripts.Apis
user.Height = ret.data.Height;
//todo: check local database, insert new user
user.WebHost = ret.data.WebHost;
user.CanCreateRace = ret.data.CanCreateRace;
//PubCommData.CurrentUser = user;
user.cookie = cookies[0].Value;
return new JsonResult<UserResultModel>() { result = true, data = user };
@@ -244,8 +246,9 @@ namespace Assets.Scripts.Apis
{
return await GetAsync<JsonResult<AppDownloadModel>>("home/getversions");
}
public JsonResult<object> Update(UserResultModel currUser, string filePath = "")
public JsonResult<object> Update(UserResultModel currUser, out string cookie, string filePath = "")
{
cookie = App.CurrentUser.cookie;
//return await PostAsync<JsonResult<dynamic>>("User/UpdateUserSetting", new {
// UID = currUser.Id,
// Sex = currUser.Sex,
@@ -296,7 +299,7 @@ namespace Assets.Scripts.Apis
currUser.Birthday
//imgData = imgData
}, files);
Debug.Log(cookie);
return Newtonsoft.Json.JsonConvert.DeserializeObject<JsonResult<object>>(res);
}
public async Task<JsonResult<JObject>> GetNotify()