Commit c7d582ff authored by wjf's avatar wjf

l

parent 2b5c25f1
......@@ -444,6 +444,11 @@
"topAward": {
"openPrizeStatus": true,
"prize": {}
},
"wxOriginPrize": {
"type": 9,
"name": "阿三的",
"rewardNum": 5
}
},
"success": true,
......
This diff is collapsed.
This diff is collapsed.
......@@ -9,7 +9,7 @@
"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"
},
{
......
......@@ -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",
"atlas": {
"boomBtn.png": {
......@@ -303,8 +303,8 @@ export const ResJson = {
"ro": false
},
"comCloseBtn.png": {
"x": 347,
"y": 908,
"x": 340,
"y": 890,
"w": 48,
"h": 48,
"ox": 0,
......@@ -325,8 +325,8 @@ export const ResJson = {
"ro": false
},
"ele0.png": {
"x": 188,
"y": 762,
"x": 342,
"y": 598,
"w": 80,
"h": 66,
"ox": 0,
......@@ -336,19 +336,19 @@ export const ResJson = {
"ro": true
},
"ele1.png": {
"x": 279,
"y": 922,
"x": 421,
"y": 528,
"w": 66,
"h": 72,
"ox": 7,
"oy": 8,
"sw": 80,
"sh": 80,
"ro": false
"ro": true
},
"ele10.png": {
"x": 256,
"y": 761,
"x": 460,
"y": 443,
"w": 76,
"h": 74,
"ox": 2,
......@@ -358,8 +358,8 @@ export const ResJson = {
"ro": true
},
"ele11.png": {
"x": 211,
"y": 844,
"x": 410,
"y": 597,
"w": 76,
"h": 74,
"ox": 2,
......@@ -369,8 +369,8 @@ export const ResJson = {
"ro": true
},
"ele12.png": {
"x": 211,
"y": 844,
"x": 410,
"y": 597,
"w": 76,
"h": 74,
"ox": 2,
......@@ -380,8 +380,8 @@ export const ResJson = {
"ro": true
},
"ele13.png": {
"x": 287,
"y": 839,
"x": 352,
"y": 528,
"w": 67,
"h": 67,
"ox": 0,
......@@ -391,8 +391,8 @@ export const ResJson = {
"ro": false
},
"ele14.png": {
"x": 332,
"y": 754,
"x": 277,
"y": 915,
"w": 61,
"h": 66,
"ox": 0,
......@@ -402,8 +402,8 @@ export const ResJson = {
"ro": false
},
"ele2.png": {
"x": 118,
"y": 762,
"x": 272,
"y": 598,
"w": 80,
"h": 68,
"ox": 0,
......@@ -413,19 +413,19 @@ export const ResJson = {
"ro": true
},
"ele3.png": {
"x": 280,
"y": 598,
"x": 272,
"y": 680,
"w": 72,
"h": 70,
"ox": 4,
"oy": 10,
"sw": 80,
"sh": 80,
"ro": true
"ro": false
},
"ele4.png": {
"x": 279,
"y": 678,
"x": 211,
"y": 915,
"w": 74,
"h": 64,
"ox": 6,
......@@ -436,7 +436,7 @@ export const ResJson = {
},
"ele5.png": {
"x": 118,
"y": 598,
"y": 752,
"w": 80,
"h": 80,
"ox": 0,
......@@ -446,15 +446,15 @@ export const ResJson = {
"ro": false
},
"ele6.png": {
"x": 211,
"y": 922,
"x": 346,
"y": 680,
"w": 66,
"h": 72,
"ox": 7,
"oy": 5,
"sw": 80,
"sh": 80,
"ro": false
"ro": true
},
"ele7.png": {
"x": 278,
......@@ -468,8 +468,8 @@ export const ResJson = {
"ro": false
},
"ele8.png": {
"x": 118,
"y": 680,
"x": 200,
"y": 752,
"w": 78,
"h": 80,
"ox": 1,
......@@ -479,8 +479,8 @@ export const ResJson = {
"ro": false
},
"ele9.png": {
"x": 200,
"y": 598,
"x": 280,
"y": 752,
"w": 78,
"h": 78,
"ox": 1,
......@@ -500,6 +500,17 @@ export const ResJson = {
"sh": 114,
"ro": false
},
"powerImg.png": {
"x": 118,
"y": 598,
"w": 152,
"h": 152,
"ox": 0,
"oy": 0,
"sw": 152,
"sh": 152,
"ro": false
},
"stepBtn.png": {
"x": 905,
"y": 2,
......@@ -534,8 +545,8 @@ export const ResJson = {
"ro": true
},
"waitingRot.png": {
"x": 345,
"y": 672,
"x": 292,
"y": 832,
"w": 56,
"h": 56,
"ox": 0,
......@@ -545,8 +556,8 @@ export const ResJson = {
"ro": false
},
"关闭按钮.png": {
"x": 198,
"y": 680,
"x": 211,
"y": 834,
"w": 79,
"h": 79,
"ox": 0,
......@@ -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 {
"activityId": string,
"openId": string,
"inviteId": string,
"isFollow": boolean
"isFollow": boolean,
"isFromWx": boolean,
}
/**
* 游戏数据,需要根据接口维护
......@@ -62,7 +63,14 @@ export class Tools {
"topAward": {
openPrizeStatus: boolean,
prize: any
}//120关自动开奖
},//120关自动开奖
"wxOriginPrize"?: {//微信中奖信息
"type": number,
"name": string,
"rewardNum": number,
"code"?:string,
"defaultMsg"?:string
}
}
public static baseInfo: {
......@@ -87,6 +95,7 @@ export class Tools {
avatar: this.globalData.avatar,
follow: this.globalData.isFollow,
inviteId: this.globalData.inviteId,
isFromWx: this.globalData.isFromWx
}, (s, res) => {
if (s) this.gameData = res.data;
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 {
Tools.globalData = data;
this.dispatchEvent(FYGE.Event.PROGRESS, 0.3)
//询问读取权限,不阻止进程
Tools.checkPermission();
// Tools.checkPermission();//这个需要吗?
//获取首页数据
var getIndexSuccesss = await Tools.getIndex()
//失败不进入
......
......@@ -13,11 +13,12 @@ import Sprite = FYGE.Sprite;
import Texture = FYGE.Texture;
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
import { showPanel } from "../../../module/ctrls";
import { showPanel, showToast } from "../../../module/ctrls";
import { FreePowerPanel } from "../../panels/FreePowerPanel";
import { PrizePanel } from "../../panels/PrizePanel";
import { GTool } from "../../../module/tools/GTool";
import { NoPrizePanel } from "../../panels/NoPrizePanel";
import { WxPrizePanel } from "../../panels/WxPrizePanel";
export class MapScene extends Scene {
private mapContainer: Container = null;
......@@ -75,6 +76,22 @@ export class MapScene extends Scene {
// showPanel(PrizePanel, JSON.parse(JSON.stringify(Tools.gameData.topAward)));
// 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() {
......
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