Merge branch 'dev_cyp' into dev

This commit is contained in:
suntao committed 2021-05-20 20:01:55 +08:00
commit 509a7c16bd
12 files changed
+32 -55

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ namespace Assets.Scripts.Apis
httpClientHandler = new HttpClientHandler();
httpClientHandler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
httpClientHandler.Proxy = WebRequest.DefaultWebProxy;
httpClientHandler.Proxy = WebRequest.GetSystemWebProxy();
httpClientHandler.CookieContainer = _cookieCollection;
httpClientHandler.UseCookies = true;
//httpClientHandler.CookieContainer.Add(new Uri(ConfigHelper.Host), new Cookie("PowerFun.AUTH", "E1F130A03C0C2F01DF465A17AAA4740E9C44FC5F7C5077AF5A09B5ED29F0CF4FABE44329111C0BDBC6D97A28E7C7C188250265B37D2E6A849D7F0CAC606490648F17DC7FB9C8778BE7217991EBB6304BD543CFEE55084E54CCD634B49F26A751","/"));
+1 -1
View File
@@ -54,7 +54,7 @@ public static class App
// Host = "http://pf.juze.pro/";
// UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
// TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
Host = "https://wx.powerfun.com.cn";
Host = "https://wx.powerfun.com.cn/";
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000);
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
#endif
+1 -8
View File
@@ -778,15 +778,8 @@ public class LoginController : MonoBehaviour
}
void RefreshWx3(UserResultModel data,int type)
{
if (string.IsNullOrEmpty(data.WxHeadImg))
{
wxLogin3.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
}
else
{
Utils.DisplayImage(wxLogin3.Find("Avatar").GetComponent<RawImage>(),
Utils.DisplayHead(wxLogin3.Find("Avatar").GetComponent<RawImage>(),
data.WxHeadImg);
}
wxLogin3.Find("Wx").gameObject.SetActive(type == 1);
wxLogin3.Find("NickName").GetComponent<Text>().text = data.Nickname;
userResult = data;
@@ -29,14 +29,7 @@ public class QuickLoginUser : MonoBehaviour
});
//transform.GetComponent<Button>().onClick.AddListener();
this.user = user;
if (!string.IsNullOrEmpty(user.Avatar))
{
Utils.DisplayImage(transform.Find("Avatar").GetComponent<RawImage>(), user.Avatar);
}
else
{
transform.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
}
Utils.DisplayHead(transform.Find("Avatar").GetComponent<RawImage>(), user.Avatar);
transform.Find("NickNameText").GetComponent<Text>().text = user.NickName;
UIManager.AddEvent(transform.Find("BtnDelete").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (e) =>
{
@@ -190,6 +190,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
async void Collect()
{
JsonResult<object> r;
transform.Find("CollectImg").GetComponent<Button>().enabled = false;
if (map.IsFavorite)
{
r = await ConfigHelper.mapApi.CancelFav(map.Id.ToString());
@@ -198,6 +199,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
{
r = await ConfigHelper.mapApi.AddFav(map.Id.ToString());
}
transform.Find("CollectImg").GetComponent<Button>().enabled = true;
if (r.result)
{
map.IsFavorite = !map.IsFavorite;
@@ -137,7 +137,7 @@ public class BigMapController : PFUIPanel
//headImage.material = material;
SetRounded(headImage.transform, rect.height);
Utils.DisplayImage(headImage, App.CurrentUser.WxHeadImg);
Utils.DisplayHead(headImage, App.CurrentUser.WxHeadImg);
UIManager.AddEvent(headImage.gameObject, EventTriggerType.PointerClick, (e) =>
{
@@ -185,14 +185,7 @@ public class EditUserController : PFUIPanel
//Utils.DisplayImage(StartCoroutine, mHeadImage, currentUser.WxHeadImg);
if (!string.IsNullOrWhiteSpace(currentUser.WxHeadImg))
{
Utils.DisplayImage(mHeadImage, currentUser.WxHeadImg);
}
else
{
mHeadImage.texture = Resources.Load<Texture>("Images/icon-1024");
}
Utils.DisplayHead(mHeadImage, currentUser.WxHeadImg);
if (currentUser.Sex == 1)
{
mSexDropdown.SelectIndex(0);
@@ -149,15 +149,8 @@ public class HomeController : PFUIPanel
{
userInfo.Find("SexIcon").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/man");
}
if (!string.IsNullOrEmpty(App.CurrentUser.WxHeadImg))
{
Utils.DisplayImage(userInfo.Find("Avatar").GetComponent<RawImage>(), App.CurrentUser.WxHeadImg);
}
else
{
userInfo.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
}
Utils.DisplayHead(userInfo.Find("Avatar").GetComponent<RawImage>(), App.CurrentUser.WxHeadImg);
userInfo.Find("Country").GetComponent<RawImage>().texture = UIManager.Instance.loginRegOptions.GetCountryImageByName(App.CurrentUser.Country);
userInfo.Find("CaloriesContainer").Find("CaloriesValue").GetComponent<Text>().text = double.Parse(summary.Kcal).ToString("0") +" KCAL";
userInfo.Find("KMContainer").Find("KMValue").GetComponent<Text>().text = summary.TotalDistance.ToString("0") +" KM";
@@ -223,7 +223,7 @@ public class MapListController : PFUIPanel
headImage.material = material;
//if (App.FromLogin)
//{
Utils.DisplayImage(headImage, App.CurrentUser.WxHeadImg);
Utils.DisplayHead(headImage, App.CurrentUser.WxHeadImg);
//}
@@ -78,15 +78,8 @@ public class UserInfoController : PFUIPanel
{
var summary = r.data;
var user = App.CurrentUser;
if (!string.IsNullOrEmpty(user.WxHeadImg))
{
Utils.DisplayImage(infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg);
}
else
{
infoPanel.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
}
Utils.DisplayHead(infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg);
infoPanel.Find("Status").Find("Country").GetComponent<RawImage>().texture
= UIManager.Instance.loginRegOptions.GetCountryImageByName(user.Country);
infoPanel.Find("Status").Find("Wx").gameObject.SetActive(
+11
View File
@@ -438,5 +438,16 @@ namespace Assets.Scripts
}
}
/*下载文件*/
public static void DisplayHead(RawImage raw, string s)
{
if (string.IsNullOrEmpty(s))
{
raw.texture = Resources.Load<Texture>("Images/icon-1024");
}
else
{
DisplayImage(raw, s);
}
}
}
}