“hujiajun” 6 months ago
parent
commit
2af5632c0f

+ 16 - 11
Assets/CaoZuoRizhi.cs

@@ -28,7 +28,7 @@ startl=l;
     public void chooseB()
     {
         StartCoroutine(chooseYanChi(ds2.Label, (l) => {
-sendl=l;
+sendl=l+86400;
 
         }));
     }
@@ -93,8 +93,6 @@ 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);
@@ -116,14 +114,14 @@ sendl=l;
         datamsg=new List<JsonData>();
     }
     List<JsonData> datamsg =new List<JsonData>();
-   int MaxLiebiao=11;
+   int MaxLiebiao=15;
 
    public JsonData nextdata;
    public  IEnumerator getreplist(JsonData jd)
    {
         int page =int.Parse( jd["page"].ToString());
         int total =int.Parse( jd["page"].ToString());
-        Debug.Log("getreplist start");
+        Debug.Log("getreplist start"+uiScroll.GetComponent<RectTransform>().anchoredPosition.y);
         yield return  StartCoroutine(DataManager.Instance.GetRePort(jd,(msg)=>{
                 JsonData jd =JsonMapper.ToObject(msg);
                 for (int i = list.Count; i < MaxLiebiao; i++)
@@ -149,19 +147,20 @@ sendl=l;
                             list[i].SetActive(false);
                         }
                     }
+                    uiScroll.InitList(0, datamsg.Count);
                 }
                 else
                 {
 
-                for (int i = 0; i < MaxLiebiao; i++)
-                {
-                    if(jd["data"]["list"].Count> i)
+                    for (int i = 0; i < MaxLiebiao; i++)
                     {
-                        datamsg.Add(jd["data"]["list"][i]);
+                        if(jd["data"]["list"].Count> i)
+                        {
+                            datamsg.Add(jd["data"]["list"][i]);
+                        }
                     }
-                }
-                }
                     uiScroll.InitList(0, datamsg.Count);
+                }
                 startinit=true;
                 Debug.Log("getreplist end"+datamsg.Count);
                 if(datamsg.Count == 0 )
@@ -173,6 +172,8 @@ sendl=l;
                     go.transform.parent.parent.parent.gameObject.SetActive(true);
 
                 }
+                Invoke("UpdatePos",0.1f);
+        Debug.Log("getreplist start"+uiScroll.GetComponent<RectTransform>().anchoredPosition.y);
                      
         }));
         if(page+1<=total)
@@ -187,4 +188,8 @@ sendl=l;
         }
         
    }
+   void UpdatePos()
+   {
+    uiScroll.GetComponent<RectTransform>().anchoredPosition= new Vector2(uiScroll.GetComponent<RectTransform>().anchoredPosition.x,uiScroll.GetComponent<RectTransform>().anchoredPosition.y+1);
+   }
 }

+ 97 - 21
Assets/ChangePass.cs

@@ -1,5 +1,6 @@
 using System.Collections;
 using System.Collections.Generic;
+using System.Text.RegularExpressions;
 using LitJson;
 using UnityEngine;
 using UnityEngine.UI;
@@ -9,37 +10,112 @@ public class ChangePass : MonoBehaviour
     public GameObject savesuccess;
     public GameObject terror;
     public GameObject terror2;
+    public GameObject terror3;
     public InputField inputold;
     public InputField inputnew1;
     public InputField inputnew2;
+
+    private void OnEnable() {
+        inputnew1.text="";
+        inputnew2.text="";
+        inputold.text="";
+        terror.SetActive(false);
+        terror2.SetActive(false);
+        terror3.SetActive(false);
+    }
     public void changepass()
     {
-        string oldpass = AesEncryption.Encrypt(inputold.text);
-        string encrypted1 = AesEncryption.Encrypt(inputnew1.text);
-        string encrypted2 = AesEncryption.Encrypt(inputnew1.text);
-        if(encrypted1==encrypted2)
-        {
-            DataManager.Instance.setPass(oldpass,encrypted1,(msg) => {
-                JsonData d = JsonMapper.ToObject(msg);
-                if(d["data"]==null)
-                {
-                    terror.SetActive(true);
-                }
-                else
-                {
-                    terror2.SetActive(false);
-                    terror.SetActive(false);
-                    savesuccess.SetActive(true);
-                    Invoke("savecloes",2f);
-                    
-                }
+        terror.SetActive(false);
+        terror2.SetActive(false);
+        terror3.SetActive(false);
+     
+        int ct =0;
+        string msg = "密码格式缺少:";
+        var pwdRegex1 = "(?=.*[0-9])"; // 数字
+        Regex reg1 = new Regex(pwdRegex1);
+        bool isMatch1 = reg1.IsMatch(inputnew1.text);
+        if(!isMatch1)
+        {
+            msg += "数字 ";
+        }
+        else
+        {
+            ct++;
+        }
+        var pwdRegex2 = "(?=.*[a-z])"; // 小写字母
+        Regex reg2 = new Regex(pwdRegex2);
+        bool isMatch2 = reg2.IsMatch(inputnew1.text);
+        if(!isMatch2)
+        {
+
+            msg += "小写字母 ";
+        }
+        else
+        {
+            ct++;
+        }
+        var pwdRegex3 = "(?=.*[A-Z])"; // 大写字母
+        Regex reg3= new Regex(pwdRegex3);
+        bool isMatch3 = reg3.IsMatch(inputnew1.text);
+        if(!isMatch3)
+        {
+            msg += "大写字母 ";
+        }
+        else
+        {
+            ct++;
+        }
+        var pwdRegex4 = "[!@#$%^&*(),.?\\\":{}|<>]"; // 特殊字符
+        Regex reg4= new Regex(pwdRegex4);
+        bool isMatch4 = reg4.IsMatch(inputnew1.text);
+        if(!isMatch4)
+        {
+
+            msg += "特殊字符 ";
+        }
+        else
+        {
+            ct++;
+        }
+        msg+="中"+(3-ct)+"个";
+        if(inputnew1.text.Length<8)
+        {
+            msg = "密码必须大于8位";
+        }
+        if(ct>=3&&inputnew1.text.Length>=8)
+        {   
+            string oldpass = AesEncryption.Encrypt(inputold.text);
+            string encrypted1 = AesEncryption.Encrypt(inputnew1.text);
+            string encrypted2 = AesEncryption.Encrypt(inputnew2.text);
+            if(encrypted1==encrypted2)
+            {
+                DataManager.Instance.setPass(oldpass,encrypted1,(msg) => {
+                    JsonData d = JsonMapper.ToObject(msg);
+                    if(d["data"]==null)
+                    {
+                        terror.SetActive(true);
+                    }
+                    else
+                    {
+                        terror2.SetActive(false);
+                        terror.SetActive(false);
+                        savesuccess.SetActive(true);
+                        Invoke("savecloes",2f);
+                    }
 
-            });
+                });
+            }
+            else
+            {
+                terror2.SetActive(true);
+            }
         }
         else
         {
-            terror2.SetActive(true);
+            terror3.GetComponent<Text>().text = msg;
+            terror3.SetActive(true);
         }
+     
     
     }
     void savecloes()

File diff suppressed because it is too large
+ 3 - 3
Assets/DataManager.cs


+ 1 - 1
Assets/Manager.cs

@@ -37,7 +37,7 @@ public class Manager
 
     public class generaloption
     {
-        public bool update_time_display_switch;
+        public int update_time_display_switch;
     }
 
     public class AdminsystemInfo

File diff suppressed because it is too large
+ 44 - 2
Assets/Scenes/16-9.unity


File diff suppressed because it is too large
+ 43 - 1
Assets/Scenes/16-9green.unity


File diff suppressed because it is too large
+ 5 - 47
Assets/Scenes/32-9.unity


File diff suppressed because it is too large
+ 53 - 11
Assets/Scenes/32-9green.unity


File diff suppressed because it is too large
+ 42 - 0
Assets/Scenes/Main.unity


+ 9 - 3
Assets/ShuJuYuanGuanLi.cs

@@ -66,6 +66,7 @@ public class ShuJuYuanGuanLi : MonoBehaviour
     Toption nt;
     public void refinfo(Toption t)
     {
+        Debug.Log("refinfo===>"+t);
         nt=t;
         for (int i = 0; i < golist.Count; i++)
         {
@@ -105,9 +106,13 @@ public class ShuJuYuanGuanLi : MonoBehaviour
         {
 
             DataManager.Instance.getInfo((msg) => {
+                Debug.Log("ainfo===>"+msg.general_option.update_time_display_switch);
                 ainfo = msg;
-                xst.isOn = msg.general_option.update_time_display_switch;
-                yct.isOn = !msg.general_option.update_time_display_switch;
+                yct.isOn = msg.general_option.update_time_display_switch!=1;
+                Debug.Log(msg.general_option.update_time_display_switch==1);
+                xst.isOn = msg.general_option.update_time_display_switch==1;
+                Debug.Log("xst.isOn===>"+xst.isOn);
+                Debug.Log("ai yct.isOnnfo===>"+yct.isOn);
                 yt.isOn = true;
                 refinfo(msg.yunneng_option);
             });
@@ -116,7 +121,8 @@ public class ShuJuYuanGuanLi : MonoBehaviour
 
     public void setty(bool b)
     {
-        ainfo.general_option.update_time_display_switch= b;
+        Debug.Log("setty===>"+b);
+        ainfo.general_option.update_time_display_switch= b?1:0;
        StartCoroutine( DataManager.Instance.SetgeneralSetting(b,(msg)=>{}));
     }
 

+ 11 - 1
Assets/TimeManager.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
@@ -18,5 +18,15 @@ public class TimeManager : UpdateManager
         string dateTimeString = dateString + " " + timeString;
        // Debug.Log("dateTimeString==>" + dateTimeString);
         timetext.text = dateTimeString.ToString();
+
+    }
+    private void OnEnable() {
+        
+            if(gxlj=="HH:mm")
+            {
+                DataManager.Instance.getInfo((msg) => {
+                timetext.transform.parent.gameObject.SetActive( msg.general_option.update_time_display_switch==1?true:false);  
+                });
+            }
     }
 }

+ 3 - 3
Assets/UIScrollScript.cs

@@ -316,13 +316,13 @@ public class UIScrollScript : MonoBehaviour
     /// <param name="pos"></param>  
     void UpdateRectsize(Vector2 pos)
     {
-        if (arrangeType == ArrangeType.Horizontal)
+        if (arrangeType != ArrangeType.Horizontal)
         {
-            mRTrans.sizeDelta = new Vector2(pos.x + cell_x * 0.5f + rightOffset, ConstraintCount * cell_y + (ConstraintCount - 1) * YSpacing + topOffset + bottomOffset);
+            mRTrans.sizeDelta = new Vector2(pos.x + cell_x * 0.5f + rightOffset, maxCount * cell_y + (maxCount - 1) * YSpacing + topOffset + bottomOffset);
         }
         else
         {
-            mRTrans.sizeDelta = new Vector2(ConstraintCount * cell_x + (ConstraintCount - 1) * XSpacing + leftOffset + rightOffset
+            mRTrans.sizeDelta = new Vector2(maxCount * cell_x + (maxCount - 1) * XSpacing + leftOffset + rightOffset
                 , -pos.y + cell_y * 0.5f + bottomOffset);
         }
     }

+ 14 - 8
Assets/UserInfoCheck.cs

@@ -15,29 +15,35 @@ public class UserInfoCheck : MonoBehaviour
     public InputField ibumen;
     public InputField izhiwu;
     public InputField ibeizhu;
+    UserInfo uinfo ;
     private void OnEnable()
     {
         if (DataManager.Instance)
         {
 
             DataManager.Instance.getuserinfo((msg) => {
-
-                tacc.text = msg.count;
-                iname.text = msg.name;
-                ibumen.text = msg.dept;
-                izhiwu.text = msg.position;
-                ibeizhu.text = msg.notes;
+                uinfo =msg;
+                Invoke("updatedata",0.5f);
             });
         }
         
+    }
+    void updatedata()
+    {
+        tacc.text = uinfo.count;
+        iname.text = uinfo.name;
+        ibumen.text = uinfo.position;
+        izhiwu.text = uinfo.dept;
+        ibeizhu.text = uinfo.notes;
+
     }
     public void changeInfo()
     {
 
         UserInfo uinfo =new UserInfo();
         uinfo.name =  iname.text;
-        uinfo.dept =  ibumen.text;
-        uinfo.position =  izhiwu.text;
+        uinfo.dept =  izhiwu.text; 
+        uinfo.position = ibumen.text;
         uinfo.notes =  ibeizhu.text;
         DataManager.Instance.setuserinfo(uinfo,(msg) => {
             try{

+ 1 - 0
Assets/VideoLefttem.cs

@@ -19,6 +19,7 @@ public class VideoLefttem : MonoBehaviour
     {
         big.SetActive(true);
         big.GetComponentInChildren<seturl>().url(vurl);
+        big.GetComponentInChildren<Text>().text="监控-"+t.text;
 
     }
 }

+ 1 - 0
Assets/VideoRight.cs

@@ -24,5 +24,6 @@ public class VideoRight : MonoBehaviour
     {
         big.SetActive(true);
         big.GetComponentInChildren<seturl>().url(vurl);
+        big.GetComponentInChildren<Text>().text=t.text;
     }
 }

+ 8 - 8
Assets/checkSize.cs

@@ -14,6 +14,14 @@ public class checkSize : MonoBehaviour
         {
             this.GetComponent<RectTransform>().sizeDelta = new Vector2(this.GetComponentsInChildren<RawImage>().Length*w/ lg, 450);
 
+                if(w*6>(this.GetComponentsInChildren<RawImage>().Length*w/ lg))
+                {
+                    this.GetComponent<RectTransform>().sizeDelta = new Vector2(w*6, 450);
+
+                }
+                else
+                {
+                }
         }
         else
         {
@@ -29,13 +37,5 @@ public class checkSize : MonoBehaviour
                     this.GetComponent<RectTransform>().sizeDelta = new Vector2(this.GetComponentsInChildren<RawImage>().Length*w/ lg, 900);
                 }
         }
-        if(700*6>(this.GetComponentsInChildren<RawImage>().Length*w/ lg))
-        {
-            this.GetComponent<RectTransform>().sizeDelta = new Vector2(w*6, 900);
-
-        }
-        else
-        {
-        }
     }
 }

+ 1 - 1
Assets/zhanghaomanager.cs

@@ -164,7 +164,7 @@ public class zhanghaomanager : MonoBehaviour
                 if(datamsg.Count!=0)
                 {
                     Debug.Log("datamsg===>"+datamsg.Count);
-                uiScroll.InitList(0, datamsg.Count);
+                    uiScroll.InitList(0, datamsg.Count);
 
                 }
                 else

BIN
test2/test/Build/test.data.unityweb


BIN
test2/test/Build/test.framework.js.unityweb


BIN
test2/test/Build/test.symbols.json.unityweb


BIN
test2/test/Build/test.wasm.unityweb


BIN
test2/test/临港大屏20241030-1.zip


Some files were not shown because too many files changed in this diff