From 34a2c0bbb2f057ca7b8c1516a1a75a266125d48b Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Thu, 19 Aug 2021 13:23:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8D=E5=BE=AE=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Apis/MapApi.cs | 2 +- Assets/Scripts/UI/Prefab/Panel/MapListController.cs | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Apis/MapApi.cs b/Assets/Scripts/Apis/MapApi.cs index be738a26..e131195d 100644 --- a/Assets/Scripts/Apis/MapApi.cs +++ b/Assets/Scripts/Apis/MapApi.cs @@ -60,7 +60,7 @@ namespace Assets.Scripts.Apis public Task>> GetList(int pageIndex, int pageSize, string name, string distance="", string hands="", bool is3D=false, string sort="", string sortDire = "", bool isFav = false) { string lngLat = ""; - if (string.IsNullOrEmpty(name) && string.IsNullOrEmpty(distance) && string.IsNullOrEmpty(hands) && !is3D && sort.Equals("Near") && !isFav) + if (sort.Equals("Near")) { lngLat = $"{App.longitude},{App.latitude}"; } diff --git a/Assets/Scripts/UI/Prefab/Panel/MapListController.cs b/Assets/Scripts/UI/Prefab/Panel/MapListController.cs index 6b3916bd..9d1e1ec9 100644 --- a/Assets/Scripts/UI/Prefab/Panel/MapListController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/MapListController.cs @@ -181,8 +181,17 @@ public class MapListController : PFUIPanel sort = "Hot"; } var image = sortDir.Find("Image").GetComponent(); - image.sprite = Resources.Load("Images/DOWN"); - sortDire = "desc"; + if (sort == "Near") + { + image.sprite = Resources.Load("Images/UP"); + sortDire = "asc"; + } + else + { + image.sprite = Resources.Load("Images/DOWN"); + sortDire = "desc"; + } + Refresh(); }); }