Race按钮恢复原样,增加是否创建比赛
This commit is contained in:
1 parent
44c1b771f7
commit
b4e97d5514
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; }//是否可以创建比赛
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user