diff --git a/FuZhou_FirstPage/Assets/Scripts/FirstPanel.cs b/FuZhou_FirstPage/Assets/Scripts/FirstPanel.cs
index 5b56934b..39f131ee 100644
--- a/FuZhou_FirstPage/Assets/Scripts/FirstPanel.cs
+++ b/FuZhou_FirstPage/Assets/Scripts/FirstPanel.cs
@@ -1,6 +1,9 @@
-using System;
+using Competition.Mysql.Other;
+using LitJson;
+using System;
using System.Collections;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using UnityEngine;
using UnityEngine.Networking;
@@ -46,6 +49,11 @@ public class FirstPanel : MonoBehaviour
///
[HideInInspector]
public string serverIP;
+
+ ///
+ /// 福清办事处配置
+ ///
+ public string fuqingWorkPlaceJson;
///
/// 当前选中的海关
///
@@ -67,6 +75,14 @@ public class FirstPanel : MonoBehaviour
{
a.gameObject.SetActive(false);
});
+ //重置办事处item
+ FirstPanel.instance.workPlace.transform.GetComponentsInChildren().ToList().ForEach(a =>
+ {
+ a.gameObject.SetActive(false);
+ });
+ //关闭所有办事处
+ FirstPanel.instance.workPlace.SetActive(false);
+
//取消所有标签选中
FirstPanel.instance.tab.GetComponentsInChildren().ToList().ForEach(a =>
{
@@ -76,13 +92,21 @@ public class FirstPanel : MonoBehaviour
Debug.Log("调前端回到首页");
});
- //初始化
- Application.ExternalCall("OnWake");
-
#if UNITY_EDITOR
serverIP = "111.229.30.246";
#endif
+
+ string path =Application.streamingAssetsPath + "/驻福清办事处.txt";
+ StartCoroutine(FirstPanel.instance.CallGet(path, (isok, result) =>
+ {
+ if (isok)
+ {
+ fuqingWorkPlaceJson = result;
+ Debug.Log("福清配置读取成功:"+ fuqingWorkPlaceJson);
+ }
+ }));
}
+
///
/// 前端调用初始化传IP
diff --git a/FuZhou_FirstPage/Assets/Scripts/WorkPlacePanel.cs b/FuZhou_FirstPage/Assets/Scripts/WorkPlacePanel.cs
index f068fc75..4abea6ce 100644
--- a/FuZhou_FirstPage/Assets/Scripts/WorkPlacePanel.cs
+++ b/FuZhou_FirstPage/Assets/Scripts/WorkPlacePanel.cs
@@ -54,8 +54,7 @@ public class WorkPlacePanel : MonoBehaviour
else if (workPlaceItem.workPlaceName == "פ´")
{
//ȡļ
- string json = File.ReadAllText(Application.streamingAssetsPath + "/פ´.txt");
- List tmpComps = JsonMapper.ToObject>(json);
+ List tmpComps = JsonMapper.ToObject>(FirstPanel.instance.fuqingWorkPlaceJson);
showAll.AddRange(tmpComps);
}