gamelet-pixui-frame
Version:
pixui开发者框架
99 lines • 4.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PresetDataMgr = void 0;
var utilities_1 = require("../../../utilities/utilities");
var PresetDataMgrImpl = /** @class */ (function () {
function PresetDataMgrImpl() {
this.userdata = undefined;
this.gamelet = undefined;
this.env = undefined;
this.initUserdata();
this.initGamelet();
this.initEnv();
}
PresetDataMgrImpl.prototype.init = function () {
};
PresetDataMgrImpl.prototype.getUserdata = function () {
return this.userdata;
};
PresetDataMgrImpl.prototype.getGamelet = function () {
return this.gamelet;
};
PresetDataMgrImpl.prototype.getEnv = function () {
return this.env;
};
PresetDataMgrImpl.prototype.initUserdata = function () {
// let udMgrInst = window["___ns_openplatform"]["UserdataMgr"].getInstance();
// this.userdata = {
// openID: udMgrInst.openID,
// serviceType: udMgrInst.serviceType,
// appID: udMgrInst.appID,
// roleID: udMgrInst.roleID,
// platID: udMgrInst.platID,
// accountType: udMgrInst.accountType,
// area: udMgrInst.area,
// partition: udMgrInst.partition,
// accessToken: udMgrInst.accessToken,
// gameVer: udMgrInst.gameVer,
// payToken: udMgrInst.payToken,
// channelID: udMgrInst.channelID,
// sdkVersion: udMgrInst.sdkVersion,
// sign: udMgrInst.sign,
// country: udMgrInst.country,
// loginChannel: udMgrInst.loginChannel,
// intlSdkParam: udMgrInst.intlSdkParam,
// language: udMgrInst.language,
// sOpenId: udMgrInst.openID,
// sServiceType: udMgrInst.serviceType,
// sAppId: udMgrInst.appID,
// sRoleId: udMgrInst.roleID,
// sPlatID: udMgrInst.platID,
// sAcountType: udMgrInst.accountType,
// sArea: udMgrInst.area,
// sPartition: udMgrInst.partition,
// sAccessToken: udMgrInst.accessToken,
// sGameVer: udMgrInst.gameVer,
// sPayToken: udMgrInst.payToken,
// sChannelID: udMgrInst.channelID,
// sSdkVersion: udMgrInst.sdkVersion,
// sSign: udMgrInst.sign,
// sCountry: udMgrInst.country,
// sLoginChannel: udMgrInst.loginChannel,
// sIntlSdkParam: udMgrInst.intlSdkParam,
// sLanguage: udMgrInst.language,
// };
};
PresetDataMgrImpl.prototype.initGamelet = function () {
console.log("preprocessor initializing gamelet");
var dataObj = window["___ns_openplatform"]["PreprocessorPresetDataMgr"].getInstance().getCachedGameletData();
console.log("preprocessor dataobj: ".concat(JSON.stringify(dataObj)));
this.gamelet = {
openMessage: dataObj["openMessage"],
entranceConfig: dataObj["entranceConfig"],
appId: dataObj["appId"],
appKey: dataObj["appKey"],
appName: dataObj["appName"],
appVersion: dataObj["appVersion"],
env: dataObj["env"],
mainpage: dataObj["mainpage"],
parentPath: dataObj["parentPath"],
windowStartTimestamp: dataObj["windowStartTimestamp"],
totalLogSwitch: dataObj["totalLogSwitch"],
appLogSwitch: dataObj["appLogSwitch"],
isHitBackendWhitelist: dataObj["isHitBackendWhitelist"],
faasAddr: dataObj["faasAddr"] ? dataObj["faasAddr"] : ""
};
};
PresetDataMgrImpl.prototype.initEnv = function () {
var dataObj = window["___ns_openplatform"]["PreprocessorPresetDataMgr"].getInstance().getCachedGameletData();
this.env = {
isNano: dataObj["isNano"],
platform: dataObj["platform"],
isProduct: dataObj["isProduct"],
entryInfo: dataObj["entryInfo"] ? dataObj["entryInfo"] : "",
};
};
return PresetDataMgrImpl;
}());
exports.PresetDataMgr = (0, utilities_1.singleton)(PresetDataMgrImpl);
//# sourceMappingURL=presetdata_mgr.js.map