Commit 7c4c9d0a authored by wjf's avatar wjf

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

parents da5f9a1f 5f39409f
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood","version":5,"files":["../assets/blood/blood体力补济站.png","../assets/blood/blood按钮.png","../assets/blood/blood按钮 副本1.png","../assets/blood/blood按钮 副本.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood","version":5,"files":["../assets/blood/blood体力补济站.png","../assets/blood/blood按钮.png","../assets/blood/blood按钮 副本1.png","../assets/blood/blood按钮 副本.png","../assets/blood/blood去分享.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood2","version":5,"files":["../assets/blood2/blood2按钮 副本1.png","../assets/blood2/blood2按钮 副本.png","../assets/blood2/blood2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood2","version":5,"files":["../assets/blood2/blood2按钮 副本1.png","../assets/blood2/blood2按钮 副本.png","../assets/blood2/blood2.png","../assets/blood2/blood2去分享按钮.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/blood/blood去分享.png","../assets/blood2/blood2去分享按钮.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"turntable","version":5,"files":["../assets/turntable/turntable_bg.png","../assets/turntable/turntable_panel.png","../assets/turntable/turntable_startbtn.png","../assets/turntable/turntable_rulebtn.png","../assets/turntable/turnable_icon1.png","../assets/turntable/turnable_icon2.png","../assets/turntable/turnable_icon3.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"turntable","version":5,"files":["../assets/turntable/turnable_icon1.png","../assets/turntable/turnable_icon2.png","../assets/turntable/turnable_icon3.png","../assets/turntable/turntable_bg.png","../assets/turntable/turntable_panel.png","../assets/turntable/turntable_rulebtn.png","../assets/turntable/turntable_startbtn.png","../assets/turntable/turntable_oupon.png","../assets/turntable/turntable_prop.png","../assets/turntable/turntable_scratch.png","../assets/turntable/turntable_thanks.png","../assets/turntable/turntable_wealth.png","../assets/turntable/turntable_gameTime.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"turntableprize","version":5,"files":["../assets/turntableprize/turprize继续闯关按钮.png","../assets/turntableprize/turprizebg.png","../assets/turntableprize/turnprize_icon1.png","../assets/turntableprize/turnprize_icon2.png","../assets/turntableprize/turnprize_icon3.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"turntableprize","version":5,"files":["../assets/turntableprize/turnprize_icon1.png","../assets/turntableprize/turnprize_icon2.png","../assets/turntableprize/turnprize_icon3.png","../assets/turntableprize/turprizebg.png","../assets/turntableprize/turprize继续闯关按钮.png"]}
\ No newline at end of file
......@@ -45,7 +45,7 @@
"name": "fail"
},
{
"keys": "blood体力补济站_png,blood按钮_png,blood按钮 副本1_png,blood按钮 副本_png",
"keys": "blood体力补济站_png,blood按钮_png,blood按钮 副本1_png,blood按钮 副本_png,blood去分享_png",
"name": "blood"
},
{
......@@ -65,7 +65,7 @@
"name": "startpanel"
},
{
"keys": "blood2按钮 副本1_png,blood2按钮 副本_png,blood2_png",
"keys": "blood2按钮 副本1_png,blood2按钮 副本_png,blood2_png,blood2去分享按钮_png",
"name": "blood2"
},
{
......@@ -169,7 +169,7 @@
"name": "turntableprize2"
},
{
"keys": "turnable_icon1_png,turnable_icon2_png,turnable_icon3_png,turntable_bg_png,turntable_panel_png,turntable_rulebtn_png,turntable_startbtn_png",
"keys": "turnable_icon1_png,turnable_icon2_png,turnable_icon3_png,turntable_bg_png,turntable_panel_png,turntable_rulebtn_png,turntable_startbtn_png,turntable_oupon_png,turntable_prop_png,turntable_scratch_png,turntable_thanks_png,turntable_wealth_png,turntable_gameTime_png",
"name": "turntable"
},
{
......@@ -2782,6 +2782,46 @@
"url": "assets/turntableprize/turprize继续闯关按钮.png",
"type": "image",
"name": "turprize继续闯关按钮_png"
},
{
"url": "assets/turntable/turntable_oupon.png",
"type": "image",
"name": "turntable_oupon_png"
},
{
"url": "assets/turntable/turntable_prop.png",
"type": "image",
"name": "turntable_prop_png"
},
{
"url": "assets/turntable/turntable_scratch.png",
"type": "image",
"name": "turntable_scratch_png"
},
{
"url": "assets/turntable/turntable_thanks.png",
"type": "image",
"name": "turntable_thanks_png"
},
{
"url": "assets/turntable/turntable_wealth.png",
"type": "image",
"name": "turntable_wealth_png"
},
{
"url": "assets/turntable/turntable_gameTime.png",
"type": "image",
"name": "turntable_gameTime_png"
},
{
"url": "assets/blood/blood去分享.png",
"type": "image",
"name": "blood去分享_png"
},
{
"url": "assets/blood2/blood2去分享按钮.png",
"type": "image",
"name": "blood2去分享按钮_png"
}
]
}
\ No newline at end of file
......@@ -25,6 +25,14 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="inviteBtn2" label="" x="439.08" y="621.6">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="blood2去分享按钮_png" source.down="blood2去分享按钮_png" source.disabled="blood2去分享按钮_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="bloodTxt" text="你的可用体力值为:5" y="299.92" horizontalCenter="0" textColor="0xf54500" size="33"/>
<e:Label id="countdownTxt" text="距离下一次体力补给时间:" y="753.76" size="22" width="509" horizontalCenter="0.5" verticalAlign="middle" textAlign="center" textColor="0x86533a"/>
<e:Label text="元宝兑换得体力" y="492.08" size="26" x="218.88" textColor="0xc33700"/>
......
......@@ -37,6 +37,14 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="inviteBtn2" label="" x="433" y="635">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="blood去分享_png" source.down="blood按钮 副本1_png" source.disabled="blood按钮 副本1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="bloodTxt" text="你的可用体力值为:5" y="303.92" horizontalCenter="0" textColor="0xF54500" size="33"/>
<e:Label id="countdownTxt" text="距离下一次体力补给时间:" y="753.76" size="22" width="509" horizontalCenter="0.5" verticalAlign="middle" textAlign="center" textColor="0x86533A"/>
</e:Skin>
\ No newline at end of file
......@@ -38,7 +38,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="btnLabel" text="Label" size="20" verticalCenter="30.5" verticalAlign="middle" textAlign="center" bold="true" horizontalCenter="0"/>
<e:Label id="btnLabel" text="Label" size="20" verticalCenter="30.5" verticalAlign="middle" textAlign="center" bold="true" horizontalCenter="0" touchEnabled="false"/>
</e:Group>
<e:Button id="closeBtn" label="" y="292.88" x="565.89">
<e:skinName>
......
......@@ -13,8 +13,8 @@ export default class H52Scene extends Scene {
// PanelCtrl.instance.show('inviterule')
// },this);
this['gobtn'].addEventListener(egret.TouchEvent.TOUCH_TAP,()=>{
const code = Utils.getRequestByKey('shareCode2');
window.location.href = `${window['targetUrl']}&shareCode2=${code}`
const code = Utils.getRequestByKey('shareCode');
window.location.href = `${window['targetUrl']}&shareCode=${code}`
},this);
}
......
......@@ -42,8 +42,7 @@ export default class MapScene extends Scene {
sendInvite() {
const code = Utils.getRequestByKey('shareCode');
const code2 = Utils.getRequestByKey('shareCode2');
if(!code && !code2) return;
if(!code) return;
const dojoin = DataManager.ins.getData('hc_doJoin');
if(!dojoin) return;
if(doHelpFlag) {
......@@ -60,10 +59,11 @@ export default class MapScene extends Scene {
if(!success) { return; }
showToast("助力成功");
};
if(code) {
if(code.indexOf("12345678") == -1){ // 邀请有礼
NetManager.ins.doHelp(callBack, code, dojoin.data);
} else if(code2) {
NetManager.ins.scratchDoHelp(callBack, code2);
} else { // 刮刮卡
let _code = code.slice(8);
NetManager.ins.scratchDoHelp(callBack, _code);
}
}
......@@ -84,10 +84,6 @@ export default class MapScene extends Scene {
GDispatcher.dispatchEvent("getInviteInfo"); // 查询邀请信息,控制邀请有礼角标
this['avatar'].mask = this['avatarMask'];
setTimeout(() => {
// PanelCtrl.instance.show('failed');
}, 1000);
if(getBgOn() && MapScene['firstPlayBgTag'] == true) {
playBg();
}
......@@ -118,8 +114,8 @@ export default class MapScene extends Scene {
localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2);
}
const backData = DataManager.ins.getData('hc_getBackReward').data;
if(backData) {
const backData = DataManager.ins.getData('hc_getBackReward');
if(backData.data) {
panels.push('back');
}
......@@ -604,6 +600,7 @@ export default class MapScene extends Scene {
break;
case (flag == 6): // 无入口
this["inviteGroup"].visible = false;
this['adBtn'].y = 323.76;
break;
default:
break;
......
......@@ -3,6 +3,8 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
import getHomeData from "../../getHomeData";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
// import { loadTurntableSvga } from "../../panels/TurntablePanel/Turntable";
export default class TurntableIcon extends IconBase {
......@@ -12,13 +14,31 @@ export default class TurntableIcon extends IconBase {
protected start() {
super.start();
//有免费次数
//没有免费次数
//如果元宝足够
this.updateIcon();
}
updateIcon(){
NetManager.ins.hc_turnableBaseInfo((success, res)=>{
if(!success){
return;
}
let data = res.data;
if (data.remainTimes > 0 || (getHomeData().wealth > data.nextTimeNeedCoin)) {
this.tipsVisible = true;
this.iconTips.text = "有优惠"
} else {
this.tipsVisible = false;
}
})
}
protected initEvents() {
super.initEvents();
GDispatcher.addEvent('updateTurntableIcon', this.updateIcon, this);
}
protected onTouchBtn(e: egret.TouchEvent) {
......@@ -31,6 +51,7 @@ export default class TurntableIcon extends IconBase {
protected removeEvents() {
super.removeEvents();
GDispatcher.removeEvent('updateTurntableIcon', this.updateIcon, this);
}
protected destory() {
......
......@@ -8,14 +8,14 @@ export default class BackPanel extends Panel {
super.start();
this.showlog();
addAdComp(84, 806.52, this)
const backData = DataManager.ins.getData('hc_getBackReward');
this.updateOption(backData.data);
backData.data =null;
}
showlog(){
// NetManager.ins.showLog(getlogItem(3));
// NetManager.ins.showLog(getlogItem(4));
const {data}=DataManager.ins.getData('hc_getBackReward');
this.updateOption(data);
}
initEvents() {
......@@ -52,6 +52,6 @@ export default class BackPanel extends Panel {
}
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
protected get closeBtns(): eui.Button[] { return [this['closeBtn'],this['inviteBtn']] }
get skinKey() { return 'Back' }
}
\ No newline at end of file
......@@ -38,9 +38,10 @@ export default class BloodPanel extends Panel {
this['bloodTxt'].text = `你的可用体力值为:${homeData.remainEnargy}`;
const data = getHomeData();
this['invitTxt'].text = `(已领0/1)`;
if (data.askForEnergy)
if (data.askForEnergy){
this['invitTxt'].text = `(已领1/1)`;
this['inviteBtn2'].visible=true;
}
if(data.remainEnargy >= BLOOD_NUMS_MAX) { //满了
this['bloodTxt'].text = `你的可用体力值为:${homeData.remainEnargy}`;
this._countDown.stop();
......@@ -59,6 +60,7 @@ export default class BloodPanel extends Panel {
initEvents() {
super.initEvents();
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
this['inviteBtn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
this['buyBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapBuy, this)
}
......
......@@ -56,6 +56,7 @@ this['price1Txt'].text =`${ window['price1']}个元宝=1个体力值`;
initEvents() {
super.initEvents();
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
this['inviteBtn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
this['buyBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapBuy, this)
}
......
......@@ -8,7 +8,7 @@ import CutTimer from "../CutTimer";
import Utils from "../Utils";
import { DataManager } from "../../libs/tw/manager/DataManager";
export default class ScratchPanel extends Panel {
export default class iScratchPanel extends Panel {
private cutTimer: CutTimer;
constructor(data) {
......@@ -220,17 +220,18 @@ class ScratchItem extends eui.ItemRenderer {
if(!success) {
return;
}
let shareCode2 = res.data; // 分享码
CFG.wxShareLink = window['h5URL'] + "&shareCode2=" + shareCode2; // 分享链接
CFG.wxShareTitle = '狮狮连萌超好玩~我已经玩到第一了!';
CFG.wxShareDesc = '我在萌狮消消乐等你来挑战哦';
let shareCode = res.data; // 分享码
let code = "12345678" + shareCode;
CFG.wxShareLink = window['h5URL2'] + "&shareCode=" + code; // 分享链接
CFG.wxShareTitle = '狮狮已向你快递了一个宝箱,请点击查收!';
CFG.wxShareDesc = '超好玩的萌狮消消乐,快来和我一起玩吧~';
CFG.wxShareImg = "http://yun.duiba.com.cn/db_games/xiaoxiaole2.jpg";
if(iswx()) { //微信端
this.data.wxShareTip.visible = true;
window["invokeWX"]();
} else {//端内
this.data.wxShareTip.visible = false;
window["inviteShare"](shareCode2);
window["scratchShare"](code);
}
}, this.data.scratchTaskId);
}, this);
......
......@@ -117,13 +117,18 @@ export default class Turntable extends Panel {
// if(!success) {
// return;
// }
GDispatcher.dispatchEvent('updateTurntableIcon'); // 更新icon
const data = res.data;
const code = res.code;
let id = data.option.categoryType;
let id;
if(!success || !data.option) {
id = "thanks";
} else if(data.isScratchCard) {
id = "scratch";
}else {
id = data.option.categoryType;
}
this.rotateByPrize(id, () => {
if(!success) {
......@@ -255,31 +260,31 @@ export default class Turntable extends Panel {
let prizeImg = "";
switch(v.categoryType) {
case "scratch":
prizeImg = "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/object.png";
prizeImg = "turntable_scratch_png";
break;
case "thanks":
prizeImg = "//yun.duiba.com.cn/upload/uP99F1462438316972.png";
prizeImg = "turntable_thanks_png";
break;
case 1:
prizeImg = "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/alipay.png";
prizeImg = "turntable_thanks_png";
break;
case 2:
prizeImg = "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/qb.png";
prizeImg = "turntable_gameTime_png";
break;
case 3:
prizeImg = `turnable_icon${v.propType}_png`;
break;
case 4:
prizeImg = "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/object.png";
prizeImg = "turntable_wealth_png";
break;
case 5:
prizeImg = "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/alipay.png";
prizeImg = "turntable_oupon_png";
break;
case 6:
prizeImg = "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/qb.png";
prizeImg = "turntable_oupon_png";
break;
case 7:
prizeImg = "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/phonebill.png";
prizeImg = "turntable_oupon_png";
break;
default:
......@@ -296,6 +301,6 @@ export default class Turntable extends Panel {
}
});
console.log(RotaryData);
// console.log(RotaryData);
}
}
\ No newline at end of file
{
"success": true,
"code": null,
"desc": null,
"timestamp": 1566199822308,
"code": "0000000000",
"desc": "OK",
"timestamp": 1572249599076,
"data": {
"invitationId": "活动id",
"invitationCount": 5,
"img": "http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg",
"sysTime": 1570673808000,
"endTime": 1570673810000,
"invitationUser": [
{
"nickname": "nickname",
"avatar": "http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
},
{
"nickname": "nickname",
"avatar": null
}
],
"completeFlag": 0,
"openPrizeMsg": "图片",
"prizeType": "nickname",
"prizeName": "nickname",
"prizeImg": "http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg",
"facePrice": "avatar"
"invitationId": null,
"invitationCount": null,
"sysTime": null,
"endTime": null,
"completeFlag": 6,
"openPrizMsg": null,
"prizeType": null,
"prizeName": null,
"prizeImg": null,
"facePrice": null,
"invitationUser": null
}
}
\ No newline at end of file
......@@ -372,7 +372,7 @@
"num": 3
}
],
"remainEnargy": 9979,
"remainEnargy": 10,
"askForEnergy": false,
"canReceiveTreasureBoxNum": 0,
"nextRangeStarsNum": 150
......
......@@ -623,7 +623,7 @@
}
],
"remainEnargy": 1,
"askForEnergy": true,
"askForEnergy":false,
"canReceiveTreasureBoxNum": 0,
"nextRangeStarsNum": 0,
"isGetAllTreasureBox": true,
......
{
"code":"600015",
"data":{
"isScratchCard":false,
"option":{
"completePercent":"99",
"prizeImage":"",
"remainPercent":"剩余进度",
"scratchCardTaskId":1,
"categoryType":4,
"title":"奖品信息",
"coinType":1,
"maxValue":10,
"minValue":10,
"appItemId":2099,
"img":"http://yun.duiba.com.cn/db_games/1022/111.png",
"name":"虚拟商品名称",
"value":"虚拟商品编码",
"num":10,
"propType":1
},
"orderNum":"24487583"
},
"desc":"OK",
"success":true,
"timestamp":1572061348762
"success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1572262646931,
"data": {
"isScratchCard": false,
"option": null,
"orderNum": null
}
}
\ No newline at end of file
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