{
  "code": "import { ui } from \"../ui/layaMaxUI\";\r\nimport { Main } from \"../Main\";\r\nimport { WindowManager, WindowType } from \"./WindowManager\";\r\nimport { RecommendWindow } from \"./RecommendWindow\";\r\nimport { PlayerAccount } from \"../Scripts/Network/PlayerAccount\";\r\nimport { GameUtils } from \"../GameUtils/GameUtils\";\r\nimport WxApi from \"../WXSDK/wxsdk\";\r\nexport class FriendPlyaingWindow extends ui.Window.FriendPlayingWindowUI {\r\n    constructor() {\r\n        super();\r\n        this.return = 0;\r\n        FriendPlyaingWindow.instance = this;\r\n    }\r\n    OnOpen() {\r\n        this.CloseBtn.clickHandler = Laya.Handler.create(this, this.OnClickClose);\r\n        this.GameList.vScrollBarSkin = \"\";\r\n        this.GameList.array = PlayerAccount.CurrentAccount.CurAccountData.redata;\r\n        this.GameList.renderHandler = Laya.Handler.create(this, this.RenderList, null, false);\r\n        this.height = Laya.stage.height;\r\n    }\r\n    ;\r\n    RenderList(_box, index) {\r\n        if (index > 5) {\r\n            var ne = _box.getChildAt(0).getChildByName(\"new\");\r\n            ne.visible = false;\r\n        }\r\n        var data = _box.dataSource;\r\n        var icon = _box.getChildAt(0).getChildByName(\"icon\");\r\n        icon.skin = data.icon;\r\n        var name = _box.getChildAt(0).getChildByName(\"name\");\r\n        name.text = data.title;\r\n        var btn = _box.getChildAt(0).getChildByName(\"btn\");\r\n        var num = _box.getChildAt(0).getChildByName(\"num\");\r\n        if (num)\r\n            num.text = GameUtils.getRandomInt(24841, 654878).toString() + \"人玩\";\r\n        btn.clickHandler = Laya.Handler.create(this, this.ClickBNavigate, [data], false);\r\n    }\r\n    ClickBNavigate(data) {\r\n        var appid = data.appid;\r\n        var path = data.path;\r\n        let param = { \"appId\": appid.toString(), \"path\": path.toString() };\r\n        if (Main.OnWx) {\r\n            WxApi.Instance.recordAldEvent(\"导出-总点击数\", \"1\");\r\n            if (data.jump) {\r\n                Laya.Browser.window.wx.navigateToMiniProgram({\r\n                    appId: appid.toString(),\r\n                    path: path.toString(),\r\n                    extraData: {\r\n                        next_appid: data.next_appid,\r\n                        next_path: data.next_path\r\n                    },\r\n                    envVersion: 'develop',\r\n                    success: res => {\r\n                        WxApi.Instance.recordAldEvent(\"导出成功-总用户数\", \"1\");\r\n                        WxApi.Instance.recordAldEvent(\"导出成功-\" + data.title, \"1\");\r\n                        console.log(\"跳转成功...\");\r\n                    },\r\n                    fail: res => {\r\n                        WindowManager.Instance.OpenPopView(WindowType.RecommendWindow);\r\n                        RecommendWindow.Instance.OpenChouTiView(true);\r\n                        RecommendWindow.Instance.closeCt.clickHandler = Laya.Handler.create(this, () => {\r\n                            WindowManager.Instance.ShowWindow(WindowType.HomeWindow);\r\n                        });\r\n                        console.log(\"跳转失败...\");\r\n                    }\r\n                });\r\n            }\r\n            else {\r\n                var marray = [data.image];\r\n                Laya.Browser.window.wx.previewImage({\r\n                    current: data.image,\r\n                    urls: marray,\r\n                    success: res => {\r\n                        WxApi.Instance.recordAldEvent(\"显示游戏二维码成功\", \"1\");\r\n                    },\r\n                    fail: res => {\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    }\r\n    OnClickClose() {\r\n        WindowManager.Instance.ShowWindow(WindowType.HomeWindow);\r\n    }\r\n    OnHide() {\r\n    }\r\n    ;\r\n}\r\n",
  "references": [
    "C:/Users/admin/Desktop/runner/src/ui/layaMaxUI.ts",
    "C:/Users/admin/Desktop/runner/src/Window/Component/IWindow.ts",
    "C:/Users/admin/Desktop/runner/src/Main.ts",
    "C:/Users/admin/Desktop/runner/src/Window/WindowManager.ts",
    "C:/Users/admin/Desktop/runner/src/Window/RecommendWindow.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Network/PlayerAccount.ts",
    "C:/Users/admin/Desktop/runner/src/GameUtils/GameUtils.ts",
    "C:/Users/admin/Desktop/runner/src/Scripts/Game/GameManager.ts",
    "C:/Users/admin/Desktop/runner/src/WXSDK/wxsdk.ts"
  ]
}
