{
  "code": "import { SettingController } from \"../Game/SettingController\";\r\nimport { ViewManager } from \"./ViewManager\";\r\nexport class ShareModule {\r\n    static GoShare(callBack) {\r\n        ShareModule.ShareTime = new Date().getTime();\r\n        console.log(\"分享点击时间=\" + ShareModule.ShareTime);\r\n        ShareModule.IsSharing = true;\r\n        ShareModule.callback = callBack;\r\n    }\r\n    static OnShowHandle() {\r\n        if (Laya.Browser.window.wx) {\r\n            Laya.Browser.window.wx.onShow(function (option) {\r\n                SettingController.Instance.SetSoundV(1);\r\n                console.log(\"onshow share start\");\r\n                console.log(\"进入微信\");\r\n                if (ShareModule.IsSharing) {\r\n                    ShareModule.IsSharing = false;\r\n                    let time = new Date().getTime();\r\n                    console.log(\"分享回到游戏时间\" + time);\r\n                    let wait = (time - ShareModule.ShareTime) / 1000;\r\n                    console.log(\"分享停留时间为：\" + wait);\r\n                    let shareSuccess = false;\r\n                    let realSuccess = false;\r\n                    if (wait >= 2) {\r\n                        if (Math.random() <= 1) {\r\n                            shareSuccess = true;\r\n                            if (!ShareModule.callback)\r\n                                return;\r\n                            ShareModule.callback(true, 1);\r\n                        }\r\n                        else {\r\n                            if (!ShareModule.callback)\r\n                                return;\r\n                            if (Math.random() <= 0.5) {\r\n                                ViewManager.Instance.ShowTips(\"分享失败!\");\r\n                            }\r\n                            else {\r\n                                ViewManager.Instance.ShowTips(\"请分享到不同的群!\");\r\n                            }\r\n                            ShareModule.callback(false, 1);\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (!ShareModule.callback)\r\n                            return;\r\n                        if (Math.random() <= 0.5) {\r\n                            ViewManager.Instance.ShowTips(\"分享失败!\");\r\n                        }\r\n                        else {\r\n                            ViewManager.Instance.ShowTips(\"请分享到不同的群!\");\r\n                        }\r\n                        ShareModule.callback(false, 1);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n    }\r\n}\r\nShareModule.IsSharing = false;\r\nexport class OnHideHandler {\r\n    static Reg() {\r\n    }\r\n}\r\n//# sourceMappingURL=ShareModule.js.map",
  "references": [
    "C:/Users/admin/Desktop/？？/gungang/src/Net/WXSdk.ts",
    "C:/Users/admin/Desktop/？？/gungang/src/Game/SettingController.ts",
    "C:/Users/admin/Desktop/？？/gungang/src/Net/NetManager.ts",
    "C:/Users/admin/Desktop/？？/gungang/src/Net/ViewManager.ts"
  ],
  "map": "{\"version\":3,\"file\":\"ShareModule.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Net/ShareModule.ts\"],\"names\":[],\"mappings\":\"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,MAAM,OAAO,WAAW;IAIb,MAAM,CAAC,OAAO,CAAC,QAAQ;QAC1B,WAAW,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;QAC/C,WAAW,CAAC,SAAS,GAAG,IAAI,CAAC;QAC7B,WAAW,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACpC,CAAC;IAEM,MAAM,CAAC,YAAY;QACtB,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE;YAExB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,MAAM;gBAE1C,iBAAiB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBAExC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;gBAClC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBAEpB,IAAI,WAAW,CAAC,SAAS,EAAE;oBACvB,WAAW,CAAC,SAAS,GAAG,KAAK,CAAC;oBAC9B,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,UAA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