Commit 784c4fa2 authored by wildfirecode13's avatar wildfirecode13

1

parent dd4dac20
...@@ -2154,6 +2154,12 @@ var Main = (function () { ...@@ -2154,6 +2154,12 @@ var Main = (function () {
_a.sent(); _a.sent();
console.log("initLottieList完成"); console.log("initLottieList完成");
FYGE.GDispatcher.dispatchEvent("loadEnd"); FYGE.GDispatcher.dispatchEvent("loadEnd");
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getAppData, {}, function (s, res) {
console.log('getAppData success,res', s, res);
});
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getActivityBaseInfoById, {}, function (s, res) {
console.log('getActivityBaseInfoById success,res', s, res);
});
return [2]; return [2];
} }
}); });
...@@ -2249,8 +2255,7 @@ var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts"); ...@@ -2249,8 +2255,7 @@ var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName; var TbNetName;
(function (TbNetName) { (function (TbNetName) {
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport"; TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["getIndex"] = "babycare.getIndex"; TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["getActivityBaseInfoById"] = "babycare.getActivityBaseInfoById";
TbNetName["getGameInfo"] = "babycare.getGameInfo"; TbNetName["getGameInfo"] = "babycare.getGameInfo";
TbNetName["consumerTools"] = "babycare.consumerTools"; TbNetName["consumerTools"] = "babycare.consumerTools";
TbNetName["gameOver"] = "babycare.gameOver"; TbNetName["gameOver"] = "babycare.gameOver";
...@@ -44465,12 +44470,37 @@ var MainScene = (function (_super) { ...@@ -44465,12 +44470,37 @@ var MainScene = (function (_super) {
that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Enum_1.SCENETYPE.BEADROOM }); that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Enum_1.SCENETYPE.BEADROOM });
that.addChild(that.mainUi); that.addChild(that.mainUi);
that.initCat(); that.initCat();
that.initEnergy();
}; };
MainScene.prototype.initCat = function () { MainScene.prototype.initCat = function () {
var that = this; var that = this;
that.cat = new Cat_1.Cat({ type: "xianluo" }); that.cat = new Cat_1.Cat({ type: "xianluo" });
that.addChild(that.cat); that.addChild(that.cat);
}; };
MainScene.prototype.initEnergy = function () {
var that = this;
that.energyGroup = Ins_1.Ins.initSprite("fa59e617-f1d9-4065-85e1-6f6ebefb230f", 60, 1119);
that.addChild(that.energyGroup);
that.energyImg = Ins_1.Ins.initSprite("e00aee6d-2a90-4e92-b365-f031320d582c", 9, 9);
that.energyImgW = that.energyImg.width;
that.energyGroup.addChild(that.energyImg);
that.energyDeco = Ins_1.Ins.initSprite("0eb9c19f-248e-4bf1-bffb-ea694a94b16f", 541, -9);
that.energyGroup.addChild(that.energyDeco);
var mask = new FYGE.Shape();
mask.beginFill(6, 1);
mask.drawRoundedRect(0, 0, that.energyImg.width, that.energyImg.height, 38, 38, 38, 38);
mask.endFill();
mask.x = 9;
mask.y = 9;
that.energyGroup.addChild(mask);
that.energyImg.mask = mask;
that.setEnergy();
};
MainScene.prototype.setEnergy = function () {
var that = this;
that.energyImg.scaleX = 0.5;
that.energyDeco.x = that.energyImgW * that.energyImg.scaleX - that.energyDeco.width * 0.5;
};
MainScene.prototype.changeMainScene = function (type) { MainScene.prototype.changeMainScene = function (type) {
console.log("切换到" + type); console.log("切换到" + type);
var that = this; var that = this;
This diff is collapsed.
...@@ -2156,6 +2156,12 @@ var Main = (function () { ...@@ -2156,6 +2156,12 @@ var Main = (function () {
_a.sent(); _a.sent();
console.log("initLottieList完成"); console.log("initLottieList完成");
FYGE.GDispatcher.dispatchEvent("loadEnd"); FYGE.GDispatcher.dispatchEvent("loadEnd");
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getAppData, {}, function (s, res) {
console.log('getAppData success,res', s, res);
});
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getActivityBaseInfoById, {}, function (s, res) {
console.log('getActivityBaseInfoById success,res', s, res);
});
return [2]; return [2];
} }
}); });
...@@ -2251,8 +2257,7 @@ var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts"); ...@@ -2251,8 +2257,7 @@ var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName; var TbNetName;
(function (TbNetName) { (function (TbNetName) {
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport"; TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["getIndex"] = "babycare.getIndex"; TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["getActivityBaseInfoById"] = "babycare.getActivityBaseInfoById";
TbNetName["getGameInfo"] = "babycare.getGameInfo"; TbNetName["getGameInfo"] = "babycare.getGameInfo";
TbNetName["consumerTools"] = "babycare.consumerTools"; TbNetName["consumerTools"] = "babycare.consumerTools";
TbNetName["gameOver"] = "babycare.gameOver"; TbNetName["gameOver"] = "babycare.gameOver";
...@@ -44467,12 +44472,37 @@ var MainScene = (function (_super) { ...@@ -44467,12 +44472,37 @@ var MainScene = (function (_super) {
that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Enum_1.SCENETYPE.BEADROOM }); that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Enum_1.SCENETYPE.BEADROOM });
that.addChild(that.mainUi); that.addChild(that.mainUi);
that.initCat(); that.initCat();
that.initEnergy();
}; };
MainScene.prototype.initCat = function () { MainScene.prototype.initCat = function () {
var that = this; var that = this;
that.cat = new Cat_1.Cat({ type: "xianluo" }); that.cat = new Cat_1.Cat({ type: "xianluo" });
that.addChild(that.cat); that.addChild(that.cat);
}; };
MainScene.prototype.initEnergy = function () {
var that = this;
that.energyGroup = Ins_1.Ins.initSprite("fa59e617-f1d9-4065-85e1-6f6ebefb230f", 60, 1119);
that.addChild(that.energyGroup);
that.energyImg = Ins_1.Ins.initSprite("e00aee6d-2a90-4e92-b365-f031320d582c", 9, 9);
that.energyImgW = that.energyImg.width;
that.energyGroup.addChild(that.energyImg);
that.energyDeco = Ins_1.Ins.initSprite("0eb9c19f-248e-4bf1-bffb-ea694a94b16f", 541, -9);
that.energyGroup.addChild(that.energyDeco);
var mask = new FYGE.Shape();
mask.beginFill(6, 1);
mask.drawRoundedRect(0, 0, that.energyImg.width, that.energyImg.height, 38, 38, 38, 38);
mask.endFill();
mask.x = 9;
mask.y = 9;
that.energyGroup.addChild(mask);
that.energyImg.mask = mask;
that.setEnergy();
};
MainScene.prototype.setEnergy = function () {
var that = this;
that.energyImg.scaleX = 0.5;
that.energyDeco.x = that.energyImgW * that.energyImg.scaleX - that.energyDeco.width * 0.5;
};
MainScene.prototype.changeMainScene = function (type) { MainScene.prototype.changeMainScene = function (type) {
console.log("切换到" + type); console.log("切换到" + type);
var that = this; var that = this;
...@@ -2,9 +2,9 @@ import { RES } from "../module/RES"; ...@@ -2,9 +2,9 @@ import { RES } from "../module/RES";
import { layers, destroyLayers } from "../module/views/layers"; import { layers, destroyLayers } from "../module/views/layers";
import { ResJson } from "./ResJson"; import { ResJson } from "./ResJson";
import { G_EVENT } from "./common/G_EVENT"; import { G_EVENT } from "./common/G_EVENT";
import { destroyAllCtrls, changeScene } from "../module/ctrls"; import { destroyAllCtrls, changeScene, hideWaiting } from "../module/ctrls";
import { StartScene } from "./scenes/StartScene"; import { StartScene } from "./scenes/StartScene";
import { destroyNetData } from "./TaoBaoNet"; import { destroyNetData, sendTbNet, TbNetName } from "./TaoBaoNet";
import resCanvasList from '../resCanvasList'; import resCanvasList from '../resCanvasList';
...@@ -108,15 +108,12 @@ export class Main { ...@@ -108,15 +108,12 @@ export class Main {
// }) // })
//获取数据,,必成功 //获取数据,,必成功
// showWaiting(); // showWaiting();
// sendTbNet(TbNetName.getAppData, {}, (s, res) => { sendTbNet(TbNetName.getAppData, {}, (s, res) => {
// hideWaiting(); console.log('getAppData success,res',s,res)
// Tool.globalData = res.data; })
// changeScene(PlayScene); sendTbNet(TbNetName.getActivityBaseInfoById, {}, (s, res) => {
// //先去获取下任务列表的商品信息吧 console.log('getActivityBaseInfoById success,res',s,res)
// sendTbNet(TbNetName.getTaskList, { activityId: Tool.globalData.activityId }, (s, res) => { })
// if (s) Tool.browseItems = res.data.browseItemIds.content;
// })
// })
} }
//在小程序显示时调用onShow //在小程序显示时调用onShow
......
...@@ -11,19 +11,7 @@ export enum TbNetName { ...@@ -11,19 +11,7 @@ export enum TbNetName {
trackingReport = "squirrelsAdoptRest2c.trackingReport", trackingReport = "squirrelsAdoptRest2c.trackingReport",
/** getActivityBaseInfoById= "bubbleSurviva.getActivityBaseInfoById",
* 进入活动调用, 刷新数据不调用该接口
* activityId userNick avatar follow inviteId
*/
getIndex = "babycare.getIndex",
/**
* 活动基本信息
* @param activityId
* @type {string}
*/
getActivityBaseInfoById = "babycare.getActivityBaseInfoById",
/** /**
* 获取游戏信息 * 获取游戏信息
......
...@@ -2156,6 +2156,12 @@ var Main = (function () { ...@@ -2156,6 +2156,12 @@ var Main = (function () {
_a.sent(); _a.sent();
console.log("initLottieList完成"); console.log("initLottieList完成");
FYGE.GDispatcher.dispatchEvent("loadEnd"); FYGE.GDispatcher.dispatchEvent("loadEnd");
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getAppData, {}, function (s, res) {
console.log('getAppData success,res', s, res);
});
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getActivityBaseInfoById, {}, function (s, res) {
console.log('getActivityBaseInfoById success,res', s, res);
});
return [2]; return [2];
} }
}); });
...@@ -2251,8 +2257,7 @@ var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts"); ...@@ -2251,8 +2257,7 @@ var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName; var TbNetName;
(function (TbNetName) { (function (TbNetName) {
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport"; TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["getIndex"] = "babycare.getIndex"; TbNetName["getActivityBaseInfoById"] = "bubbleSurviva.getActivityBaseInfoById";
TbNetName["getActivityBaseInfoById"] = "babycare.getActivityBaseInfoById";
TbNetName["getGameInfo"] = "babycare.getGameInfo"; TbNetName["getGameInfo"] = "babycare.getGameInfo";
TbNetName["consumerTools"] = "babycare.consumerTools"; TbNetName["consumerTools"] = "babycare.consumerTools";
TbNetName["gameOver"] = "babycare.gameOver"; TbNetName["gameOver"] = "babycare.gameOver";
...@@ -44467,12 +44472,37 @@ var MainScene = (function (_super) { ...@@ -44467,12 +44472,37 @@ var MainScene = (function (_super) {
that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Enum_1.SCENETYPE.BEADROOM }); that.mainUi = new mainSceneBtnUi_1.MainSceneBtnUi({ uiType: Enum_1.SCENETYPE.BEADROOM });
that.addChild(that.mainUi); that.addChild(that.mainUi);
that.initCat(); that.initCat();
that.initEnergy();
}; };
MainScene.prototype.initCat = function () { MainScene.prototype.initCat = function () {
var that = this; var that = this;
that.cat = new Cat_1.Cat({ type: "xianluo" }); that.cat = new Cat_1.Cat({ type: "xianluo" });
that.addChild(that.cat); that.addChild(that.cat);
}; };
MainScene.prototype.initEnergy = function () {
var that = this;
that.energyGroup = Ins_1.Ins.initSprite("fa59e617-f1d9-4065-85e1-6f6ebefb230f", 60, 1119);
that.addChild(that.energyGroup);
that.energyImg = Ins_1.Ins.initSprite("e00aee6d-2a90-4e92-b365-f031320d582c", 9, 9);
that.energyImgW = that.energyImg.width;
that.energyGroup.addChild(that.energyImg);
that.energyDeco = Ins_1.Ins.initSprite("0eb9c19f-248e-4bf1-bffb-ea694a94b16f", 541, -9);
that.energyGroup.addChild(that.energyDeco);
var mask = new FYGE.Shape();
mask.beginFill(6, 1);
mask.drawRoundedRect(0, 0, that.energyImg.width, that.energyImg.height, 38, 38, 38, 38);
mask.endFill();
mask.x = 9;
mask.y = 9;
that.energyGroup.addChild(mask);
that.energyImg.mask = mask;
that.setEnergy();
};
MainScene.prototype.setEnergy = function () {
var that = this;
that.energyImg.scaleX = 0.5;
that.energyDeco.x = that.energyImgW * that.energyImg.scaleX - that.energyDeco.width * 0.5;
};
MainScene.prototype.changeMainScene = function (type) { MainScene.prototype.changeMainScene = function (type) {
console.log("切换到" + type); console.log("切换到" + type);
var that = this; var that = this;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment