{
  "code": "import ShareCanvas from \"./ShareCanva\";\r\nimport { Main } from \"../Main\";\r\nexport default class JionTool {\r\n    constructor() {\r\n    }\r\n    static Init() {\r\n        if (!Main.OnWx)\r\n            return;\r\n        this._wx = Laya.Browser.window.wx;\r\n        this.setWH();\r\n        this.shareCanvas = new ShareCanvas();\r\n        this.shareCanvas.InitData();\r\n    }\r\n    static showFriendRank(keyName = \"score\") {\r\n        if (Main.OnWx)\r\n            this.postMessage(keyName, \"show_friend_rank\");\r\n    }\r\n    static showWorldRank(keyName, data) {\r\n        if (Main.OnWx)\r\n            this.postMessage(keyName, \"show_world_rank\", data);\r\n    }\r\n    static upPage() {\r\n        if (Main.OnWx)\r\n            this.postMessage(\"\", \"show_up_page\");\r\n    }\r\n    static nextPage() {\r\n        if (Main.OnWx)\r\n            this.postMessage(\"\", \"show_next_page\");\r\n    }\r\n    static settlement(value, callBack = null, keyName = \"score\") {\r\n        if (Main.OnWx)\r\n            this.setUserCloudStorage(keyName, value.toString(), callBack);\r\n    }\r\n    static showShareCanvas() {\r\n        if (Main.OnWx)\r\n            this.shareCanvas.show();\r\n    }\r\n    static hideShareCanvas() {\r\n        if (Main.OnWx)\r\n            this.shareCanvas.hide();\r\n    }\r\n    static sendMoveDelta(delta) {\r\n        if (Main.OnWx)\r\n            this.postMessage(\"\", \"move_rank\", delta);\r\n    }\r\n    static updateCtx() {\r\n        if (Main.OnWx)\r\n            this.postMessage(\"\", \"update_ctx\");\r\n    }\r\n    static setWH() {\r\n        if (!Main.OnWx)\r\n            return;\r\n        let width = Laya.stage.width;\r\n        let height = Laya.stage.height;\r\n        let data = { width: width, height: height };\r\n        console.error(width, height);\r\n        this.postMessage(\"\", \"canvase_width_height\", data);\r\n    }\r\n    static postMessage(keyName, action, data) {\r\n        this._wx.postMessage({\r\n            keyName: keyName,\r\n            action: action,\r\n            data: data\r\n        });\r\n    }\r\n    static setUserCloudStorage(keyName, value, callBack = null) {\r\n        let obj = [{\r\n                key: keyName,\r\n                value: value\r\n            }];\r\n        this._wx.setUserCloudStorage({\r\n            KVDataList: obj,\r\n            success: function (res) {\r\n                console.log(\"数据上传成功\" + res);\r\n                if (callBack) {\r\n                    callBack();\r\n                }\r\n            },\r\n            fail: function (res) {\r\n                console.log(\"数据上传失败\" + res);\r\n                if (callBack) {\r\n                    callBack();\r\n                }\r\n            }\r\n        });\r\n    }\r\n}\r\n//# sourceMappingURL=JionTool.js.map",
  "references": [
    "C:/Users/admin/Desktop/runner/src/W_Rank/ShareCanva.ts",
    "C:/Users/admin/Desktop/runner/src/Main.ts"
  ],
  "map": "{\"version\":3,\"file\":\"JionTool.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/W_Rank/JionTool.ts\"],\"names\":[],\"mappings\":\"AAEA,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,MAAM,CAAC,OAAO,OAAO,QAAQ;IAEzB;IACA,CAAC;IAIM,MAAM,CAAC,IAAI;QACd,IAAG,CAAC,IAAI,CAAC,IAAI;YAAC,OAAO;QACrB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QACrC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAChC,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,UAAgB,OAAO;QAChD,IAAI,IAAI,CAAC,IAAI;YACT,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;IACtD,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,OAAe,EAAE,IAAS;QAClD,IAAI,IAAI,CAAC,IAAI;YACT,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IAEM,MAAM,CAAC,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