Commit 9408fa32 authored by wjf's avatar wjf

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

parents 5e5729df bd31a6b1
......@@ -409,6 +409,13 @@ export default class MainBase extends eui.UILayer {
});
});
}
hcRedBoobBaseInfo() {
return new Promise((r) => {
NetManager.ins.hc_redBombBaseInfo(async () => {
r();
});
});
}
hcHome() {
return new Promise((r) => {
......@@ -427,12 +434,14 @@ export default class MainBase extends eui.UILayer {
}
protected async createGameScene() {
window['getaward'] = NetManager.ins.hc_redBombAward;
await Promise.all([
this.getAd(),
this.ajaxElement(),
this.hcHome(),
this.hc_userInfo(),
this.getBackReward(),
this.hcRedBoobBaseInfo(),
]);
MapScene.adData = DataManager.ins.getData('hc_advert');
......
......@@ -875,6 +875,36 @@ export class NetManager extends ABNetManager {
this.send(net);
}
public hc_redBombBaseInfo(callback: Function ): void {
const net: INetData = {
name: 'hc_redBombBaseInfo',
uri: window['duiba'] + '/customActivity/happyclear/redBomb/baseInfo',
type: 'get',
dataType: 'json',
param: {
activityId: DataManager.ins.customCfgData.actId,
},
callback: callback
};
this.send(net);
}
public hc_redBombAward(callback: Function): void {
const net: INetData = {
name: 'hc_redBombAward',
uri: window['duiba'] + '/customActivity/happyclear/redBomb/award',
type: 'post',
dataType: 'json',
param: {
activityId: DataManager.ins.customCfgData.actId,
detect: window['detect'],
deviceSessionId: window['_device_session_id']
},
callback: callback
};
this.send(net);
}
public hc_getLevelInfo(callback: Function, getLevelInfo: number): void {
const net: INetData = {
name: 'hc_getLevelInfo',
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"hbcuttime","version":5,"files":["../assets/hbCutTime/hbCutTime_bg.png","../assets/hbCutTime/hbCutTime_btn_disable.png","../assets/hbCutTime/hbCutTime_btn_enable.png","../assets/hbCutTime/hbCutTime_cutLine_disable.png","../assets/hbCutTime/hbCutTime_cutLine_enable.png","../assets/hbCutTime/hbCutTime_rule_btn.png","../assets/hbCutTime/hbCutTime_btn_null.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"hbcuttime","version":5,"files":["../assets/hbCutTime/hbCutTime_bg.png","../assets/hbCutTime/hbCutTime_btn_disable.png","../assets/hbCutTime/hbCutTime_btn_enable.png","../assets/hbCutTime/hbCutTime_cutLine_disable.png","../assets/hbCutTime/hbCutTime_cutLine_enable.png","../assets/hbCutTime/hbCutTime_rule_btn.png"]}
\ No newline at end of file
......@@ -177,7 +177,7 @@
"name": "turntableprize"
},
{
"keys": "hbCutTime_bg_png,hbCutTime_btn_disable_png,hbCutTime_btn_enable_png,hbCutTime_cutLine_disable_png,hbCutTime_cutLine_enable_png,hbCutTime_rule_btn_png,hbCutTime_btn_null_png",
"keys": "hbCutTime_bg_png,hbCutTime_btn_disable_png,hbCutTime_btn_enable_png,hbCutTime_cutLine_disable_png,hbCutTime_cutLine_enable_png,hbCutTime_rule_btn_png",
"name": "hbcuttime"
},
{
......@@ -195,10 +195,6 @@
{
"keys": "redbagact_rule按钮_png,redbagactbtn_png,redbagact热门活动专区_png,redbagact退出按钮_png",
"name": "redbagactivity"
},
{
"keys": "hbRule_bg_png",
"name": "hbrule"
}
],
"resources": [
......@@ -3288,14 +3284,9 @@
"name": "maphot_png"
},
{
"url": "assets/hbRule/hbRule_bg.png",
"type": "image",
"name": "hbRule_bg_png"
},
{
"url": "assets/hbCutTime/hbCutTime_btn_null.png",
"url": "assets/redbagrule/redbagrule活动规则.png",
"type": "image",
"name": "hbCutTime_btn_null_png"
"name": "redbagrule活动规则_png"
},
{
"url": "assets/mainScene/festivalTargetBg.png",
......
......@@ -135,9 +135,9 @@
</e:Group>
<e:Group id="activitys" x="13.4" y="620.55">
<e:Group id="actIconsGroup" x="12.12" y="0" visible="false">
<e:Image source="map2+bg_png" x="-15.15" y="0"/>
<e:Image id="act1Btn" source="map2周一红包雨_png" x="8.27" y="157.5"/>
<e:Image id="act2Btn" source="map2红包大作战_png" x="163.76" y="159"/>
<e:Image source="map2+bg_png" x="-27.15" y="0"/>
<e:Image id="act1Btn" source="map2周一红包雨_png" x="4.27" y="157.5"/>
<e:Image id="act2Btn" source="map2红包大作战_png" x="157.76" y="159"/>
</e:Group>
<e:Image id="actsShowBtn" source="map2+_png" x="-7.64" y="5.45"/>
<e:Image source="maphot_png" x="91.52" y="15.72"/>
......
......@@ -112,7 +112,7 @@ export default class MapScene extends Scene {
const nowTimerStr2 = date.getTime() + '';
const oldTimerStr2 = localStorage.getItem('nowTimer2Str' + window['CFG'].consumerId);
const hc_advert = DataManager.ins.getData('hc_advert').data;
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
let { noticeAdvert } = hc_advert;
if (noticeAdvert == null) {
noticeAdvert = { enable: false }
......@@ -324,7 +324,7 @@ export default class MapScene extends Scene {
}
updateAdData() {
const hc_advert = DataManager.ins.getData('hc_advert').data;
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
let { mapAdvert } = hc_advert;
if (mapAdvert == null)
mapAdvert = { enable: false, advertList: [] }
......@@ -535,6 +535,7 @@ export default class MapScene extends Scene {
}
onTap_act1btn() {
PanelCtrl.instance.show("HbCutTime");
this.onTap_actsShowBtn();
}
onTap_guide() {
this['guide'].visible=false;
......@@ -542,6 +543,7 @@ export default class MapScene extends Scene {
}
onTap_act2btn() {
PanelCtrl.instance.show("HbCutTime");
this.onTap_actsShowBtn();
}
onTap_inviteBtn() {
......@@ -623,7 +625,7 @@ export default class MapScene extends Scene {
* 查询邀请信息
*/
getInviteInfo() {
const hc_advert = DataManager.ins.getData('hc_advert').data;
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
const { mapAdvert } = hc_advert;
// tslint:disable-next-line: cyclomatic-complexity
NetManager.ins.getInviteInfo((success, res) => {
......
......@@ -6,6 +6,7 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
import { DataManager } from "../../../libs/tw/manager/DataManager";
import { NetName } from "../../../libs/tw/enum/NetName";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import SceneCtrl from "../../../libs/new_wx/ctrls/sceneCtrl";
/**
* 红包雨主游戏
......@@ -66,6 +67,9 @@ export default class HbGame extends Panel {
private hbDoJoin() {
let session = DataManager.ins.getData(NetName.HBRAIN_BASEINFO).data.currentSession.sessionIndex;
NetManager.ins.hbRainDoJoin((success, res) => {
NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
const data = res.data;
const code = res.code;
if(!success) {
......
......@@ -46,9 +46,6 @@ export default class HbPrize extends Panel {
this['numsgroup'].visible = true;
this['money'].visible = true;
this['propnums'].text = 'x' + realValue;
NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene();
}, window['collectRuleId']);
break;
default:
this['img'].visible = true;
......
......@@ -6,6 +6,12 @@ const config = {
'/customActivity/happyclear/getBackReward': {
data: './happyclear/getBackReward.json'
},
'/customActivity/happyclear/redBomb/baseInfo': {
data: './happyclear/baseInfo.json'
},
'/customActivity/happyclear/redBomb/award': {
data: './happyclear/award.json'
},
'/customActivity/happyclear/bigWheel/baseInfo': {
data: './happyclear/turnablebaseInfo.json'
},
......
{
"code": "0000000000",
"data": {
"mapAdvert": {
"enable": true,
"advertList": [
{
"img": "//yun.duiba.com.cn/images/201910/2iu41if4n7.png",
"url": "https://cuxiao.m.suning.com/scms/s11dybys.html?adTypeCode=1137&adId=https%3A%2F%2Flib.suning.com%2Fweex%2Fs11dybys.js%3FpageCode%3Ds11dybys"
}
]
},
"noticeAdvert": {
"enable": true,
"advertList": [
{
"img": "//yun.duiba.com.cn/images/201910/zqtdp6xibw.jpg",
"url": "https://cuxiao.m.suning.com/scms/songshu.html"
}
]
},
"popupAdvert": { "enable": true,
"advertList": [
{
"img": "//yun.duiba.com.cn/images/201910/zqtdp6xibw.jpg",
"url": "https://cuxiao.m.suning.com/scms/songshu.html"
}
]}
},
"success": true,
"desc": "OK",
"timestamp": 1571913337116
}
\ No newline at end of file
{"success":true,"code":"0000000000","desc":"OK","timestamp":1572957051094,"data":null}
\ No newline at end of file
{
"code":"0000000000",
"data":{
"option":{
"appItemId":2322,
"categoryType":1,
"coinType":1,
"img":"1",
"maxValue":2,
"minValue":1,
"name":"测试商品",
"num":3,
"propType":2,
"rate":"概率",
"title":"商品信息",
"value":"虚拟商品标识符"
},
"orderNum":"1234232546",
"remainAwardTimes":1
},
"desc":"OK",
"success":true,
"timestamp":1572923678758
}
\ No newline at end of file
{
"code":"0000000000",
"data":1,
"desc":"OK",
"success":true,
"timestamp":1572923489898
}
\ No newline at end of file
......@@ -2,20 +2,20 @@
"success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1572945948033,
"timestamp": 1572958024679,
"data": {
"option": {
"id": "218",
"id": "224",
"day": null,
"categoryType": 2,
"title": "10",
"rate": "10",
"categoryType": 3,
"title": "炸弹",
"rate": "50",
"minValue": null,
"maxValue": null,
"coinType": null,
"realValue": null,
"propType": null,
"num": 4,
"propType": 3,
"num": null,
"img": "",
"appItemId": null,
"name": "",
......
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