Commit 4fbaa156 authored by wildfirecode13's avatar wildfirecode13

update

parent 3cb67a0a
...@@ -840,15 +840,6 @@ export const SkinJson ={ ...@@ -840,15 +840,6 @@ export const SkinJson ={
"source": "index_drawBtn.png" "source": "index_drawBtn.png"
} }
}, },
{
"name": "index_drawGrayBtn",
"x": 205,
"y": 693,
"type": "sprite",
"props": {
"source": "index_drawGrayBtn.png"
}
},
{ {
"name": "index_inviteBtn", "name": "index_inviteBtn",
"x": 205, "x": 205,
......
...@@ -18,9 +18,9 @@ import updateShareFunc from '../share'; ...@@ -18,9 +18,9 @@ import updateShareFunc from '../share';
import { getPxTokenSave, getWebData, sendWebNet, WebNetName } from '../WebNet'; import { getPxTokenSave, getWebData, sendWebNet, WebNetName } from '../WebNet';
export class IndexScene extends Scene { export class IndexScene extends Scene {
updateIndexUI({alreadyOpenAccount, experienceAmount:experienceAmount2, yesterdayIncome, sumIncome, sevenDayAnnualization, assistFriendNum, otherExperienceAmount, canWithdraw }) { updateIndexUI({ alreadyOpenAccount, experienceAmount: experienceAmount2, yesterdayIncome, sumIncome, sevenDayAnnualization, assistFriendNum, otherExperienceAmount, canWithdraw }) {
this['index_task2new'].visible=this['index_task1'].visible=!alreadyOpenAccount; this['index_task2new'].visible = this['index_task1'].visible = !alreadyOpenAccount;
this['index_task2'].visible=alreadyOpenAccount; this['index_task2'].visible = alreadyOpenAccount;
const experienceAmount = getWebData(WebNetName.acquireOtherExperienceAmount).data; const experienceAmount = getWebData(WebNetName.acquireOtherExperienceAmount).data;
getObject(this, 'index_experienceAmountTips').text = experienceAmount || "0"; getObject(this, 'index_experienceAmountTips').text = experienceAmount || "0";
...@@ -30,9 +30,6 @@ export class IndexScene extends Scene { ...@@ -30,9 +30,6 @@ export class IndexScene extends Scene {
getObject(this, 'index_invitePercentTips').text = `${experienceAmount}/${MAX_MONEY}`; getObject(this, 'index_invitePercentTips').text = `${experienceAmount}/${MAX_MONEY}`;
getObject(this, 'index_inviteTips').text = `已有${assistFriendNum}位好友助力,体验金增加${otherExperienceAmount}元`; getObject(this, 'index_inviteTips').text = `已有${assistFriendNum}位好友助力,体验金增加${otherExperienceAmount}元`;
getObject(this, 'index_drawGrayBtn').visible = !canWithdraw;
getObject(this, 'index_drawBtn').visible = canWithdraw;
const index_experienceAmountTips2 = getObject(this, 'index_experienceAmountTips2'); const index_experienceAmountTips2 = getObject(this, 'index_experienceAmountTips2');
const index_experienceAmountTips = getObject(this, 'index_experienceAmountTips'); const index_experienceAmountTips = getObject(this, 'index_experienceAmountTips');
index_experienceAmountTips2.x = 375 + experienceAmount.toString().length * 18; index_experienceAmountTips2.x = 375 + experienceAmount.toString().length * 18;
...@@ -57,8 +54,6 @@ export class IndexScene extends Scene { ...@@ -57,8 +54,6 @@ export class IndexScene extends Scene {
showShareMask(); showShareMask();
} }
onclick_index_drawBtn() { onclick_index_drawBtn() {
const { canWithdraw } = getWebData(WebNetName.myWallet).data;
if (canWithdraw) {
showWaiting(); showWaiting();
getPxTokenSave().then(token => { getPxTokenSave().then(token => {
sendWebNet(WebNetName.withDraw, { token: token }).then(res => { sendWebNet(WebNetName.withDraw, { token: token }).then(res => {
...@@ -66,12 +61,7 @@ export class IndexScene extends Scene { ...@@ -66,12 +61,7 @@ export class IndexScene extends Scene {
if (res.success) if (res.success)
showPanel(DrawPanel, res.data); showPanel(DrawPanel, res.data);
}); });
}) });
} else {
showToast('收益未满7天,不能提现哦~')
}
} }
page: FYGE.ScrollPage; page: FYGE.ScrollPage;
...@@ -84,9 +74,6 @@ export class IndexScene extends Scene { ...@@ -84,9 +74,6 @@ export class IndexScene extends Scene {
this.page.view.addChild(getObject(this, 'index_wrapper')); this.page.view.addChild(getObject(this, 'index_wrapper'));
getObject(this, 'index_drawGrayBtn').visible = false;
getObject(this, 'index_drawBtn').visible = false;
centerTextField(getObjects(this, [ centerTextField(getObjects(this, [
'index_yesterdayIncomeTips', 'index_yesterdayIncomeTips',
'index_invitePercentTips', 'index_invitePercentTips',
...@@ -169,8 +156,8 @@ export class IndexScene extends Scene { ...@@ -169,8 +156,8 @@ export class IndexScene extends Scene {
showPanel(RulePanel); showPanel(RulePanel);
} }
index_task1btn(){ index_task1btn() {
location.href=KAIHU_URL; location.href = KAIHU_URL;
} }
initEvents() { initEvents() {
...@@ -178,7 +165,6 @@ export class IndexScene extends Scene { ...@@ -178,7 +165,6 @@ export class IndexScene extends Scene {
watchPageVisibility(this.onPageVisibilityChange); watchPageVisibility(this.onPageVisibilityChange);
getObject(this, 'index_task1btn').addEventListener(FYGE.MouseEvent.CLICK, this.index_task1btn, this) getObject(this, 'index_task1btn').addEventListener(FYGE.MouseEvent.CLICK, this.index_task1btn, this)
getObject(this, 'index_drawBtn').addEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_drawBtn, this) getObject(this, 'index_drawBtn').addEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_drawBtn, this)
getObject(this, 'index_drawGrayBtn').addEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_drawBtn, this)
getObject(this, 'index_rulebtn').addEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_ruleBtn, this) getObject(this, 'index_rulebtn').addEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_ruleBtn, this)
getObject(this, 'index_inviteBtn').addEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_inviteBtn, this) getObject(this, 'index_inviteBtn').addEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_inviteBtn, this)
} }
...@@ -189,7 +175,6 @@ export class IndexScene extends Scene { ...@@ -189,7 +175,6 @@ export class IndexScene extends Scene {
getObject(this, 'index_task1btn').removeEventListener(FYGE.MouseEvent.CLICK, this.index_task1btn, this) getObject(this, 'index_task1btn').removeEventListener(FYGE.MouseEvent.CLICK, this.index_task1btn, this)
getObject(this, 'index_inviteBtn').removeEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_inviteBtn, this) getObject(this, 'index_inviteBtn').removeEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_inviteBtn, this)
getObject(this, 'index_drawBtn').removeEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_drawBtn, this) getObject(this, 'index_drawBtn').removeEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_drawBtn, this)
getObject(this, 'index_drawGrayBtn').removeEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_drawBtn, this)
getObject(this, 'index_rulebtn').removeEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_ruleBtn, this) getObject(this, 'index_rulebtn').removeEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_ruleBtn, this)
} }
......
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