修改bug
This commit is contained in:
parent
2d36d5df39
commit
0517382612
@ -37,7 +37,7 @@ namespace Assets.Scripts.Apis
|
|||||||
|
|
||||||
httpClientHandler = new HttpClientHandler();
|
httpClientHandler = new HttpClientHandler();
|
||||||
httpClientHandler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
|
httpClientHandler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
|
||||||
httpClientHandler.Proxy = WebRequest.DefaultWebProxy;
|
httpClientHandler.Proxy = WebRequest.GetSystemWebProxy();
|
||||||
httpClientHandler.CookieContainer = _cookieCollection;
|
httpClientHandler.CookieContainer = _cookieCollection;
|
||||||
httpClientHandler.UseCookies = true;
|
httpClientHandler.UseCookies = true;
|
||||||
//httpClientHandler.CookieContainer.Add(new Uri(ConfigHelper.Host), new Cookie("PowerFun.AUTH", "E1F130A03C0C2F01DF465A17AAA4740E9C44FC5F7C5077AF5A09B5ED29F0CF4FABE44329111C0BDBC6D97A28E7C7C188250265B37D2E6A849D7F0CAC606490648F17DC7FB9C8778BE7217991EBB6304BD543CFEE55084E54CCD634B49F26A751","/"));
|
//httpClientHandler.CookieContainer.Add(new Uri(ConfigHelper.Host), new Cookie("PowerFun.AUTH", "E1F130A03C0C2F01DF465A17AAA4740E9C44FC5F7C5077AF5A09B5ED29F0CF4FABE44329111C0BDBC6D97A28E7C7C188250265B37D2E6A849D7F0CAC606490648F17DC7FB9C8778BE7217991EBB6304BD543CFEE55084E54CCD634B49F26A751","/"));
|
||||||
|
|||||||
@ -54,7 +54,7 @@ public static class App
|
|||||||
// Host = "http://pf.juze.pro/";
|
// Host = "http://pf.juze.pro/";
|
||||||
// UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
// UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||||
// TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
// 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);
|
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000);
|
||||||
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
|
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -778,15 +778,8 @@ public class LoginController : MonoBehaviour
|
|||||||
}
|
}
|
||||||
void RefreshWx3(UserResultModel data,int type)
|
void RefreshWx3(UserResultModel data,int type)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(data.WxHeadImg))
|
Utils.DisplayHead(wxLogin3.Find("Avatar").GetComponent<RawImage>(),
|
||||||
{
|
|
||||||
wxLogin3.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Utils.DisplayImage(wxLogin3.Find("Avatar").GetComponent<RawImage>(),
|
|
||||||
data.WxHeadImg);
|
data.WxHeadImg);
|
||||||
}
|
|
||||||
wxLogin3.Find("Wx").gameObject.SetActive(type == 1);
|
wxLogin3.Find("Wx").gameObject.SetActive(type == 1);
|
||||||
wxLogin3.Find("NickName").GetComponent<Text>().text = data.Nickname;
|
wxLogin3.Find("NickName").GetComponent<Text>().text = data.Nickname;
|
||||||
userResult = data;
|
userResult = data;
|
||||||
|
|||||||
@ -29,14 +29,7 @@ public class QuickLoginUser : MonoBehaviour
|
|||||||
});
|
});
|
||||||
//transform.GetComponent<Button>().onClick.AddListener();
|
//transform.GetComponent<Button>().onClick.AddListener();
|
||||||
this.user = user;
|
this.user = user;
|
||||||
if (!string.IsNullOrEmpty(user.Avatar))
|
Utils.DisplayHead(transform.Find("Avatar").GetComponent<RawImage>(), user.Avatar);
|
||||||
{
|
|
||||||
Utils.DisplayImage(transform.Find("Avatar").GetComponent<RawImage>(), user.Avatar);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
transform.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
|
|
||||||
}
|
|
||||||
transform.Find("NickNameText").GetComponent<Text>().text = user.NickName;
|
transform.Find("NickNameText").GetComponent<Text>().text = user.NickName;
|
||||||
UIManager.AddEvent(transform.Find("BtnDelete").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (e) =>
|
UIManager.AddEvent(transform.Find("BtnDelete").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (e) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -190,6 +190,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
|||||||
async void Collect()
|
async void Collect()
|
||||||
{
|
{
|
||||||
JsonResult<object> r;
|
JsonResult<object> r;
|
||||||
|
transform.Find("CollectImg").GetComponent<Button>().enabled = false;
|
||||||
if (map.IsFavorite)
|
if (map.IsFavorite)
|
||||||
{
|
{
|
||||||
r = await ConfigHelper.mapApi.CancelFav(map.Id.ToString());
|
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());
|
r = await ConfigHelper.mapApi.AddFav(map.Id.ToString());
|
||||||
}
|
}
|
||||||
|
transform.Find("CollectImg").GetComponent<Button>().enabled = true;
|
||||||
if (r.result)
|
if (r.result)
|
||||||
{
|
{
|
||||||
map.IsFavorite = !map.IsFavorite;
|
map.IsFavorite = !map.IsFavorite;
|
||||||
|
|||||||
@ -137,7 +137,7 @@ public class BigMapController : PFUIPanel
|
|||||||
//headImage.material = material;
|
//headImage.material = material;
|
||||||
SetRounded(headImage.transform, rect.height);
|
SetRounded(headImage.transform, rect.height);
|
||||||
|
|
||||||
Utils.DisplayImage(headImage, App.CurrentUser.WxHeadImg);
|
Utils.DisplayHead(headImage, App.CurrentUser.WxHeadImg);
|
||||||
|
|
||||||
UIManager.AddEvent(headImage.gameObject, EventTriggerType.PointerClick, (e) =>
|
UIManager.AddEvent(headImage.gameObject, EventTriggerType.PointerClick, (e) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -185,14 +185,7 @@ public class EditUserController : PFUIPanel
|
|||||||
|
|
||||||
//Utils.DisplayImage(StartCoroutine, mHeadImage, currentUser.WxHeadImg);
|
//Utils.DisplayImage(StartCoroutine, mHeadImage, currentUser.WxHeadImg);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(currentUser.WxHeadImg))
|
Utils.DisplayHead(mHeadImage, currentUser.WxHeadImg);
|
||||||
{
|
|
||||||
Utils.DisplayImage(mHeadImage, currentUser.WxHeadImg);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mHeadImage.texture = Resources.Load<Texture>("Images/icon-1024");
|
|
||||||
}
|
|
||||||
if (currentUser.Sex == 1)
|
if (currentUser.Sex == 1)
|
||||||
{
|
{
|
||||||
mSexDropdown.SelectIndex(0);
|
mSexDropdown.SelectIndex(0);
|
||||||
|
|||||||
@ -149,15 +149,8 @@ public class HomeController : PFUIPanel
|
|||||||
{
|
{
|
||||||
userInfo.Find("SexIcon").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/man");
|
userInfo.Find("SexIcon").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/man");
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(App.CurrentUser.WxHeadImg))
|
Utils.DisplayHead(userInfo.Find("Avatar").GetComponent<RawImage>(), 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");
|
|
||||||
}
|
|
||||||
|
|
||||||
userInfo.Find("Country").GetComponent<RawImage>().texture = UIManager.Instance.loginRegOptions.GetCountryImageByName(App.CurrentUser.Country);
|
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("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";
|
userInfo.Find("KMContainer").Find("KMValue").GetComponent<Text>().text = summary.TotalDistance.ToString("0") +" KM";
|
||||||
|
|||||||
@ -223,7 +223,7 @@ public class MapListController : PFUIPanel
|
|||||||
headImage.material = material;
|
headImage.material = material;
|
||||||
//if (App.FromLogin)
|
//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 summary = r.data;
|
||||||
var user = App.CurrentUser;
|
var user = App.CurrentUser;
|
||||||
if (!string.IsNullOrEmpty(user.WxHeadImg))
|
Utils.DisplayHead(infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg);
|
||||||
{
|
|
||||||
Utils.DisplayImage(infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
infoPanel.Find("Avatar").GetComponent<RawImage>().texture = Resources.Load<Texture>("Images/icon-1024");
|
|
||||||
}
|
|
||||||
|
|
||||||
infoPanel.Find("Status").Find("Country").GetComponent<RawImage>().texture
|
infoPanel.Find("Status").Find("Country").GetComponent<RawImage>().texture
|
||||||
= UIManager.Instance.loginRegOptions.GetCountryImageByName(user.Country);
|
= UIManager.Instance.loginRegOptions.GetCountryImageByName(user.Country);
|
||||||
infoPanel.Find("Status").Find("Wx").gameObject.SetActive(
|
infoPanel.Find("Status").Find("Wx").gameObject.SetActive(
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,21 +18,21 @@
|
|||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.cn"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.collab-proxy": {
|
"com.unity.collab-proxy": {
|
||||||
"version": "1.2.16",
|
"version": "1.2.16",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.cn"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ext.nunit": {
|
"com.unity.ext.nunit": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.cn"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ide.rider": {
|
"com.unity.ide.rider": {
|
||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
@ -41,14 +41,14 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.test-framework": "1.1.1"
|
"com.unity.test-framework": "1.1.1"
|
||||||
},
|
},
|
||||||
"url": "https://packages.unity.cn"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ide.vscode": {
|
"com.unity.ide.vscode": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.cn"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.test-framework": {
|
"com.unity.test-framework": {
|
||||||
"version": "1.1.22",
|
"version": "1.1.22",
|
||||||
@ -59,7 +59,7 @@
|
|||||||
"com.unity.modules.imgui": "1.0.0",
|
"com.unity.modules.imgui": "1.0.0",
|
||||||
"com.unity.modules.jsonserialize": "1.0.0"
|
"com.unity.modules.jsonserialize": "1.0.0"
|
||||||
},
|
},
|
||||||
"url": "https://packages.unity.cn"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.timeline": {
|
"com.unity.timeline": {
|
||||||
"version": "1.2.18",
|
"version": "1.2.18",
|
||||||
@ -71,15 +71,14 @@
|
|||||||
"com.unity.modules.audio": "1.0.0",
|
"com.unity.modules.audio": "1.0.0",
|
||||||
"com.unity.modules.particlesystem": "1.0.0"
|
"com.unity.modules.particlesystem": "1.0.0"
|
||||||
},
|
},
|
||||||
"url": "https://packages.unity.cn"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ugui": {
|
"com.unity.ugui": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "builtin",
|
"source": "builtin",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.modules.ui": "1.0.0",
|
"com.unity.modules.ui": "1.0.0"
|
||||||
"com.unity.modules.imgui": "1.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.unity.modules.ai": {
|
"com.unity.modules.ai": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user