Commit c7d582ff authored by wjf's avatar wjf

l

parent 2b5c25f1
...@@ -444,8 +444,13 @@ ...@@ -444,8 +444,13 @@
"topAward": { "topAward": {
"openPrizeStatus": true, "openPrizeStatus": true,
"prize": {} "prize": {}
},
"wxOriginPrize": {
"type": 9,
"name": "阿三的",
"rewardNum": 5
} }
}, },
"success": true, "success": true,
"message": "成功" "message": "成功"
} }
\ No newline at end of file
...@@ -2108,7 +2108,7 @@ exports.ResJson = { ...@@ -2108,7 +2108,7 @@ exports.ResJson = {
} }
}, },
{ {
"keys": "boomBtn.png,comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,stepBtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png", "keys": "boomBtn.png,comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,powerImg.png,stepBtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common", "name": "common",
"atlas": { "atlas": {
"boomBtn.png": { "boomBtn.png": {
...@@ -2123,8 +2123,8 @@ exports.ResJson = { ...@@ -2123,8 +2123,8 @@ exports.ResJson = {
"ro": false "ro": false
}, },
"comCloseBtn.png": { "comCloseBtn.png": {
"x": 347, "x": 340,
"y": 908, "y": 890,
"w": 48, "w": 48,
"h": 48, "h": 48,
"ox": 0, "ox": 0,
...@@ -2145,8 +2145,8 @@ exports.ResJson = { ...@@ -2145,8 +2145,8 @@ exports.ResJson = {
"ro": false "ro": false
}, },
"ele0.png": { "ele0.png": {
"x": 188, "x": 342,
"y": 762, "y": 598,
"w": 80, "w": 80,
"h": 66, "h": 66,
"ox": 0, "ox": 0,
...@@ -2156,19 +2156,19 @@ exports.ResJson = { ...@@ -2156,19 +2156,19 @@ exports.ResJson = {
"ro": true "ro": true
}, },
"ele1.png": { "ele1.png": {
"x": 279, "x": 421,
"y": 922, "y": 528,
"w": 66, "w": 66,
"h": 72, "h": 72,
"ox": 7, "ox": 7,
"oy": 8, "oy": 8,
"sw": 80, "sw": 80,
"sh": 80, "sh": 80,
"ro": false "ro": true
}, },
"ele10.png": { "ele10.png": {
"x": 256, "x": 460,
"y": 761, "y": 443,
"w": 76, "w": 76,
"h": 74, "h": 74,
"ox": 2, "ox": 2,
...@@ -2178,8 +2178,8 @@ exports.ResJson = { ...@@ -2178,8 +2178,8 @@ exports.ResJson = {
"ro": true "ro": true
}, },
"ele11.png": { "ele11.png": {
"x": 211, "x": 410,
"y": 844, "y": 597,
"w": 76, "w": 76,
"h": 74, "h": 74,
"ox": 2, "ox": 2,
...@@ -2189,8 +2189,8 @@ exports.ResJson = { ...@@ -2189,8 +2189,8 @@ exports.ResJson = {
"ro": true "ro": true
}, },
"ele12.png": { "ele12.png": {
"x": 211, "x": 410,
"y": 844, "y": 597,
"w": 76, "w": 76,
"h": 74, "h": 74,
"ox": 2, "ox": 2,
...@@ -2200,8 +2200,8 @@ exports.ResJson = { ...@@ -2200,8 +2200,8 @@ exports.ResJson = {
"ro": true "ro": true
}, },
"ele13.png": { "ele13.png": {
"x": 287, "x": 352,
"y": 839, "y": 528,
"w": 67, "w": 67,
"h": 67, "h": 67,
"ox": 0, "ox": 0,
...@@ -2211,8 +2211,8 @@ exports.ResJson = { ...@@ -2211,8 +2211,8 @@ exports.ResJson = {
"ro": false "ro": false
}, },
"ele14.png": { "ele14.png": {
"x": 332, "x": 277,
"y": 754, "y": 915,
"w": 61, "w": 61,
"h": 66, "h": 66,
"ox": 0, "ox": 0,
...@@ -2222,8 +2222,8 @@ exports.ResJson = { ...@@ -2222,8 +2222,8 @@ exports.ResJson = {
"ro": false "ro": false
}, },
"ele2.png": { "ele2.png": {
"x": 118, "x": 272,
"y": 762, "y": 598,
"w": 80, "w": 80,
"h": 68, "h": 68,
"ox": 0, "ox": 0,
...@@ -2233,19 +2233,19 @@ exports.ResJson = { ...@@ -2233,19 +2233,19 @@ exports.ResJson = {
"ro": true "ro": true
}, },
"ele3.png": { "ele3.png": {
"x": 280, "x": 272,
"y": 598, "y": 680,
"w": 72, "w": 72,
"h": 70, "h": 70,
"ox": 4, "ox": 4,
"oy": 10, "oy": 10,
"sw": 80, "sw": 80,
"sh": 80, "sh": 80,
"ro": true "ro": false
}, },
"ele4.png": { "ele4.png": {
"x": 279, "x": 211,
"y": 678, "y": 915,
"w": 74, "w": 74,
"h": 64, "h": 64,
"ox": 6, "ox": 6,
...@@ -2256,7 +2256,7 @@ exports.ResJson = { ...@@ -2256,7 +2256,7 @@ exports.ResJson = {
}, },
"ele5.png": { "ele5.png": {
"x": 118, "x": 118,
"y": 598, "y": 752,
"w": 80, "w": 80,
"h": 80, "h": 80,
"ox": 0, "ox": 0,
...@@ -2266,15 +2266,15 @@ exports.ResJson = { ...@@ -2266,15 +2266,15 @@ exports.ResJson = {
"ro": false "ro": false
}, },
"ele6.png": { "ele6.png": {
"x": 211, "x": 346,
"y": 922, "y": 680,
"w": 66, "w": 66,
"h": 72, "h": 72,
"ox": 7, "ox": 7,
"oy": 5, "oy": 5,
"sw": 80, "sw": 80,
"sh": 80, "sh": 80,
"ro": false "ro": true
}, },
"ele7.png": { "ele7.png": {
"x": 278, "x": 278,
...@@ -2288,8 +2288,8 @@ exports.ResJson = { ...@@ -2288,8 +2288,8 @@ exports.ResJson = {
"ro": false "ro": false
}, },
"ele8.png": { "ele8.png": {
"x": 118, "x": 200,
"y": 680, "y": 752,
"w": 78, "w": 78,
"h": 80, "h": 80,
"ox": 1, "ox": 1,
...@@ -2299,8 +2299,8 @@ exports.ResJson = { ...@@ -2299,8 +2299,8 @@ exports.ResJson = {
"ro": false "ro": false
}, },
"ele9.png": { "ele9.png": {
"x": 200, "x": 280,
"y": 598, "y": 752,
"w": 78, "w": 78,
"h": 78, "h": 78,
"ox": 1, "ox": 1,
...@@ -2320,6 +2320,17 @@ exports.ResJson = { ...@@ -2320,6 +2320,17 @@ exports.ResJson = {
"sh": 114, "sh": 114,
"ro": false "ro": false
}, },
"powerImg.png": {
"x": 118,
"y": 598,
"w": 152,
"h": 152,
"ox": 0,
"oy": 0,
"sw": 152,
"sh": 152,
"ro": false
},
"stepBtn.png": { "stepBtn.png": {
"x": 905, "x": 905,
"y": 2, "y": 2,
...@@ -2354,8 +2365,8 @@ exports.ResJson = { ...@@ -2354,8 +2365,8 @@ exports.ResJson = {
"ro": true "ro": true
}, },
"waitingRot.png": { "waitingRot.png": {
"x": 345, "x": 292,
"y": 672, "y": 832,
"w": 56, "w": 56,
"h": 56, "h": 56,
"ox": 0, "ox": 0,
...@@ -2365,8 +2376,8 @@ exports.ResJson = { ...@@ -2365,8 +2376,8 @@ exports.ResJson = {
"ro": false "ro": false
}, },
"关闭按钮.png": { "关闭按钮.png": {
"x": 198, "x": 211,
"y": 680, "y": 834,
"w": 79, "w": 79,
"h": 79, "h": 79,
"ox": 0, "ox": 0,
...@@ -10218,7 +10229,7 @@ exports.ResJson = { ...@@ -10218,7 +10229,7 @@ exports.ResJson = {
} }
} }
], ],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1596439435/resource/" "path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1597303204/resource/"
}; };
...@@ -11588,6 +11599,7 @@ var Tools = (function () { ...@@ -11588,6 +11599,7 @@ var Tools = (function () {
avatar: _this.globalData.avatar, avatar: _this.globalData.avatar,
follow: _this.globalData.isFollow, follow: _this.globalData.isFollow,
inviteId: _this.globalData.inviteId, inviteId: _this.globalData.inviteId,
isFromWx: _this.globalData.isFromWx
}, function (s, res) { }, function (s, res) {
if (s) if (s)
_this.gameData = res.data; _this.gameData = res.data;
...@@ -17389,6 +17401,7 @@ var StartPanel = (function (_super) { ...@@ -17389,6 +17401,7 @@ var StartPanel = (function (_super) {
if (!success) if (!success)
return; return;
Tools_1.Tools.gameData.power = res.data.power; Tools_1.Tools.gameData.power = res.data.power;
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.reportAnalytics, { logkey: 'join' });
ctrls_1.changeScene(PlayScene_1.PlayScene, { chapter: _this.data.level }); ctrls_1.changeScene(PlayScene_1.PlayScene, { chapter: _this.data.level });
_this.hidePanel(); _this.hidePanel();
}); });
...@@ -17549,6 +17562,7 @@ var StartPanelPrize = (function (_super) { ...@@ -17549,6 +17562,7 @@ var StartPanelPrize = (function (_super) {
_this.enableMouseEvt(true); _this.enableMouseEvt(true);
if (!success) if (!success)
return; return;
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.reportAnalytics, { logkey: 'join' });
Tools_1.Tools.gameData.power = res.data.power; Tools_1.Tools.gameData.power = res.data.power;
ctrls_1.changeScene(PlayScene_1.PlayScene, { chapter: _this.data.level }); ctrls_1.changeScene(PlayScene_1.PlayScene, { chapter: _this.data.level });
_this.hidePanel(); _this.hidePanel();
...@@ -18354,6 +18368,90 @@ var ToolsOutPanel = (function (_super) { ...@@ -18354,6 +18368,90 @@ var ToolsOutPanel = (function (_super) {
exports.ToolsOutPanel = ToolsOutPanel; exports.ToolsOutPanel = ToolsOutPanel;
/***/ }),
/***/ "./src/panels/WxPrizePanel.ts":
/*!************************************!*\
!*** ./src/panels/WxPrizePanel.ts ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts");
var TEXT_ALIGN = FYGE.TEXT_ALIGN;
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var WxPrizePanel = (function (_super) {
__extends(WxPrizePanel, _super);
function WxPrizePanel() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(WxPrizePanel.prototype, "groupNames", {
get: function () {
return ["PrizePanel"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(WxPrizePanel.prototype, "skinName", {
get: function () {
return "PrizePanel";
},
enumerable: true,
configurable: true
});
Object.defineProperty(WxPrizePanel.prototype, "closeBtns", {
get: function () {
return [this.closeBtn, this.prizeBtn];
},
enumerable: true,
configurable: true
});
WxPrizePanel.prototype.initUi = function () {
var _this = this;
this.prizeTxt.textAlign = TEXT_ALIGN.CENTER;
this.prizeTxt.textWidth = 750;
this.prizeTxt.x = 0;
this.prizeTxt.text = "\u606D\u559C\u83B7\u5F97" + this.data.name;
this.prizeImg.anchorTexture.x = 0.5;
this.prizeImg.width = this.prizeImg.height = 220;
this.prizeImg.x = 375;
this.prizeImg.texture = RES_1.RES.getRes((function () {
var str = "aaaaaa.png";
switch (_this.data.type) {
case 6:
str = "hammerBtn.png";
break;
case 7:
str = "boomBtn.png";
break;
case 8:
str = "stepBtn.png";
break;
case 9:
str = "powerImg.png";
break;
}
return str;
})());
};
return WxPrizePanel;
}(Panel_1.Panel));
exports.WxPrizePanel = WxPrizePanel;
/***/ }), /***/ }),
/***/ "./src/scene/LoadingScene.ts": /***/ "./src/scene/LoadingScene.ts":
...@@ -18444,10 +18542,14 @@ var LoadingScene = (function (_super) { ...@@ -18444,10 +18542,14 @@ var LoadingScene = (function (_super) {
l2.visible = false; l2.visible = false;
FYGE.Tween.get(l1, { loop: true }) FYGE.Tween.get(l1, { loop: true })
.wait(500) .wait(500)
.call(function () { l1.visible = !l1.visible; }); .call(function () {
l1.visible = !l1.visible;
});
FYGE.Tween.get(l2, { loop: true }) FYGE.Tween.get(l2, { loop: true })
.wait(500) .wait(500)
.call(function () { l2.visible = !l2.visible; }); .call(function () {
l2.visible = !l2.visible;
});
var wheel = this.addChild(FYGE.Sprite.fromFrame("wheel.png")) var wheel = this.addChild(FYGE.Sprite.fromFrame("wheel.png"))
.addEventListener(FYGE.Event.ENTER_FRAME, function () { .addEventListener(FYGE.Event.ENTER_FRAME, function () {
wheel.rotation += 0.3; wheel.rotation += 0.3;
...@@ -18492,6 +18594,7 @@ var LoadingScene = (function (_super) { ...@@ -18492,6 +18594,7 @@ var LoadingScene = (function (_super) {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
_super.prototype.start.call(this); _super.prototype.start.call(this);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.reportAnalytics, { logkey: 'visit' });
this.addEventListener(FYGE.Event.PROGRESS, this.progressEvent, this); this.addEventListener(FYGE.Event.PROGRESS, this.progressEvent, this);
this.dispatchEvent(FYGE.Event.PROGRESS, 0.2); this.dispatchEvent(FYGE.Event.PROGRESS, 0.2);
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getAppData)]; return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getAppData)];
...@@ -18499,7 +18602,6 @@ var LoadingScene = (function (_super) { ...@@ -18499,7 +18602,6 @@ var LoadingScene = (function (_super) {
data = (_a.sent()).data; data = (_a.sent()).data;
Tools_1.Tools.globalData = data; Tools_1.Tools.globalData = data;
this.dispatchEvent(FYGE.Event.PROGRESS, 0.3); this.dispatchEvent(FYGE.Event.PROGRESS, 0.3);
Tools_1.Tools.checkPermission();
return [4, Tools_1.Tools.getIndex()]; return [4, Tools_1.Tools.getIndex()];
case 2: case 2:
getIndexSuccesss = _a.sent(); getIndexSuccesss = _a.sent();
...@@ -21828,6 +21930,7 @@ var ctrls_1 = __webpack_require__(/*! ../../../module/ctrls */ "./module/ctrls/i ...@@ -21828,6 +21930,7 @@ var ctrls_1 = __webpack_require__(/*! ../../../module/ctrls */ "./module/ctrls/i
var FreePowerPanel_1 = __webpack_require__(/*! ../../panels/FreePowerPanel */ "./src/panels/FreePowerPanel.ts"); var FreePowerPanel_1 = __webpack_require__(/*! ../../panels/FreePowerPanel */ "./src/panels/FreePowerPanel.ts");
var PrizePanel_1 = __webpack_require__(/*! ../../panels/PrizePanel */ "./src/panels/PrizePanel.ts"); var PrizePanel_1 = __webpack_require__(/*! ../../panels/PrizePanel */ "./src/panels/PrizePanel.ts");
var GTool_1 = __webpack_require__(/*! ../../../module/tools/GTool */ "./module/tools/GTool.ts"); var GTool_1 = __webpack_require__(/*! ../../../module/tools/GTool */ "./module/tools/GTool.ts");
var WxPrizePanel_1 = __webpack_require__(/*! ../../panels/WxPrizePanel */ "./src/panels/WxPrizePanel.ts");
var MapScene = (function (_super) { var MapScene = (function (_super) {
__extends(MapScene, _super); __extends(MapScene, _super);
function MapScene() { function MapScene() {
...@@ -21874,6 +21977,16 @@ var MapScene = (function (_super) { ...@@ -21874,6 +21977,16 @@ var MapScene = (function (_super) {
} }
Tools_1.Tools.gameData.topAward = null; Tools_1.Tools.gameData.topAward = null;
} }
if (Tools_1.Tools.gameData.wxOriginPrize) {
if (Tools_1.Tools.gameData.wxOriginPrize.type &&
Tools_1.Tools.gameData.wxOriginPrize.type != 5) {
ctrls_1.showPanel(WxPrizePanel_1.WxPrizePanel, Tools_1.Tools.gameData.wxOriginPrize);
}
else if (Tools_1.Tools.gameData.wxOriginPrize.defaultMsg) {
ctrls_1.showToast(Tools_1.Tools.gameData.wxOriginPrize.defaultMsg);
}
Tools_1.Tools.gameData.wxOriginPrize = null;
}
}; };
MapScene.prototype.updateMapCheck = function () { MapScene.prototype.updateMapCheck = function () {
var _this = this; var _this = this;
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"name": "BuyPowerPanel" "name": "BuyPowerPanel"
}, },
{ {
"keys": "boomBtn.png,comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,stepBtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png", "keys": "boomBtn.png,comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,powerImg.png,stepBtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common" "name": "common"
}, },
{ {
......
...@@ -288,7 +288,7 @@ export const ResJson = { ...@@ -288,7 +288,7 @@ export const ResJson = {
} }
}, },
{ {
"keys": "boomBtn.png,comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,stepBtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png", "keys": "boomBtn.png,comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,powerImg.png,stepBtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common", "name": "common",
"atlas": { "atlas": {
"boomBtn.png": { "boomBtn.png": {
...@@ -303,8 +303,8 @@ export const ResJson = { ...@@ -303,8 +303,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"comCloseBtn.png": { "comCloseBtn.png": {
"x": 347, "x": 340,
"y": 908, "y": 890,
"w": 48, "w": 48,
"h": 48, "h": 48,
"ox": 0, "ox": 0,
...@@ -325,8 +325,8 @@ export const ResJson = { ...@@ -325,8 +325,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"ele0.png": { "ele0.png": {
"x": 188, "x": 342,
"y": 762, "y": 598,
"w": 80, "w": 80,
"h": 66, "h": 66,
"ox": 0, "ox": 0,
...@@ -336,19 +336,19 @@ export const ResJson = { ...@@ -336,19 +336,19 @@ export const ResJson = {
"ro": true "ro": true
}, },
"ele1.png": { "ele1.png": {
"x": 279, "x": 421,
"y": 922, "y": 528,
"w": 66, "w": 66,
"h": 72, "h": 72,
"ox": 7, "ox": 7,
"oy": 8, "oy": 8,
"sw": 80, "sw": 80,
"sh": 80, "sh": 80,
"ro": false "ro": true
}, },
"ele10.png": { "ele10.png": {
"x": 256, "x": 460,
"y": 761, "y": 443,
"w": 76, "w": 76,
"h": 74, "h": 74,
"ox": 2, "ox": 2,
...@@ -358,8 +358,8 @@ export const ResJson = { ...@@ -358,8 +358,8 @@ export const ResJson = {
"ro": true "ro": true
}, },
"ele11.png": { "ele11.png": {
"x": 211, "x": 410,
"y": 844, "y": 597,
"w": 76, "w": 76,
"h": 74, "h": 74,
"ox": 2, "ox": 2,
...@@ -369,8 +369,8 @@ export const ResJson = { ...@@ -369,8 +369,8 @@ export const ResJson = {
"ro": true "ro": true
}, },
"ele12.png": { "ele12.png": {
"x": 211, "x": 410,
"y": 844, "y": 597,
"w": 76, "w": 76,
"h": 74, "h": 74,
"ox": 2, "ox": 2,
...@@ -380,8 +380,8 @@ export const ResJson = { ...@@ -380,8 +380,8 @@ export const ResJson = {
"ro": true "ro": true
}, },
"ele13.png": { "ele13.png": {
"x": 287, "x": 352,
"y": 839, "y": 528,
"w": 67, "w": 67,
"h": 67, "h": 67,
"ox": 0, "ox": 0,
...@@ -391,8 +391,8 @@ export const ResJson = { ...@@ -391,8 +391,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"ele14.png": { "ele14.png": {
"x": 332, "x": 277,
"y": 754, "y": 915,
"w": 61, "w": 61,
"h": 66, "h": 66,
"ox": 0, "ox": 0,
...@@ -402,8 +402,8 @@ export const ResJson = { ...@@ -402,8 +402,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"ele2.png": { "ele2.png": {
"x": 118, "x": 272,
"y": 762, "y": 598,
"w": 80, "w": 80,
"h": 68, "h": 68,
"ox": 0, "ox": 0,
...@@ -413,19 +413,19 @@ export const ResJson = { ...@@ -413,19 +413,19 @@ export const ResJson = {
"ro": true "ro": true
}, },
"ele3.png": { "ele3.png": {
"x": 280, "x": 272,
"y": 598, "y": 680,
"w": 72, "w": 72,
"h": 70, "h": 70,
"ox": 4, "ox": 4,
"oy": 10, "oy": 10,
"sw": 80, "sw": 80,
"sh": 80, "sh": 80,
"ro": true "ro": false
}, },
"ele4.png": { "ele4.png": {
"x": 279, "x": 211,
"y": 678, "y": 915,
"w": 74, "w": 74,
"h": 64, "h": 64,
"ox": 6, "ox": 6,
...@@ -436,7 +436,7 @@ export const ResJson = { ...@@ -436,7 +436,7 @@ export const ResJson = {
}, },
"ele5.png": { "ele5.png": {
"x": 118, "x": 118,
"y": 598, "y": 752,
"w": 80, "w": 80,
"h": 80, "h": 80,
"ox": 0, "ox": 0,
...@@ -446,15 +446,15 @@ export const ResJson = { ...@@ -446,15 +446,15 @@ export const ResJson = {
"ro": false "ro": false
}, },
"ele6.png": { "ele6.png": {
"x": 211, "x": 346,
"y": 922, "y": 680,
"w": 66, "w": 66,
"h": 72, "h": 72,
"ox": 7, "ox": 7,
"oy": 5, "oy": 5,
"sw": 80, "sw": 80,
"sh": 80, "sh": 80,
"ro": false "ro": true
}, },
"ele7.png": { "ele7.png": {
"x": 278, "x": 278,
...@@ -468,8 +468,8 @@ export const ResJson = { ...@@ -468,8 +468,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"ele8.png": { "ele8.png": {
"x": 118, "x": 200,
"y": 680, "y": 752,
"w": 78, "w": 78,
"h": 80, "h": 80,
"ox": 1, "ox": 1,
...@@ -479,8 +479,8 @@ export const ResJson = { ...@@ -479,8 +479,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"ele9.png": { "ele9.png": {
"x": 200, "x": 280,
"y": 598, "y": 752,
"w": 78, "w": 78,
"h": 78, "h": 78,
"ox": 1, "ox": 1,
...@@ -500,6 +500,17 @@ export const ResJson = { ...@@ -500,6 +500,17 @@ export const ResJson = {
"sh": 114, "sh": 114,
"ro": false "ro": false
}, },
"powerImg.png": {
"x": 118,
"y": 598,
"w": 152,
"h": 152,
"ox": 0,
"oy": 0,
"sw": 152,
"sh": 152,
"ro": false
},
"stepBtn.png": { "stepBtn.png": {
"x": 905, "x": 905,
"y": 2, "y": 2,
...@@ -534,8 +545,8 @@ export const ResJson = { ...@@ -534,8 +545,8 @@ export const ResJson = {
"ro": true "ro": true
}, },
"waitingRot.png": { "waitingRot.png": {
"x": 345, "x": 292,
"y": 672, "y": 832,
"w": 56, "w": 56,
"h": 56, "h": 56,
"ox": 0, "ox": 0,
...@@ -545,8 +556,8 @@ export const ResJson = { ...@@ -545,8 +556,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"关闭按钮.png": { "关闭按钮.png": {
"x": 198, "x": 211,
"y": 680, "y": 834,
"w": 79, "w": 79,
"h": 79, "h": 79,
"ox": 0, "ox": 0,
...@@ -8398,5 +8409,5 @@ export const ResJson = { ...@@ -8398,5 +8409,5 @@ export const ResJson = {
} }
} }
], ],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1596439435/resource/" "path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1597303204/resource/"
} }
\ No newline at end of file
...@@ -32,7 +32,8 @@ export class Tools { ...@@ -32,7 +32,8 @@ export class Tools {
"activityId": string, "activityId": string,
"openId": string, "openId": string,
"inviteId": string, "inviteId": string,
"isFollow": boolean "isFollow": boolean,
"isFromWx": boolean,
} }
/** /**
* 游戏数据,需要根据接口维护 * 游戏数据,需要根据接口维护
...@@ -62,7 +63,14 @@ export class Tools { ...@@ -62,7 +63,14 @@ export class Tools {
"topAward": { "topAward": {
openPrizeStatus: boolean, openPrizeStatus: boolean,
prize: any prize: any
}//120关自动开奖 },//120关自动开奖
"wxOriginPrize"?: {//微信中奖信息
"type": number,
"name": string,
"rewardNum": number,
"code"?:string,
"defaultMsg"?:string
}
} }
public static baseInfo: { public static baseInfo: {
...@@ -87,6 +95,7 @@ export class Tools { ...@@ -87,6 +95,7 @@ export class Tools {
avatar: this.globalData.avatar, avatar: this.globalData.avatar,
follow: this.globalData.isFollow, follow: this.globalData.isFollow,
inviteId: this.globalData.inviteId, inviteId: this.globalData.inviteId,
isFromWx: this.globalData.isFromWx
}, (s, res) => { }, (s, res) => {
if (s) this.gameData = res.data; if (s) this.gameData = res.data;
r(s); r(s);
......
import { Panel } from "../../module/views/Panel";
import TextField = FYGE.TextField;
import Button = FYGE.Button;
import Sprite = FYGE.Sprite;
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import Texture = FYGE.Texture;
import MouseEvent = FYGE.MouseEvent;
import { sendTbNet, TbNetName } from "../TaoBaoNet";
import { showToast } from "../../module/ctrls";
import { Tool } from "../something/Tool";
import { Tools } from "../Tools";
import { RES } from "../../module/RES";
/**
* 处理微信渠道中奖信息,皮肤和资源用的PrizePanel
*/
export class WxPrizePanel extends Panel {
get groupNames() {
return ["PrizePanel"]
}
get skinName() {
return "PrizePanel"
}
protected get closeBtns(): any[] {
return [this.closeBtn, this.prizeBtn]
}
closeBtn: Button;
prizeTxt: TextField;
prizeImg: Sprite;
prizeBtn: Button;
data: {
"type": number,//6(锤子)7(炸弹)8(步数)9(体力)
"name": string,
"rewardNum": number
}
initUi() {
this.prizeTxt.textAlign = TEXT_ALIGN.CENTER;
this.prizeTxt.textWidth = 750;
this.prizeTxt.x = 0;
this.prizeTxt.text = `恭喜获得${this.data.name}`;
this.prizeImg.anchorTexture.x = 0.5;
this.prizeImg.width = this.prizeImg.height = 220;
this.prizeImg.x = 375;
this.prizeImg.texture = RES.getRes(
(() => {
var str = "aaaaaa.png"
switch (this.data.type) {
case 6://锤子
str = "hammerBtn.png"
break;
case 7://炸弹
str = "boomBtn.png"
break;
case 8://步数
str = "stepBtn.png"
break;
case 9://体力
str = "powerImg.png"
break;
}
return str
})()
);
}
}
...@@ -110,7 +110,7 @@ export class LoadingScene extends Scene { ...@@ -110,7 +110,7 @@ export class LoadingScene extends Scene {
Tools.globalData = data; Tools.globalData = data;
this.dispatchEvent(FYGE.Event.PROGRESS, 0.3) this.dispatchEvent(FYGE.Event.PROGRESS, 0.3)
//询问读取权限,不阻止进程 //询问读取权限,不阻止进程
Tools.checkPermission(); // Tools.checkPermission();//这个需要吗?
//获取首页数据 //获取首页数据
var getIndexSuccesss = await Tools.getIndex() var getIndexSuccesss = await Tools.getIndex()
//失败不进入 //失败不进入
......
...@@ -13,11 +13,12 @@ import Sprite = FYGE.Sprite; ...@@ -13,11 +13,12 @@ import Sprite = FYGE.Sprite;
import Texture = FYGE.Texture; import Texture = FYGE.Texture;
import Tween = FYGE.Tween; import Tween = FYGE.Tween;
import Ease = FYGE.Ease; import Ease = FYGE.Ease;
import { showPanel } from "../../../module/ctrls"; import { showPanel, showToast } from "../../../module/ctrls";
import { FreePowerPanel } from "../../panels/FreePowerPanel"; import { FreePowerPanel } from "../../panels/FreePowerPanel";
import { PrizePanel } from "../../panels/PrizePanel"; import { PrizePanel } from "../../panels/PrizePanel";
import { GTool } from "../../../module/tools/GTool"; import { GTool } from "../../../module/tools/GTool";
import { NoPrizePanel } from "../../panels/NoPrizePanel"; import { NoPrizePanel } from "../../panels/NoPrizePanel";
import { WxPrizePanel } from "../../panels/WxPrizePanel";
export class MapScene extends Scene { export class MapScene extends Scene {
private mapContainer: Container = null; private mapContainer: Container = null;
...@@ -75,6 +76,22 @@ export class MapScene extends Scene { ...@@ -75,6 +76,22 @@ export class MapScene extends Scene {
// showPanel(PrizePanel, JSON.parse(JSON.stringify(Tools.gameData.topAward))); // showPanel(PrizePanel, JSON.parse(JSON.stringify(Tools.gameData.topAward)));
// Tools.gameData.topAward = null; // Tools.gameData.topAward = null;
// } // }
//微信渠道抽奖
if (Tools.gameData.wxOriginPrize) {
//有奖品
if (
Tools.gameData.wxOriginPrize.type &&//类型存在
Tools.gameData.wxOriginPrize.type != 5 //不为谢谢参与
) {
showPanel(WxPrizePanel, Tools.gameData.wxOriginPrize)
}
//超出限制了
else if (Tools.gameData.wxOriginPrize.defaultMsg) {
showToast(Tools.gameData.wxOriginPrize.defaultMsg)
}
//置空数据
Tools.gameData.wxOriginPrize = null;
}
} }
private updateMapCheck() { private updateMapCheck() {
......
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