更新拉取图片的缓存代码

This commit is contained in:
suntao committed 2021-05-08 14:38:23 +08:00
1 parent 696fd256a8
commit 6645310601
22 files changed
+149 -119

No files matched your search

+4 -7
View File
@@ -434,7 +434,7 @@ public class LoginController : MonoBehaviour
var r = await ConfigHelper.userApi.GetHeadImg(s);
if (!string.IsNullOrEmpty(r))
{
Utils.DisplayImage(StartCoroutine, loginContainer.Find("Avatar").GetComponent<RawImage>(), r);
Utils.DisplayImage(loginContainer.Find("Avatar").GetComponent<RawImage>(), r);
avatarName = s;
}
else
@@ -568,13 +568,11 @@ public class LoginController : MonoBehaviour
if (data.Value<string>("success") != null && data.Value<string>("success") == "False")
{
wxLogin2.gameObject.SetActive(true);
Utils.DisplayImage(StartCoroutine,
wxLogin2.Find("Avatar").GetComponent<RawImage>(),
Utils.DisplayImage(wxLogin2.Find("Avatar").GetComponent<RawImage>(),
wxInfoJson.Value<string>("headimgurl"));
wxLogin2.Find("NickName").GetComponent<Text>().text = wxInfoJson.Value<string>("nickname");
wxLogin3.gameObject.SetActive(true);
Utils.DisplayImage(StartCoroutine,
wxLogin3.Find("Avatar").GetComponent<RawImage>(),
Utils.DisplayImage(wxLogin3.Find("Avatar").GetComponent<RawImage>(),
wxInfoJson.Value<string>("headimgurl"));
wxLogin3.Find("NickName").GetComponent<Text>().text = wxInfoJson.Value<string>("nickname");
pageNums = 5;
@@ -790,8 +788,7 @@ public class LoginController : MonoBehaviour
}
else
{
Utils.DisplayImage(StartCoroutine,
wxLogin3.Find("Avatar").GetComponent<RawImage>(),
Utils.DisplayImage(wxLogin3.Find("Avatar").GetComponent<RawImage>(),
data.WxHeadImg);
}
wxLogin3.Find("Wx").gameObject.SetActive(type == 1);