static void TestChatRoomRunWay()
        {
            JSONObject param = new JSONObject()
            {
                ["url"] = "ChatRoomRunWay",
            };

            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
        }
        private static void TestRoomChange()
        {
            JSONObject param = new JSONObject
            {
                ["url"] = "RoomChange",
            };

            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
        }
        private static void FollowLobby()
        {
            JSONObject param = new JSONObject()
            {
                ["url"]        = "FollowLobby",
                ["account_id"] = "100007908",
            };

            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
        }
        static void Styling()
        {
            JSONObject param = new JSONObject()
            {
                ["url"]     = "Styling",
                ["partId"]  = 2000003,
                ["isEquip"] = false,
            };

            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
        }
        private static void Ranking()
        {
            JSONObject param = new JSONObject()
            {
                ["url"]        = "RankingInfo",
                ["type"]       = 1,
                ["account_id"] = "100000002",
            };

            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
        }
        static void TestParts()
        {
            JSONObject param = new JSONObject()
            {
                ["url"]     = "Styling",
                ["partId"]  = 100074,
                ["isEquip"] = true,
            };

            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
        }
        static void TestActivityStylingChallenge()
        {
            JSONObject param = new JSONObject()
            {
                ["url"]         = "ActivityLookRoom",
                ["challengeId"] = 109999,
                ["viewPage"]    = "Look",
            };

            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
        }
        private static void TestGotoCapture()
        {
            JSONArray account_id_list = new JSONArray();

            account_id_list.Add(-1);

            JSONObject param = new JSONObject
            {
                ["url"] = "Stylebook", ["account_id_list"] = account_id_list, ["stylebook_id"] = 111
            };

            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
        }
        private static void TestStylebookMission()
        {
            JSONArray stampList = new JSONArray();

            stampList.Add(1);
            stampList.Add(2);
            JSONObject param = new JSONObject
            {
                ["stylebookId"] = "1", ["customBg"] = true, ["stampList"] = stampList
            };

            ThirdPartyH5Dispatch.Handle("missionCheck", param, null, string.Empty);
        }
        private static void TestMailReciveAll()
        {
            string jsonFilePath = Path.Combine(Application.dataPath,
                                               "Main/Script/ThirdPartyAPI/TestData/testReciveAll.json");

            Log.Info(jsonFilePath, ColorName.Red);
            string json = File.ReadAllText(jsonFilePath);

            JSONObject param = JSONNode.Parse(json).AsObject;

            Log.Info(param.Value, ColorName.Red);
            ThirdPartyH5Dispatch.Handle("mialReceiveAll", param, null, string.Empty);
        }
        static void TestMission()
        {
            JSONArray tagArr = new JSONArray();

            tagArr.Add("PEOPLE_2");
            JSONObject param = new JSONObject()
            {
                ["play_type"]     = "SHOOTING",
                ["category_type"] = "STYLEBOOK",
                ["mission_tag"]   = tagArr,
            };

            ThirdPartyH5Dispatch.Handle("mission", param, null, string.Empty);
        }
        private static void TestChallenge()
        {
            string jsonFilePath =
                Path.Combine(Application.dataPath, "Main/Script/ThirdPartyAPI/TestData/ChalllengeData.json");
            string     json  = File.ReadAllText(jsonFilePath);
            JSONObject param = new JSONObject()
            {
                ["url"]           = "ChallengeRoom",
                ["challengeData"] = json,
            };

            Log.Info(param.Value, ColorName.Red);
            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
            UIPageInterface.OnStudioShot(100001, 3);
        }
        private static void TestActivityLook()
        {
            string jsonFilePath =
                Path.Combine(Application.dataPath, "Main/Script/ThirdPartyAPI/TestData/ChalllengeData.json");
            string     json  = File.ReadAllText(jsonFilePath);
            JSONObject param = new JSONObject()
            {
                ["url"]           = "ActivityLookRoom",
                ["challengeData"] = json,
                ["viewPage"]      = "Look",
                ["webUrl"]        = "http://www.baidu.com",
                ["webType"]       = 1,
            };

            Log.Info(param.Value, ColorName.Red);
            ThirdPartyH5Dispatch.Handle("gotoUnityPage", param, null, string.Empty);
        }
 static void TestChallengeResult()
 {
     ThirdPartyH5Dispatch.Handle("ChallengeResult", null, null, string.Empty);
 }
        public static void Handle(CommandType InCommandType, JSONNode InJsonNode, string InExtra)
        {
            switch (InCommandType)
            {
            case CommandType.Logout:
                AccountManager.Instance.ClearPlayerPrefs();
                GameStarter.Instance.GameLogout();
                break;

            case CommandType.Mission:
                if (null != InJsonNode)
                {
                    string        playType     = InJsonNode["play_type"].Value;
                    string        categoryType = InJsonNode["category_type"].Value;
                    JSONArray     missionTag   = InJsonNode["mission_tag"].AsArray;
                    List <string> list         = new List <string>();
                    for (int i = 0; i < missionTag.Count; i++)
                    {
                        list.Add(missionTag[i]);
                    }
                    MissionProcess.NativeSendMission(playType, categoryType, list.ToArray());
                }

                break;

            case CommandType.H5AndUnity:
                if (null != InJsonNode)
                {
                    JSONNode param = InJsonNode["requestParam"];
                    ThirdPartyH5Dispatch.Handle(param["type"].Value, param["data"], InJsonNode["passThroughParam"],
                                                InExtra);
                }

                break;

            case CommandType.NavbarEvent:
                if (null != InJsonNode)
                {
                    int type = InJsonNode["type"].AsInt;
                    if (type != nativeBarState)
                    {
                        nativeBarState = type;

                        //SetUnityActivity(type == 1);
                        AudioManager.Instance.FadeTurnSound(type != 1);
                        EventManager.Instance.Trigger(EventKey.OnTabBarClicked, type);
                    }
                }
                break;

            case CommandType.NativeWebviewHandle:
            {
                if (null != InJsonNode)
                {
                    if (InJsonNode["type"].Value == "close")
                    {
                        if (PageManager.Instance.CurrOpenPageInfo() is MainPage)
                        {
                            ThirdPartyBridge.SetNativeTabBarActivity(true);
                        }
                        else
                        {
                            ThirdPartyBridge.SetNativeTabBarActivity(false);
                        }

                        WebViewController.Instance.ActiveGameSceneCam(true);
                    }
                }
            }
            break;

            case CommandType.ProfileImg:
            {
                AccountManager.Instance.SetUserThumbnailURL(InJsonNode["ProfileImage"].Value);
            }
            break;

            case CommandType.Username:
            {
                AccountManager.Instance.SetUserName(InJsonNode["Username"].Value);
            }
            break;

            case CommandType.PlayEffect:
                AudioManager.Instance.PlayEffect((AudioKey)InJsonNode["index"].AsInt);
                break;

            case CommandType.PlayMusic:
                AudioManager.Instance.PlayMusic((AudioKey)InJsonNode["index"].AsInt);
                break;

            case CommandType.EffectSwitch:
                AudioManager.Instance.EffectSwitch = InJsonNode["Switch"].Value == "On";
                break;

            case CommandType.MusicSwitch:
                AudioManager.Instance.MusicSwitch = InJsonNode["Switch"].Value == "On";
                break;

            case CommandType.GoToUnity:
                ThirdPartyGotoUnity.GotoUnity(InJsonNode);
                break;

            default:
                Log.Error($"Not found third party dispatch handle named {InCommandType}.");
                break;
            }

            Log.Info($"[ThirdPartyH5Dispatch] -- Type = {InCommandType}\nParam = {InJsonNode}");
        }