Commit 29cc45fd authored by wjf's avatar wjf

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

parents 7d3632c3 a0b23c3c
......@@ -351,8 +351,6 @@ 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);
......
......@@ -25,8 +25,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="cutTimeLabel" text="23:43:21" y="895.33" size="28" textColor="0xffffff" fontFamily="FZY3JW" bold="true" x="310"/>
<e:Label text="将在 后失效" y="895.33" size="28" textColor="0xFFFFFF" fontFamily="FZY3JW" horizontalCenter="0"/>
<e:Label id="cutTimeLabel" text="23:43:21" y="888.5" size="28" textColor="0xffffff" fontFamily="FZY3JW" verticalAlign="middle" anchorOffsetX="0" width="749" textAlign="center" horizontalCenter="0"/>
<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" bold="true" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW" horizontalCenter="0"/>
<e:Label id="progressLabel" text="仅剩90.7%" size="18" verticalCenter="2" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW" horizontalCenter="0"/>
</e:Group>
<e:Image id="hongbao" source="scratch_hongbao_png" scaleX="1" scaleY="1" verticalCenter="0" horizontalCenter="219"/>
</e:Group>
......
......@@ -21,7 +21,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" bold="true" verticalAlign="middle" textAlign="center" horizontalCenter="0" verticalCenter="0" fontFamily="FZY3JW"/>
<e:Label id="progressLabel" text="仅剩90.7%" size="18" verticalAlign="middle" textAlign="center" horizontalCenter="0" verticalCenter="0" fontFamily="FZY3JW"/>
</e:Group>
<e:Image id="hongbao" source="scratch_hongbao_png" scaleX="1" scaleY="1" verticalCenter="0" horizontalCenter="219"/>
</e:Group>
......
import { HtmlTextParser } from "../libs/new_wx/HtmlTextParser";
/**
* 简单的倒计时
* Created on 2019/10/24
......@@ -109,7 +111,7 @@ export default class CutTimer {
str = str.replace(/hh/g, timer.hour);
str = str.replace(/mm/g, timer.min);
str = str.replace(/ss/g, timer.sec);
this._label.text = str;
this._label.textFlow = (new HtmlTextParser).parser(str);
}
/**
......
......@@ -29,7 +29,6 @@ export default class TurntableIcon extends IconBase {
this.visible = false;
return;
}
this.visible = true;
let data = res.data;
if (data.remainTimes > 0 || (getHomeData().wealth > data.nextTimeNeedCoin)) {
this.tipsVisible = true;
......@@ -37,6 +36,7 @@ export default class TurntableIcon extends IconBase {
} else {
this.tipsVisible = false;
}
this.visible = res.data.luckyDrawInfo.enable;
})
}
......
......@@ -5,10 +5,8 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import { iswx } from "../iswx";
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";
import { HtmlTextParser } from "../../libs/new_wx/HtmlTextParser";
export default class ScratchPanel extends Panel {
private cutTimer: CutTimer;
......@@ -160,7 +158,7 @@ export default class ScratchPanel extends Panel {
this.setProgress(+this.data.completePercent);
// 倒计时
this.cutTimer = new CutTimer(this["cutTimeLabel"], "hh:mm:ss", () => {
this.cutTimer = new CutTimer(this["cutTimeLabel"], "将在<b>hh:mm:ss</b>失效", () => {
this.hidePanel();
GDispatcher.dispatchEvent("updateScratchTips");
}
......@@ -182,8 +180,9 @@ export default class ScratchPanel extends Panel {
} else if(progress < 0) {
progress = 0;
}
this['numLabel'].text = `共${2 + this.data.helpedCount}位好友帮你刮了${progress.toFixed(2)}%`;
this["progressLabel"].text = `仅剩${(100 - progress).toFixed(2)}%`; // 进度条文字
this['numLabel'].textFlow = (new HtmlTextParser).parser(`共<b>${2 + this.data.helpedCount}</b>位好友帮你刮了<b>${progress.toFixed(2)}</b>%`) ;
this["progressLabel"].textFlow = (new HtmlTextParser).parser(`仅剩<b>${(100 - progress).toFixed(2)}</b>%`); // 进度条文字
let _width = this["progressBg"].width * progress / 100; // 宽度
let dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值
let _duration = 1000 * dProgress / 100; // 算出变化的时间
......
......@@ -8,6 +8,7 @@ import CutTimer from "../../CutTimer";
import Utils from "../../Utils";
import { getlogItem } from "../../Main";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
import { HtmlTextParser } from "../../../libs/new_wx/HtmlTextParser";
export default class TurnPrize2Panel extends Panel {
......@@ -75,8 +76,8 @@ export default class TurnPrize2Panel extends Panel {
} else if(progress < 0) {
progress = 0;
}
this["progressLabel"].text = `仅剩${(100 - progress).toFixed(2)}%`; // 进度条文字
this["progressLabel"].textFlow = (new HtmlTextParser).parser(`仅剩<b>${(100 - progress).toFixed(2)}</b>%`); // 进度条文字
const _width = this["progressBg"].width * progress / 100; // 宽度
const dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值
const _duration = 1000 * dProgress / 100; // 算出变化的时间
......
......@@ -9,7 +9,7 @@
"prizeImage": "//yun.dui88.com/images/201910/gxqaecxymq.jpg",
"currentTime": 1572427313215,
"endTime": 1572513706000,
"completePercent": "91.0",
"completePercent": "99",
"remainPercent": "9.0",
"totalNeedCount": 1,
"helpedCount": 0,
......
......@@ -8,7 +8,7 @@
"costCoinJoinTimes": 0,
"nextTimeNeedCoin": 20,
"luckyDrawInfo": {
"enable": true,
"enable": false,
"id": null,
"baseCount": 20,
"bonusCount": 0,
......
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