Race按钮恢复原样,增加是否创建比赛
This commit is contained in:
1 parent
44c1b771f7
commit
b4e97d5514
8 files changed
+22
-12
No files matched your search
@@ -329,7 +329,7 @@ public class EditUserController : PFUIPanel
|
||||
user.Contact = mName.Text;
|
||||
user.ContactPhone = mPhone.Text;
|
||||
user.ContactAddress = mAddr.Text;
|
||||
var result = userApi.Update(user);
|
||||
var result = userApi.Update(user, out string cookie,"");
|
||||
App.isChanged = false;
|
||||
if (result.result == false)
|
||||
{
|
||||
@@ -340,6 +340,7 @@ public class EditUserController : PFUIPanel
|
||||
else
|
||||
{
|
||||
App.CurrentUser = JObject.FromObject(result.data).ToObject<UserResultModel>();
|
||||
App.CurrentUser.cookie = cookie;
|
||||
if (App.CurrentUser.Birthday.HasValue)
|
||||
{
|
||||
App.CurrentUser.Birthday = App.CurrentUser.Birthday.Value.ToLocalTime();
|
||||
@@ -359,7 +360,7 @@ public class EditUserController : PFUIPanel
|
||||
}
|
||||
void ChangeAvatar(string path)
|
||||
{
|
||||
var r = userApi.Update(App.CurrentUser, path);
|
||||
var r = userApi.Update(App.CurrentUser, out string cookie,path);
|
||||
App.isChanged = false;
|
||||
if (r.result)
|
||||
{
|
||||
@@ -374,6 +375,7 @@ public class EditUserController : PFUIPanel
|
||||
}
|
||||
Debug.Log(img);
|
||||
App.CurrentUser.WxHeadImg = img;
|
||||
App.CurrentUser.cookie = cookie;
|
||||
Utils.showToast(gameObject, "Success", type: 1);
|
||||
//UIManager.ShowAlert();
|
||||
}
|
||||
|
||||
@@ -121,6 +121,7 @@ public class HomeController : PFUIPanel
|
||||
private void GoMatch(BaseEventData e)
|
||||
{
|
||||
UIManager.ShowRaceHomePanel();
|
||||
OnExit(e);
|
||||
}
|
||||
private void OnHover(BaseEventData e)
|
||||
{
|
||||
|
||||
@@ -62,6 +62,7 @@ public class UserInfoController : PFUIPanel
|
||||
{
|
||||
Application.OpenURL(App.CurrentUser.WebHost + "#/Mine/EditMatch?Token=" + App.CurrentUser.cookie);
|
||||
});
|
||||
|
||||
}
|
||||
public override void Show()
|
||||
{
|
||||
@@ -84,6 +85,7 @@ public class UserInfoController : PFUIPanel
|
||||
{
|
||||
var summary = r.data;
|
||||
var user = App.CurrentUser;
|
||||
Debug.Log(user.CanCreateRace);
|
||||
Utils.DisplayHead(infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg);
|
||||
|
||||
infoPanel.Find("Status").Find("Country").GetComponent<RawImage>().texture
|
||||
@@ -117,6 +119,7 @@ public class UserInfoController : PFUIPanel
|
||||
summaryPanel.Find("KM").Find("Value").GetComponent<Text>().text = summary.TotalDistance.ToString();
|
||||
summaryPanel.Find("Climb").Find("Value").GetComponent<Text>().text = summary.TotalClimb.ToString();
|
||||
summaryPanel.Find("Calories").Find("Value").GetComponent<Text>().text = summary.TotalKj.ToString();
|
||||
summaryPanel.Find("CreateBtn").gameObject.SetActive(user.CanCreateRace);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user