Commit 00182b16 authored by 邱旭's avatar 邱旭

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

parents 0bf0a998 5e3d19bc
...@@ -12,7 +12,7 @@ export default class Toast2 extends ComponentBase { ...@@ -12,7 +12,7 @@ export default class Toast2 extends ComponentBase {
toastLabel:eui.Label; toastLabel:eui.Label;
start() { start() {
this.touchEnabled=false; this.touchEnabled=false;
this.touchChildren=false; // this.touchChildren=false;
this.toastLabel.textFlow = (new HtmlTextParser).parser('<u>继续闯关赢好礼</u>'); this.toastLabel.textFlow = (new HtmlTextParser).parser('<u>继续闯关赢好礼</u>');
this.toastLabel.addEventListener(egret.TouchEvent.TOUCH_TAP,()=>{ this.toastLabel.addEventListener(egret.TouchEvent.TOUCH_TAP,()=>{
if(SceneCtrl.instance.currentScene instanceof MainScene){ if(SceneCtrl.instance.currentScene instanceof MainScene){
......
...@@ -18,4 +18,5 @@ ...@@ -18,4 +18,5 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Label text="闯关成功即可获得现金券、\n游戏道具等更多好礼哦~" y="477.24" anchorOffsetX="0" width="578.54" anchorOffsetY="0" height="81.52" horizontalCenter="0" textAlign="center" verticalAlign="middle" textColor="0xf54501" size="25" lineSpacing="15"/>
</e:Skin> </e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="MapSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect id="rectbg" width="750" height="1206" visible="false"/> <e:Rect id="rectbg" width="750" height="1206"/>
<e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on" locked="true"> <e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on" locked="true">
<e:Group id="scrollGroup"> <e:Group id="scrollGroup">
</e:Group> </e:Group>
......
...@@ -387,7 +387,7 @@ export default class MainScene extends Scene { ...@@ -387,7 +387,7 @@ export default class MainScene extends Scene {
this.propBtnCon.hammerBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_hammerBtn, this) this.propBtnCon.hammerBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_hammerBtn, this)
this.propBtnCon.stepBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_stepBtn, this) this.propBtnCon.stepBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_stepBtn, this)
//初始化道具信息 //初始化道具信息
this.updatePropNum(); this.updateScene();
//选择框 无需加入场景 //选择框 无需加入场景
var textureChoosed: egret.Texture = RES.getRes("chooseRect_png") var textureChoosed: egret.Texture = RES.getRes("chooseRect_png")
this.choosed = new eui.Image(textureChoosed); this.choosed = new eui.Image(textureChoosed);
...@@ -753,7 +753,7 @@ export default class MainScene extends Scene { ...@@ -753,7 +753,7 @@ export default class MainScene extends Scene {
/** /**
* 更新三个道具 * 更新三个道具
*/ */
updatePropNum() { updateScene() {
this.propBtnCon.boomBtn.propNumShow.count = getPropNums(PropType.BOOM); this.propBtnCon.boomBtn.propNumShow.count = getPropNums(PropType.BOOM);
this.propBtnCon.hammerBtn.propNumShow.count = getPropNums(PropType.HAMMER); this.propBtnCon.hammerBtn.propNumShow.count = getPropNums(PropType.HAMMER);
this.propBtnCon.stepBtn.propNumShow.count = getPropNums(PropType.CHANCE_NUM); this.propBtnCon.stepBtn.propNumShow.count = getPropNums(PropType.CHANCE_NUM);
...@@ -1020,7 +1020,7 @@ export default class MainScene extends Scene { ...@@ -1020,7 +1020,7 @@ export default class MainScene extends Scene {
//如果有返回数据,没有说明是网络问题,不发home //如果有返回数据,没有说明是网络问题,不发home
//更新道具数量 //更新道具数量
NetManager.ins.hc_home(() => { NetManager.ins.hc_home(() => {
this.updatePropNum(); this.updateScene();
}, window['collectRuleId']); }, window['collectRuleId']);
} }
}, prop) }, prop)
......
...@@ -295,7 +295,20 @@ export default class MapScene extends Scene { ...@@ -295,7 +295,20 @@ export default class MapScene extends Scene {
onAllPanelHide = () => { onAllPanelHide = () => {
if(!localStorage.getItem('activityguide')) { if(!localStorage.getItem('activityguide')) {
this['guide'].visible = true; NetManager.ins.hbRainBaseInfo((success, res) => {
if(!success) {
if(res.code == "600054" || res.code == "600055") {
this['guide'].visible = false;
}
return;
}
const data = res.data;
if(!data.currentSession && !data.nextSession) {
this['guide'].visible = false;
return;
}
this['guide'].visible = true;
});
} }
} }
......
...@@ -8,6 +8,7 @@ import setGlow from "../setGlow"; ...@@ -8,6 +8,7 @@ import setGlow from "../setGlow";
import getHomeData from "../getHomeData"; import getHomeData from "../getHomeData";
import { showToast2 } from "../../libs/new_wx/ctrls/toastCtrl2"; import { showToast2 } from "../../libs/new_wx/ctrls/toastCtrl2";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import MainScene from "../mainScene/MainScene";
export default class Buy1Panel extends Panel { export default class Buy1Panel extends Panel {
buyBtn: eui.Button buyBtn: eui.Button
...@@ -39,7 +40,12 @@ export default class Buy1Panel extends Panel { ...@@ -39,7 +40,12 @@ export default class Buy1Panel extends Panel {
this.buyBtn.enabled = true; this.buyBtn.enabled = true;
if (success) { if (success) {
this.hidePanel(); this.hidePanel();
showToast2(); if(SceneCtrl.instance.currentScene instanceof MainScene){
showToast('兑换成功');
}else {
showToast2();
}
NetManager.ins.hc_home(() => { NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene(); SceneCtrl.instance.updateScene();
}, window['collectRuleId']); }, window['collectRuleId']);
......
...@@ -8,6 +8,7 @@ import setGlow from "../setGlow"; ...@@ -8,6 +8,7 @@ import setGlow from "../setGlow";
import getHomeData from "../getHomeData"; import getHomeData from "../getHomeData";
import { showToast2 } from "../../libs/new_wx/ctrls/toastCtrl2"; import { showToast2 } from "../../libs/new_wx/ctrls/toastCtrl2";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import MainScene from "../mainScene/MainScene";
export default class Buy2Panel extends Panel { export default class Buy2Panel extends Panel {
onTouchTap_closeBtn(){ onTouchTap_closeBtn(){
...@@ -33,7 +34,11 @@ export default class Buy2Panel extends Panel { ...@@ -33,7 +34,11 @@ export default class Buy2Panel extends Panel {
NetManager.ins.hc_exchange((success) => { NetManager.ins.hc_exchange((success) => {
this.buyBtn.enabled = true; this.buyBtn.enabled = true;
if (success) { if (success) {
showToast2(); if(SceneCtrl.instance.currentScene instanceof MainScene){
showToast('兑换成功');
}else {
showToast2();
}
this.hidePanel(); this.hidePanel();
NetManager.ins.hc_home(() => { NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene(); SceneCtrl.instance.updateScene();
......
...@@ -8,6 +8,7 @@ import setGlow from "../setGlow"; ...@@ -8,6 +8,7 @@ import setGlow from "../setGlow";
import getHomeData from "../getHomeData"; import getHomeData from "../getHomeData";
import { showToast2 } from "../../libs/new_wx/ctrls/toastCtrl2"; import { showToast2 } from "../../libs/new_wx/ctrls/toastCtrl2";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import MainScene from "../mainScene/MainScene";
export default class Buy3Panel extends Panel { export default class Buy3Panel extends Panel {
onTouchTap_closeBtn(){ onTouchTap_closeBtn(){
...@@ -34,7 +35,11 @@ export default class Buy3Panel extends Panel { ...@@ -34,7 +35,11 @@ export default class Buy3Panel extends Panel {
NetManager.ins.hc_exchange((success) => { NetManager.ins.hc_exchange((success) => {
this.buyBtn.enabled = true; this.buyBtn.enabled = true;
if (success) { if (success) {
showToast2(); if(SceneCtrl.instance.currentScene instanceof MainScene){
showToast('兑换成功');
}else {
showToast2();
}
this.hidePanel(); this.hidePanel();
NetManager.ins.hc_home(() => { NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene(); SceneCtrl.instance.updateScene();
......
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