google 登录暂存
This commit is contained in:
1 parent
45b3ee5bbc
commit
58a8233697
21 files changed
+355
-102
No files matched your search
@@ -292,6 +292,10 @@ public class EditUserController : PFUIPanel, INativeOnMobileImageSelect
|
||||
string.IsNullOrEmpty(currentUser.AppleUserId)
|
||||
? Resources.Load<Sprite>("Images/link-apple")
|
||||
: Resources.Load<Sprite>("Images/Login_Apple");
|
||||
linkContainer.Find("Gg").GetComponent<Image>().sprite =
|
||||
string.IsNullOrEmpty(currentUser.GoogleUserId)
|
||||
? Resources.Load<Sprite>("Images/link-google")
|
||||
: Resources.Load<Sprite>("Images/Login_Google");
|
||||
}
|
||||
// Start is called before the first frame update
|
||||
protected override void Start()
|
||||
|
||||
@@ -116,6 +116,7 @@ public class HomeController : PFUIPanel
|
||||
// }
|
||||
//},
|
||||
};
|
||||
|
||||
}
|
||||
private void GoRide(BaseEventData e)
|
||||
{
|
||||
@@ -299,7 +300,7 @@ public class HomeController : PFUIPanel
|
||||
if (maxt <= 0)
|
||||
{
|
||||
GetMaxRanking();
|
||||
maxt += 60f;
|
||||
maxt += 60f * 5;
|
||||
}
|
||||
if (maxdataTime > 0)
|
||||
{
|
||||
@@ -372,5 +373,6 @@ public class HomeController : PFUIPanel
|
||||
base.Show();
|
||||
transform.MyDOFade();
|
||||
GetSummary();
|
||||
//transform.Find("Panel (1)").GetComponent<test>().startPage();
|
||||
}
|
||||
}
|
||||
@@ -130,14 +130,13 @@ public class NewRouteDetailController : PFUIPanel
|
||||
// timer += 1f;
|
||||
//}
|
||||
}
|
||||
MapRouteAreaItem area;
|
||||
MapRouteAreaDetail area;
|
||||
int pageIndex = 0, pageSize = 10;
|
||||
bool isEnd = false, startMouse = false;
|
||||
public async void Initial(MapRouteAreaItem area)
|
||||
public async void Initial(int areaId)
|
||||
{
|
||||
isEnd = false;
|
||||
pageIndex = 0;
|
||||
this.area = area;
|
||||
var left = transform.Find("Container/Left");
|
||||
left.Find("Icon").GetComponent<RawImage>().texture = null;
|
||||
scroll.content.DestroyChildren();
|
||||
@@ -151,46 +150,9 @@ public class NewRouteDetailController : PFUIPanel
|
||||
.text = string.Empty;
|
||||
transform.Find("Container/Left/DescScroll/Viewport/Content/Desc").GetComponent<Text>()
|
||||
.text = string.Empty;
|
||||
if (area.CoverImage != null)
|
||||
{
|
||||
Utils.DisplayImageTempDict(left.Find("Icon").GetComponent<RawImage>(), area.CoverImage, caches
|
||||
, b =>
|
||||
{
|
||||
// if (b != null)
|
||||
// {
|
||||
// cacheByte.Add(area.CoverImage, b);
|
||||
// }
|
||||
// else if(cacheByte.ContainsKey(area.CoverImage))
|
||||
// {
|
||||
// b = cacheByte[area.CoverImage];
|
||||
// }
|
||||
|
||||
//#if UNITY_EDITOR
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5, false);
|
||||
//#else
|
||||
//#if UNITY_IOS
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#elif UNITY_ANDROID
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#else //pc
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5,false);
|
||||
//#endif
|
||||
//#endif
|
||||
// _t.LoadImage(b);
|
||||
// //Graphics.CopyTexture(t, _t);
|
||||
// //Debug.Log($"{t.width},{t.height}");
|
||||
// left.Find("Thumbnail").GetComponent<RawImage>().texture =
|
||||
// ScaleTextureCutOut(_t, 0, _t.height / 2, _t.width / 3, _t.height / 3);
|
||||
});
|
||||
//Utils.DisplayImageTempDict(left.Find("Thumbnail").GetComponent<RawImage>(), area.CoverImage, caches);
|
||||
}
|
||||
Debug.Log(153 + area.IsFav.ToString());
|
||||
|
||||
left.Find("Name").GetComponent<Text>().text = area.Name;
|
||||
|
||||
GetData();
|
||||
GetData(areaId);
|
||||
GetList();
|
||||
|
||||
}
|
||||
@@ -243,11 +205,13 @@ public class NewRouteDetailController : PFUIPanel
|
||||
GetList();
|
||||
}
|
||||
}
|
||||
private async void GetData()
|
||||
private async void GetData(int areaId)
|
||||
{
|
||||
var res = await ConfigHelper.mapApi.GetMapRouteAreaDetail(area.Id);
|
||||
var res = await ConfigHelper.mapApi.GetMapRouteAreaDetail(areaId);
|
||||
if (res.result)
|
||||
{
|
||||
this.area = res.data;
|
||||
transform.Find("Container/Left/Name").GetComponent<Text>().text = res.data.Name;
|
||||
transform.Find("Container/Left/RideContainer/Text").GetComponent<Text>()
|
||||
.text = res.data.RideCount.ToString();
|
||||
transform.Find("Container/Left/Infos/DistanceContainer/Text").GetComponent<Text>()
|
||||
@@ -264,6 +228,41 @@ public class NewRouteDetailController : PFUIPanel
|
||||
transform.Find("Container/Left/Fav").GetComponent<Image>().sprite = FavDict[res.data.IsFav];
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(transform.Find("Container/Left/RideContainer").GetComponent<RectTransform>());
|
||||
var userinfo = Resources.Load<GameObject>("UI/Prefab/NewRoute/UserInfo");
|
||||
if (res.data.CoverImage != null)
|
||||
{
|
||||
Utils.DisplayImageTempDict(transform.Find("Container/Left/Icon").GetComponent<RawImage>(), area.CoverImage, caches
|
||||
, b =>
|
||||
{
|
||||
// if (b != null)
|
||||
// {
|
||||
// cacheByte.Add(area.CoverImage, b);
|
||||
// }
|
||||
// else if(cacheByte.ContainsKey(area.CoverImage))
|
||||
// {
|
||||
// b = cacheByte[area.CoverImage];
|
||||
// }
|
||||
|
||||
//#if UNITY_EDITOR
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5, false);
|
||||
//#else
|
||||
//#if UNITY_IOS
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#elif UNITY_ANDROID
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#else //pc
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5,false);
|
||||
//#endif
|
||||
//#endif
|
||||
// _t.LoadImage(b);
|
||||
// //Graphics.CopyTexture(t, _t);
|
||||
// //Debug.Log($"{t.width},{t.height}");
|
||||
// left.Find("Thumbnail").GetComponent<RawImage>().texture =
|
||||
// ScaleTextureCutOut(_t, 0, _t.height / 2, _t.width / 3, _t.height / 3);
|
||||
});
|
||||
//Utils.DisplayImageTempDict(left.Find("Thumbnail").GetComponent<RawImage>(), area.CoverImage, caches);
|
||||
}
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
transform.Find("Container/Left/NOData").gameObject.SetActive(res.data.UserList.Count == 0);
|
||||
transform.Find("Container/Left/Users").DestroyChildren();
|
||||
|
||||
Reference in new issue
Block a user