可以可以花见花开
This commit is contained in:
parent
a44b8750e0
commit
e47c35dfcc
|
@ -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
|
|||
/// </summary>
|
||||
[HideInInspector]
|
||||
public string serverIP;
|
||||
|
||||
/// <summary>
|
||||
/// 福清办事处配置
|
||||
/// </summary>
|
||||
public string fuqingWorkPlaceJson;
|
||||
/// <summary>
|
||||
/// 当前选中的海关
|
||||
/// </summary>
|
||||
|
@ -67,6 +75,14 @@ public class FirstPanel : MonoBehaviour
|
|||
{
|
||||
a.gameObject.SetActive(false);
|
||||
});
|
||||
//重置办事处item
|
||||
FirstPanel.instance.workPlace.transform.GetComponentsInChildren<WorkPlacePanel>().ToList().ForEach(a =>
|
||||
{
|
||||
a.gameObject.SetActive(false);
|
||||
});
|
||||
//关闭所有办事处
|
||||
FirstPanel.instance.workPlace.SetActive(false);
|
||||
|
||||
//取消所有标签选中
|
||||
FirstPanel.instance.tab.GetComponentsInChildren<TabItem>().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);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 前端调用初始化传IP
|
||||
|
|
|
@ -54,8 +54,7 @@ public class WorkPlacePanel : MonoBehaviour
|
|||
else if (workPlaceItem.workPlaceName == "驻福清办事处")
|
||||
{
|
||||
//读取福清配置文件
|
||||
string json = File.ReadAllText(Application.streamingAssetsPath + "/壘르헌곗慤뇹.txt");
|
||||
List<erprise_model_version> tmpComps = JsonMapper.ToObject<List<erprise_model_version>>(json);
|
||||
List<erprise_model_version> tmpComps = JsonMapper.ToObject<List<erprise_model_version>>(FirstPanel.instance.fuqingWorkPlaceJson);
|
||||
showAll.AddRange(tmpComps);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue