{
  "code": "import { WXSDK } from \"../Net/WXSDK\";\r\nimport { ServerManager } from \"../Net/ServerManager\";\r\nimport { ViewManager, ViewType } from \"./ViewManager\";\r\nexport class LoadView {\r\n    constructor() {\r\n        this.Login();\r\n    }\r\n    static get Instance() {\r\n        if (LoadView.ins) {\r\n            return LoadView.ins;\r\n        }\r\n        else {\r\n            return new LoadView();\r\n        }\r\n    }\r\n    Login() {\r\n        if (Laya.Browser.onWeiXin) {\r\n            this.WXLogin();\r\n        }\r\n        else {\r\n            this.LocalLogin();\r\n        }\r\n    }\r\n    WXLogin() {\r\n        if (Laya.Browser.onWeiXin) {\r\n            WXSDK.DengLu((res) => {\r\n                if (res != \"error\") {\r\n                    console.log(\"1微信登录成功:\" + res);\r\n                    this.LocalLogin();\r\n                }\r\n                else {\r\n                    this.WXLogin();\r\n                }\r\n            });\r\n        }\r\n        else {\r\n            this.LocalLogin();\r\n            ServerManager.Instance.Login(null, Laya.Handler.create(this, this.LoginComplete), Laya.Handler.create(this, this.LoginFail));\r\n        }\r\n    }\r\n    LocalLogin() {\r\n        ServerManager.Instance.Login(null, Laya.Handler.create(this, this.LoginComplete), Laya.Handler.create(this, this.LoginFail));\r\n    }\r\n    LoginComplete() {\r\n        ViewManager.Instance.ShowView(ViewType.MainView);\r\n        console.log(\"本地服务器登陆成功\");\r\n    }\r\n    LoginFail(e) {\r\n        console.log(\"本地服务器登陆失败\");\r\n        console.log(e);\r\n    }\r\n}\r\n//# sourceMappingURL=LoadView.js.map",
  "references": [
    "E:/LayaProject/BlastToMerge/src/Net/WXSDK.ts",
    "E:/LayaProject/BlastToMerge/src/Net/ServerManager.ts",
    "E:/LayaProject/BlastToMerge/src/View/ViewManager.ts"
  ],
  "map": "{\"version\":3,\"file\":\"LoadView.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/View/LoadView.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,aAAa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