UNPKG

t-comm

Version:

专业、稳定、纯粹的工具库

76 lines (71 loc) 2.77 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var tslib_es6 = require('../../tslib.es6-01322ba9.js'); var pixui_env = require('../env.js'); var pixui_gamelet = require('../gamelet.js'); var pixui_aegis_init = require('./init.js'); require('./core.js'); function reportCoreInfoInPixUI() { var _a, _b; return tslib_es6.__awaiter(this, void 0, void 0, function () { var GameletAPI, err_1, GameletAPI, _c, _d, _e, _f, _g, _h, err_2; var _j; return tslib_es6.__generator(this, function (_k) { switch (_k.label) { case 0: _k.trys.push([0, 2,, 3]); GameletAPI = pixui_gamelet.getGameletPixuiFrame().GameletAPI; return [4 /*yield*/, (_a = pixui_aegis_init.AegisReportInPixui.report) === null || _a === void 0 ? void 0 : _a.call(pixui_aegis_init.AegisReportInPixui, { msg: 'appEnv', appId: GameletAPI.getAppID(), appKey: GameletAPI.getAppKey(), appName: GameletAPI.getAppName() })]; case 1: _k.sent(); return [3 /*break*/, 3]; case 2: err_1 = _k.sent(); console.log('[reportCorePixUI] err', err_1); return [3 /*break*/, 3]; case 3: _k.trys.push([3, 8,, 9]); GameletAPI = pixui_gamelet.getGameletPixuiFrame().GameletAPI; if (!((_b = pixui_aegis_init.AegisReportInPixui.report) === null || _b === void 0)) return [3 /*break*/, 4]; _c = void 0; return [3 /*break*/, 6]; case 4: _e = (_d = _b).call; _f = [pixui_aegis_init.AegisReportInPixui]; _j = { msg: 'GameletAPI', appId: GameletAPI.getAppID(), appKey: GameletAPI.getAppKey(), appName: GameletAPI.getAppName(), appVersion: GameletAPI.getAppVersion(), runtimeEnv: GameletAPI.getRuntimeEnv(), canUsePlatformAPI: GameletAPI.canUsePlatformAPI(), getIsProductEnvironment: !pixui_env.isTestEnvInPixui(), getPlatformDesc: GameletAPI.getPlatformDesc() }; _h = (_g = JSON).stringify; return [4 /*yield*/, GameletAPI.getUserData()]; case 5: _c = _e.apply(_d, _f.concat([(_j.userdata = _h.apply(_g, [_k.sent()]), _j.openArgs = GameletAPI.getOpenArgs(), _j)])); _k.label = 6; case 6: return [4 /*yield*/, _c]; case 7: _k.sent(); return [3 /*break*/, 9]; case 8: err_2 = _k.sent(); console.log('[reportCorePixUI] err', err_2); return [3 /*break*/, 9]; case 9: return [2 /*return*/]; } }); }); } exports.reportCoreInfoInPixUI = reportCoreInfoInPixUI;