Browse Source

修复滑动模块

“hujiajun” 2 months ago
parent
commit
f95926c027
1 changed files with 14 additions and 1 deletions
  1. 14 1
      Assets/CaoZuoRizhi.cs

+ 14 - 1
Assets/CaoZuoRizhi.cs

@@ -93,6 +93,8 @@ sendl=l;
 
         if (realIndex >= 0&&datamsg.Count>realIndex)
         {
+            Debug.Log("wrapIndex==>"+wrapIndex);
+            Debug.Log("realIndex==>"+realIndex);
             RiZhiItem xitem = item.GetComponent<RiZhiItem>();
             xitem.init(datamsg[realIndex]);
             item.SetActive(true);
@@ -109,6 +111,8 @@ sendl=l;
     }
     public void RemoveAll()
     {
+        uiScroll.Init();
+        nextdata=null;
         datamsg=new List<JsonData>();
     }
     List<JsonData> datamsg =new List<JsonData>();
@@ -159,7 +163,16 @@ sendl=l;
                 }
                     uiScroll.InitList(0, datamsg.Count);
                 startinit=true;
-                Debug.Log("getreplist end");
+                Debug.Log("getreplist end"+datamsg.Count);
+                if(datamsg.Count == 0 )
+                {
+                    go.transform.parent.parent.parent.gameObject.SetActive(false);
+                }
+                else
+                {
+                    go.transform.parent.parent.parent.gameObject.SetActive(true);
+
+                }
                      
         }));
         if(page+1<=total)