Commit 29e7b501 authored by shunx 马's avatar shunx 马

111

parent 2969c274
{
"code": null,
"data": {
"surplusCount": 11111,
"credits": 2222,
"surplusCount": 1,
"credits": 22222,
"needCredits": 3333,
"type": 2,
"isMember":1
},
"message": null,
"success": 1
"success": true
}
\ No newline at end of file
......@@ -13,7 +13,13 @@
/**
* 获取首页数据
*/
index = "/projectx/{projectId}/dazzle/index.do",
drawPrize = "/projectx/{projectId}/dazzle/drawPrize.do",
index = "/projectx/{projectId}/dazzle/index.do",
/**
* 获取奖品信息
*/
drawPrize = "/projectx/{projectId}/dazzle/drawPrize.do",
/**
* 分享获得免费次数
*/
getFreeCount = "/projectx/{projectId}/dazzle/getFreeCount.do"
}
\ No newline at end of file
......@@ -15,6 +15,7 @@ export class CostPanel extends Panel {
cost_open() {
this.dispatchEvent("stopIndexEnterFrame", { });
this.hidePanel();
showPanel(PrizePanel)
}
......
......@@ -32,7 +32,7 @@ export class NoPrizePanel extends Panel {
this.addChild(indexsvga);
this.addChild(prizePop)
indexsvga.addEventListener(FYGE.Event.ENTER_FRAME, () => {
if (indexsvga.currentFrame == indexsvga.totalFrames-10) {
if (indexsvga.currentFrame == indexsvga.totalFrames-13) {
prizePop.visible = true;
}
},this)
......
import { showPanel } from "../../module/ctrls";
import { RES } from "../../module/RES";
import { delayClick } from "../common/delayClick";
import { CostPanel } from "../panels/cost";
import { Box } from "./Box";
......@@ -72,14 +73,13 @@ export class BoxGroup extends FYGE.Sprite {
}
handleClick(e) {
delayClick(e.target.stage);
const indexsvga = this.indexsvga = new FYGE.MovieClip(RES.getRes('盲盒选中-输出.svga'));
flag = 1;
this.dispatchEvent("stopIndexEnterFrame", { });
indexsvga.mouseChildren = indexsvga.mouseEnable = false;
indexsvga.position.set(e.target.x-200,e.target.y-190)
this.addChild(indexsvga);
indexsvga.startAniRange(1, indexsvga.totalFrames, 1, () => {
flag = 0;
showPanel(CostPanel);
});
}
......
......@@ -32,20 +32,26 @@ export class IndexScene extends Scene {
start() {
super.start();
this.getIndex();
// this.initNonmemberMask();
getObject(this,'index_sharetips').visible=false;
// getObject(this,'index_sharetips').visible=false;
this.initContainer();
this.initmask();
const limit = getObject(this, 'index_timestips2');
limit.position.set(255, 1129);
limit.position.set(245, 1130);
limit.size = 25;
const credits = getObject(this, 'index_moneytips2');
credits.position.set(608, 1129);
credits.position.set(600, 1130);
credits.size = 25;
const index_moneytips = getObject(this, 'index_moneytips');
index_moneytips.position.set(480, 1131);
const index_timestips = getObject(this, 'index_timestips');
index_timestips.position.set(127, 1131);
const list = new FYGE.ScrollList(ScrollItem, 131+20, 131, 620, 154, false);
const array = ['//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'];
list.updateData(array);
list.position.set(80, 1240 + 30);
this.addChild(list);
this.getIndex();
this.stage.addEventListener("restartEnterFrame", this.onRestartFrame, this);
boxGroup.addEventListener("stopIndexEnterFrame", this.removeEvent, this);
......@@ -61,9 +67,10 @@ export class IndexScene extends Scene {
initNonmemberMask() {
const mask = new FYGE.Shape();
mask.beginFill(0, 0.1);
mask.beginFill(0, 1);
mask.drawRect(0, 0, 750, 1624);
mask.endFill();
mask.alpha = 0;
layers.topLayer.addChild(mask);
mask.addEventListener(FYGE.MouseEvent.CLICK, () => {
showPanel(memberGuidePanel);
......@@ -107,18 +114,40 @@ export class IndexScene extends Scene {
getIndex = async () => {
const result = getWebData(WebNetName.index);
const shareButton = getObject(this, 'index_sharetips');
shareButton.addEventListener(FYGE.MouseEvent.CLICK, () =>{
})
const hand = getObject(this, 'index_sharehand');
this.addChild(hand);
const tw = FYGE.Tween.get(hand, { loop: true }).to({ scaleX: 1.5, scaleY: 1.5 }, 1000).to({ scaleX: 1, scaleY: 1 }, 1000);
hand.visible = false;
if (result && result.data) {
const getBoxButton = getObject(this, 'index_opentips');
const reDegree = getObject(this, 'index_timestips2');
const credits = getObject(this, 'index_moneytips2');
credits.text = result.data.credits;
if (result.data && result.data.credits > 9999) {
credits.text = "9999" + "+";
} else {
credits.text = `${result.data.credits}`;
}
const needCredits = getObject(this, 'index_costtips');
needCredits.text = result.data.needCredits + "积分/次";
if (result.data.type == 2) {
reDegree.text = result.data.surplusCount;
needCredits.text = `${result.data.needCredits}` + "积分/次";
if (result.data.type == 1) {
reDegree.text = `${result.data.surplusCount}`;
if (result.data.surplusCount <= 0) {
getBoxButton.visible = false;
shareButton.visible = true;
hand.visible = true;
reDegree.text = '0';
} else {
getBoxButton.visible = true;
shareButton.visible = false;
}
} else {
reDegree.text = 0;
needCredits.text = '免费拆盒1次';
reDegree.text = `${result.data.surplusCount}`;
getBoxButton.visible = true;
shareButton.visible = false;
}
}
......
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