Commit a728ed0e authored by wjf's avatar wjf

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

parents c6b66336 e929f92f
......@@ -349,6 +349,8 @@ export default class MainBase extends eui.UILayer {
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga');
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga');
loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga');
RES.getResAsync('FZY4JW_TTF');
RES.getResAsync('FZY3JW_1_TTF');
}
catch (e) {
console.error(e);
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"scratch","version":5,"files":["../assets/scratch/scratch_bg.png","../assets/scratch/scratch_hongbao.png","../assets/scratch/scratch_help.png","../assets/scratch/scratch_progress_bg.png","../assets/scratch/scratch_wx_tip.png","../assets/scratch/scratchbg2.png","../assets/scratch/scratch_invite.png","../assets/scratch/scratch_card_90.png","../assets/scratch/scratch_card_96.png","../assets/scratch/scratch_card_94.png","../assets/scratch/scratch_card_98.png","../assets/scratch/scratch_user1.png","../assets/scratch/scratch_card_bg.png","../assets/scratch/scratch_card_92.png","../assets/scratch/scratch_user2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"scratch","version":5,"files":["../assets/scratch/scratch_bg.png","../assets/scratch/scratch_hongbao.png","../assets/scratch/scratch_help.png","../assets/scratch/scratch_progress_bg.png","../assets/scratch/scratch_wx_tip.png","../assets/scratch/scratchbg2.png","../assets/scratch/scratch_invite.png","../assets/scratch/scratch_card_90.png","../assets/scratch/scratch_card_96.png","../assets/scratch/scratch_card_94.png","../assets/scratch/scratch_card_98.png","../assets/scratch/scratch_user1.png","../assets/scratch/scratch_card_bg.png","../assets/scratch/scratch_card_92.png","../assets/scratch/scratch_user2.png","../assets/scratch/scratch_mask.png"]}
\ No newline at end of file
......@@ -129,7 +129,7 @@
"name": "friendshare"
},
{
"keys": "scratch_bg_png,scratch_hongbao_png,scratch_help_png,scratch_progress_bg_png,scratch_wx_tip_png,scratchbg2_png,scratch_invite_png,scratch_card_90_png,scratch_card_96_png,scratch_card_94_png,scratch_card_98_png,scratch_user1_png,scratch_card_bg_png,scratch_card_92_png,scratch_user2_png",
"keys": "scratch_bg_png,scratch_hongbao_png,scratch_help_png,scratch_progress_bg_png,scratch_wx_tip_png,scratchbg2_png,scratch_invite_png,scratch_card_90_png,scratch_card_96_png,scratch_card_94_png,scratch_card_98_png,scratch_user1_png,scratch_card_bg_png,scratch_card_92_png,scratch_user2_png,scratch_mask_png",
"name": "scratch"
},
{
......@@ -2917,6 +2917,11 @@
"url": "assets/common/FZY4JW.TTF",
"type": "bin",
"name": "FZY4JW_TTF"
},
{
"url": "assets/scratch/scratch_mask.png",
"type": "image",
"name": "scratch_mask_png"
}
]
}
\ No newline at end of file
......@@ -4,5 +4,5 @@
<e:Image id="hammer" source="bag_icon2_png" horizontalCenter="-6" verticalCenter="0.5" visible="false"/>
<e:Image id="boom" source="bag_icon1_png" horizontalCenter="0" verticalCenter="0" visible="false"/>
<e:Image id="change" source="bag_icon3_png" horizontalCenter="0" verticalCenter="0" visible="false"/>
<e:Label id="nums" text="15" textColor="0xc33700" right="10" bottom="10"/>
<e:Label id="nums" text="15" textColor="0xc33700" right="10" bottom="10" fontFamily="FZY3JW"/>
</e:Skin>
\ No newline at end of file
......@@ -4,11 +4,10 @@
<w:Config id="16dd8f58b77" visible="false"/>
<e:Image id="light2" x="376" y="317" anchorOffsetX="356" anchorOffsetY="296" source="scratchbg2_png"/>
<e:Image id="light1" x="376" y="317" anchorOffsetX="356" anchorOffsetY="296" source="scratchbg2_png"/>
<e:Group id="con" y="58.03"/>
<e:Label id="numLabel" text="共2位好友帮你刮了90.3%" y="381.33" textColor="0xF54500" size="28" horizontalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="z2"/>
<e:Group id="con" y="53.03"/>
<e:Label id="numLabel" text="共2位好友帮你刮了90.3%" y="381.33" textColor="0xF54500" size="27" horizontalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW"/>
<e:Image y="414" horizontalCenter="0" source="scratch_card_bg_png"/>
<e:Image id="prizeImg" y="435" source="" width="510" height="228" horizontalCenter="0"/>
<e:Image id="scratch_progress" y="414" horizontalCenter="0" x="10" source="scratch_card_90_png"/>
<e:Button id="closeBtn" label="" x="605" y="219.33">
<e:skinName>
<e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing">
......@@ -26,7 +25,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="cutTimeLabel" text="将在23:43:21后失效" y="895.33" size="28" textColor="0xffffff" horizontalCenter="0.5" fontFamily="z2" bold="true"/>
<e:Label id="cutTimeLabel" text="将在23:43:21后失效" y="895.33" size="28" textColor="0xffffff" horizontalCenter="0.5" fontFamily="FZY3JW"/>
<e:Label text="帮刮\n记录" y="805" size="28" textColor="0xFFFFFF" horizontalCenter="-248"/>
<e:Scroller width="487" height="90" y="783" anchorOffsetX="0" anchorOffsetY="0" horizontalCenter="32.5">
<e:Group anchorOffsetX="0" y="2">
......@@ -49,7 +48,7 @@
<e:Group id="progressGroup" x="8" verticalCenter="0">
<e:Image id="progressBg" source="scratch_progress_bg_png" anchorOffsetX="0" anchorOffsetY="0" x="0" y="0" width="437" height="22"/>
<e:Rect id="progress" fillColor="0xeb1917" left="0" verticalCenter="0" width="0" top="0" bottom="0"/>
<e:Label id="progressLabel" text="仅剩90.7%" size="18" verticalCenter="2" horizontalCenter="0.5" bold="true" verticalAlign="middle" textAlign="center" fontFamily="z2"/>
<e:Label id="progressLabel" text="仅剩90.7%" size="18" verticalCenter="2" horizontalCenter="0.5" bold="true" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW"/>
</e:Group>
<e:Image id="hongbao" source="scratch_hongbao_png" scaleX="1" scaleY="1" verticalCenter="0" horizontalCenter="219"/>
</e:Group>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="StartSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16705cb4eec"/>
<e:Label id="FZYTW3" text="1" y="1048" textColor="0x244B00" fontFamily="FZYTW3" horizontalCenter="0"/>
<e:Label id="FZYTW4" text="1" y="1048" textColor="0x244B00" fontFamily="FZYTW4" horizontalCenter="0"/>
<e:Label id="FZY3JW" text=" " y="1048" textColor="0x244B00" fontFamily="FZY3JW" horizontalCenter="0" visible="false"/>
<e:Label id="FZY4JW" text=" " y="1048" textColor="0x244B00" fontFamily="FZY4JW" horizontalCenter="0" visible="false"/>
<e:Component id="container1" width="20" height="20" x="0" y="0"/>
<e:Component id="container2" width="20" height="20" x="0" y="0"/>
<e:Group x="140" y="1023.94">
......
import Scene from "../libs/new_wx/components/Scene";
import Utils from "./Utils";
import PanelCtrl from "../libs/new_wx/ctrls/panelCtrl";
import { NetManager } from "../libs/tw/manager/NetManager";
import { getlogItem } from "./Main";
export default class H52Scene extends Scene {
async start(data?) {
NetManager.ins.showLog(getlogItem(51));
super.start();
this['group'].y = (this.stage.stageHeight -1624)/2
// this.height=this.stage.stageHeight;
......@@ -13,6 +16,7 @@ export default class H52Scene extends Scene {
// PanelCtrl.instance.show('inviterule')
// },this);
this['gobtn'].addEventListener(egret.TouchEvent.TOUCH_TAP,()=>{
NetManager.ins.clickLog(getlogItem(51));
const code = Utils.getRequestByKey('shareCode');
window.location.href = `${window['targetUrl']}&shareCode=${code}`
},this);
......
......@@ -29,7 +29,7 @@ export default class AdSmallComp extends ComponentBase {
this['img'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(data.logid)
NetManager.ins.showLog(getlogItem(data.logid));
NetManager.ins.clickLog(getlogItem(data.logid));
wait(50).then(()=>{
window.location.href = result.url;
});
......
......@@ -26,6 +26,7 @@ import ScratchIcon from "./icon/ScratchIcon";
import TurntableIcon from "./icon/TurntableIcon";
let doHelpFlag = false;
let doScratchHelpFlag = false;
// let adTag = false;
export default class MapScene extends Scene {
static adData;
......@@ -43,12 +44,12 @@ export default class MapScene extends Scene {
sendInvite() {
const code = Utils.getRequestByKey('shareCode');
if(!code) return;
const dojoin = DataManager.ins.getData('hc_doJoin');
if(!dojoin) return;
if(doHelpFlag) {
return;
}
if(code.indexOf("12345678") == -1){ // 邀请有礼
const dojoin = DataManager.ins.getData('hc_doJoin');
if(!dojoin) return;
NetManager.ins.doHelp((success, res) => {
doHelpFlag = true;
switch(true) {
......@@ -73,6 +74,7 @@ export default class MapScene extends Scene {
}
if(!success) { return; }
showToast("帮刮成功!");
NetManager.ins.showLog(getlogItem(52));
NetManager.ins.showLog(getlogItem(36));
}, _code);
}
......@@ -301,7 +303,7 @@ export default class MapScene extends Scene {
if(mapAdvert == null)
mapAdvert = {enable: false, advertList: []}
this['adBtn'].visible = mapAdvert.enable;
if(this['adBtn']) {
if(this['adBtn'].visible) {
NetManager.ins.showLog(getlogItem(32));
}
if(mapAdvert.enable) {
......
......@@ -8,12 +8,14 @@ import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
import Utils from "../../Utils";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
import { getlogItem } from "../../Main";
export default class ScratchIcon extends IconBase {
private cutTimer: CutTimer = null;
constructor(name: string, group: eui.Group, btn: eui.Button, tipsBg?: eui.Image, tipsLabel?: eui.Label) {
super(name, group, btn, tipsBg, tipsLabel);
NetManager.ins.showLog(getlogItem(49));
}
protected start() {
......@@ -64,6 +66,7 @@ export default class ScratchIcon extends IconBase {
*/
protected onTouchBtn(e: egret.TouchEvent) {
super.onTouchBtn(e);
NetManager.ins.showLog(getlogItem(49));
NetManager.ins.scratchGetTaskInfo((success, res) => {
if(!success) {
return;
......
......@@ -11,11 +11,11 @@ import { getlogItem } from "../../Main";
export default class TurntableIcon extends IconBase {
constructor(name: string, group: eui.Group, btn: eui.Button, tipsBg?: eui.Image, tipsLabel?: eui.Label) {
super(name, group, btn, tipsBg, tipsLabel);
NetManager.ins.showLog(getlogItem(43));
}
protected start() {
super.start();
NetManager.ins.showLog(getlogItem(43));
//有免费次数
//没有免费次数
//如果元宝足够
......@@ -23,8 +23,8 @@ export default class TurntableIcon extends IconBase {
}
updateIcon(){
NetManager.ins.clickLog(getlogItem(43));
NetManager.ins.hc_turnableBaseInfo((success, res)=>{
NetManager.ins.clickLog(getlogItem(43));
if(!success){
this.visible = false;
return;
......
......@@ -32,14 +32,14 @@ export default class BagPanel extends Panel {
this['btn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this['group1'].visible = true;
this['group2'].visible = false;
NetManager.ins.clickLog(getlogItem(39));
NetManager.ins.showLog(getlogItem(39));
}, this);
this['recordbtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
window.location.href = window['__link__'];
}, this);
this['shopbtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
PanelCtrl.instance.show('Shop');
NetManager.ins.showLog(getlogItem(39));
NetManager.ins.clickLog(getlogItem(39));
}, this);
this.list.itemRenderer=BagItemRenderer;
......
......@@ -23,7 +23,7 @@ export default class InvitePrizePanel extends Panel {
start() {
super.start();
NetManager.ins.showLog(getlogItem(38));
NetManager.ins.showLog(getlogItem(37));
}
protected onSkinComplete() {
......@@ -60,7 +60,7 @@ export default class InvitePrizePanel extends Panel {
}
onTapGoPrize() {
NetManager.ins.showLog(getlogItem(37));
NetManager.ins.clickLog(getlogItem(37));
window.location.href = window['__link__'];
}
......
......@@ -7,18 +7,59 @@ import ScratchRulePanel from "./ScratchRulePanel";
import CutTimer from "../CutTimer";
import Utils from "../Utils";
import { DataManager } from "../../libs/tw/manager/DataManager";
import GradientType = egret.GradientType;
import { getlogItem } from "../Main";
export default class ScratchPanel extends Panel {
private cutTimer: CutTimer;
private myShape: egret.Shape = new egret.Shape();
constructor(data) {
super();
this.data = data;
}
private pIndex = 0;
setGtaphics(x, y) {
setTimeout(() => {
if(this.pIndex % 2 == 0){ // 双数
y -= 25;
if(y <= this["prizeImg"].y){
this.pIndex++;
}
}else { // 单数
y += 25;
if(y >= (this["prizeImg"].y + this["prizeImg"].height)){
this.pIndex++;
}
}
x += 5;
this.myShape.graphics.lineTo(x, y);
if(x > (+this.data.completePercent) / 100 * this["prizeImg"].width){
return;
}
this.setGtaphics(x, y);
}, 20);
}
async start(data) {
super.start();
this.showlog();
this.initUI();
this.myShape.graphics.beginFill(0xff0000, 0);
this.myShape.graphics.drawRect(this["prizeImg"].x, this["prizeImg"].y, this["prizeImg"].width, this["prizeImg"].height);
this.myShape.graphics.endFill();
this.addChild(this.myShape);
this["prizeImg"].mask = this.myShape;
this.myShape.graphics.lineStyle(130, 0xff0000, 1);
this.myShape.graphics.moveTo(this["prizeImg"].x - 30, this["prizeImg"].y + this["prizeImg"].width);
setTimeout(()=>{
this.setGtaphics(this["prizeImg"].x, this["prizeImg"].y + this["prizeImg"].height);
}, 500);
const scratchData = DataManager.ins.getData('hc_turnableDojoin');
this['light1'].visible = this['light2'].visible = false;
......@@ -42,7 +83,7 @@ export default class ScratchPanel extends Panel {
}
showlog() {
NetManager.ins.showLog(getlogItem(50));
}
initEvents() {
......@@ -76,7 +117,7 @@ export default class ScratchPanel extends Panel {
}
protected onSkinComplete() {
this.getGameRes().then(r => this.initUI());
}
initUI() {
......@@ -148,24 +189,24 @@ export default class ScratchPanel extends Panel {
let _duration = 1000 * dProgress / 100; // 算出变化的时间
egret.Tween.get(this["progress"]).to({width: _width}, _duration);
let i = new eui.Image();
if(progress >= 100) {
this["scratch_progress"].visible = false;
} else if(progress >= 98 && progress < 100) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_98_png";
} else if(progress >= 96 && progress < 98) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_96_png";
} else if(progress >= 94 && progress < 96) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_94_png";
} else if(progress >= 92 && progress < 96) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_92_png";
} else if(progress < 92) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_90_png";
}
// if(progress >= 100) {
// this["scratch_progress"].visible = false;
// } else if(progress >= 98 && progress < 100) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_98_png";
// } else if(progress >= 96 && progress < 98) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_96_png";
// } else if(progress >= 94 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_94_png";
// } else if(progress >= 92 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_92_png";
// } else if(progress < 92) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_90_png";
// }
}
private setWXShareTip() {
......@@ -221,6 +262,7 @@ class ScratchItem extends eui.ItemRenderer {
let s = this.data.avatar || "http://yun.duiba.com.cn/db_games/default_avatar.png";
this.img.source = this.data.avatar || "http://yun.duiba.com.cn/db_games/default_avatar.png";
this.img.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(50));
NetManager.ins.scratchGetShareCode((success, res) => {
if(!success) {
return;
......
......@@ -24,6 +24,7 @@ export default class ScratchPrizePanel extends Panel {
start() {
super.start();
this.initUI();
NetManager.ins.showLog(getlogItem(53));
NetManager.ins.showLog(getlogItem(54));
}
......@@ -51,6 +52,7 @@ export default class ScratchPrizePanel extends Panel {
super.onTouchTap_closeBtn();
break;
case (e.target == this.ok_btn): // 去领奖
NetManager.ins.clickLog(getlogItem(53));
window.location.href = window['__link__'];
break;
case (e.target == this.game_btn): // 继续闯关
......
{
"code": "0000000000",
"data": {
"mapAdvert": {
"mapAdvert1": {
"enable": true,
"advertList": [
{
......@@ -10,7 +10,7 @@
}
]
},
"noticeAdvert": {
"noticeA1dvert": {
"enable": true,
"advertList": [
{
......@@ -19,7 +19,7 @@
}
]
},
"popupAdvert": { "enable": true,
"popupAd1vert": { "enable": true,
"advertList": [
{
"img": "//yun.duiba.com.cn/images/201910/zqtdp6xibw.jpg",
......
......@@ -16,6 +16,6 @@
"value":"虚拟商品标识符"
},
"desc":"OK",
"success":true,
"success":0,
"timestamp":1572079274940
}
\ No newline at end of file
{
"success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1572249599076,
"data": {
"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
{"success":true,"code":"0000000000","desc":"OK","timestamp":1572403459420,"data":{"invitationId":null,"invitationCount":1,"sysTime":1572403459405,"endTime":1572489858000,"completeFlag":0,"openPrizMsg":null,"prizeType":"7","prizeName":null,"prizeImg":"//yun.dui88.com/images/201910/s0yhv1nlil.jpeg","facePrice":"3651404_286462788044574721","invitationUser":[]}}
\ No newline at end of file
......@@ -22,9 +22,9 @@
"num": 3
}
],
"remainEnargy": 1,
"remainEnargy": 5,
"askForEnergy":false,
"canReceiveTreasureBoxNum": 0,
"canReceiveTreasureBoxNum": 10,
"nextRangeStarsNum": 0,
"isGetAllTreasureBox": true,
"refectionCountdown": 1685
......
......@@ -2,17 +2,17 @@
"success": true,
"code": "0000000000",
"desc": "OK",
"timestamp": 1572405066301,
"timestamp": 1572420059060,
"data": {
"scratchCardTaskId": 1,
"taskStatus": 1,
"scratchCardTaskId": 3,
"taskStatus": 2,
"prizeImage": "//yun.dui88.com/images/201910/9u6nk8sjt8.jpg",
"currentTime": 1572405066290,
"endTime": 1572491337000,
"completePercent": "91.0",
"remainPercent": "9.0",
"currentTime": 1572420059060,
"endTime": 1572493282000,
"completePercent": "100",
"remainPercent": "0",
"totalNeedCount": 1,
"helpedCount": 0,
"avatarList": []
"helpedCount": 1,
"avatarList": 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