Commit 3cb67a0a authored by wildfirecode13's avatar wildfirecode13

u

parent befec1b2
{ {
"code": null, "code": null,
"data": { "data": {
"alreadyOpenAccount": false, "alreadyOpenAccount": 0,
"assistFriendNum": 1, "assistFriendNum": 1,
"canWithdraw": false, "canWithdraw": false,
"experienceAmount": 2500, "experienceAmount": 2500,
......
...@@ -649,6 +649,7 @@ export const SkinJson ={ ...@@ -649,6 +649,7 @@ export const SkinJson ={
}, },
{ {
"name": "index_task1", "name": "index_task1",
"id": "index_task1",
"x": 59, "x": 59,
"y": 1158, "y": 1158,
"type": "container", "type": "container",
...@@ -668,7 +669,7 @@ export const SkinJson ={ ...@@ -668,7 +669,7 @@ export const SkinJson ={
"y": 27, "y": 27,
"type": "text", "type": "text",
"props": { "props": {
"text": "在三湘银行开户即可增加XXX体验金", "text": "在三湘银行开户即可增加1000体验金",
"size": 24, "size": 24,
"fillColor": "#c75b2b", "fillColor": "#c75b2b",
"textAlpha": 1 "textAlpha": 1
...@@ -686,6 +687,7 @@ export const SkinJson ={ ...@@ -686,6 +687,7 @@ export const SkinJson ={
] ]
}, },
{ {
"id": "index_task2new",
"name": "index_task2new", "name": "index_task2new",
"x": 59, "x": 59,
"y": 1249, "y": 1249,
...@@ -706,64 +708,17 @@ export const SkinJson ={ ...@@ -706,64 +708,17 @@ export const SkinJson ={
"y": 20, "y": 20,
"type": "text", "type": "text",
"props": { "props": {
"text": "当前账户余额XXX元,每天体验金增长XX元", "text": "体验金会根据账户余额,每日增加相应数量,账户剩余\n金额除以10后取整,即为每日体验金增加的金额。",
"size": 24, "size": 24,
"fillColor": "#c75b2b", "fillColor": "#c75b2b",
"textAlpha": 1 "textAlpha": 1
} }
},
{
"name": "index_task2newtip2",
"x": 509,
"y": 20,
"type": "text",
"props": {
"text": "未开户",
"size": 24,
"fillColor": "#958e8a",
"textAlpha": 1
}
},
{
"name": "index_task2newtip3",
"x": 29,
"y": 73,
"type": "text",
"props": {
"text": "账户余额100元,每天体验金增长XX元",
"size": 20,
"fillColor": "#958e8a",
"textAlpha": 1
}
},
{
"name": "index_task2newtip4",
"x": 29,
"y": 113,
"type": "text",
"props": {
"text": "账户余额200元,每天体验金增长XX元",
"size": 20,
"fillColor": "#958e8a",
"textAlpha": 1
}
},
{
"name": "index_task2newtip5",
"x": 29,
"y": 152,
"type": "text",
"props": {
"text": "账户余额500元,每天体验金增长XX元",
"size": 20,
"fillColor": "#958e8a",
"textAlpha": 1
}
} }
] ]
}, },
{ {
"name": "index_task2", "name": "index_task2",
"id": "index_task2",
"x": 59, "x": 59,
"y": 1158, "y": 1158,
"type": "container", "type": "container",
...@@ -783,72 +738,13 @@ export const SkinJson ={ ...@@ -783,72 +738,13 @@ export const SkinJson ={
"y": 20, "y": 20,
"type": "text", "type": "text",
"props": { "props": {
"text": "当前账户余额XXX元,每天体验金增长XX元", "text": "体验金会根据账户余额,每日增加相应数量,账户剩余\n金额除以10后取整,即为每日体验金增加的金额。",
"size": 24, "size": 24,
"fillColor": "#c75b2b", "fillColor": "#c75b2b",
"textAlpha": 1 "textAlpha": 1
} }
},
{
"name": "index_task2_1",
"x": 508,
"y": 20,
"type": "text",
"props": {
"text": "未达标",
"size": 24,
"fillColor": "#958e8a",
"textAlpha": 1
}
},
{
"name": "index_task2_2",
"x": 488,
"y": 20,
"type": "text",
"props": {
"text": "体验金+XX",
"size": 24,
"fillColor": "#958e8a",
"textAlpha": 1
}
},
{
"name": "index_task2_3",
"x": 29,
"y": 73,
"type": "text",
"props": {
"text": "账户余额100元,每天体验金增长XX元",
"size": 20,
"fillColor": "#958e8a",
"textAlpha": 1
}
},
{
"name": "index_task2_4",
"x": 29,
"y": 113,
"type": "text",
"props": {
"text": "账户余额200元,每天体验金增长XX元",
"size": 20,
"fillColor": "#958e8a",
"textAlpha": 1
}
},
{
"name": "index_task2_5",
"x": 29,
"y": 152,
"type": "text",
"props": {
"text": "账户余额500元,每天体验金增长XX元",
"size": 20,
"fillColor": "#958e8a",
"textAlpha": 1
}
} }
] ]
}, },
{ {
......
export const MAX_MONEY=100*10000; export const MAX_MONEY=100*10000;
export const MONEY_PERCENT=0.1; export const MONEY_PERCENT=0.05;
export const WEIXIN_URL = 'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=Mzg5NTMyMTg3Nw==&scene=124#wechat_redirect'; export const WEIXIN_URL = 'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=Mzg5NTMyMTg3Nw==&scene=124#wechat_redirect';
\ No newline at end of file export const KAIHU_URL = 'https://www.baidu.com';
\ No newline at end of file
...@@ -9,7 +9,7 @@ import Marquee from '../common/Marquee'; ...@@ -9,7 +9,7 @@ import Marquee from '../common/Marquee';
import { ProgressBarS } from '../common/ProgressBarS'; import { ProgressBarS } from '../common/ProgressBarS';
import { hideShareMask, showShareMask } from '../common/ShareMask'; import { hideShareMask, showShareMask } from '../common/ShareMask';
import { getStageHeight, getStageOffset } from '../common/stage'; import { getStageHeight, getStageOffset } from '../common/stage';
import { MAX_MONEY, MONEY_PERCENT } from '../datas'; import { KAIHU_URL, MAX_MONEY, MONEY_PERCENT } from '../datas';
import { DrawPanel } from '../panels/draw'; import { DrawPanel } from '../panels/draw';
import { RulePanel } from '../panels/rule'; import { RulePanel } from '../panels/rule';
import { ShareFailPanel } from '../panels/share_fail'; import { ShareFailPanel } from '../panels/share_fail';
...@@ -18,7 +18,10 @@ import updateShareFunc from '../share'; ...@@ -18,7 +18,10 @@ 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({ 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_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";
getObject(this, 'index_sumIncomeTips').text = sumIncome || '0'; getObject(this, 'index_sumIncomeTips').text = sumIncome || '0';
...@@ -33,9 +36,6 @@ export class IndexScene extends Scene { ...@@ -33,9 +36,6 @@ export class IndexScene extends Scene {
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;
// const w = index_experienceAmountTips2.textWidth + index_experienceAmountTips.textWidth;
// index_experienceAmountTips.x = (750 - w) / 2;
// index_experienceAmountTips2.x = index_experienceAmountTips.x + index_experienceAmountTips.textWidth;
let percent = MONEY_PERCENT; let percent = MONEY_PERCENT;
if (experienceAmount / MAX_MONEY > percent) { if (experienceAmount / MAX_MONEY > percent) {
...@@ -169,9 +169,14 @@ export class IndexScene extends Scene { ...@@ -169,9 +169,14 @@ export class IndexScene extends Scene {
showPanel(RulePanel); showPanel(RulePanel);
} }
index_task1btn(){
location.href=KAIHU_URL;
}
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
watchPageVisibility(this.onPageVisibilityChange); watchPageVisibility(this.onPageVisibilityChange);
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_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)
...@@ -180,7 +185,8 @@ export class IndexScene extends Scene { ...@@ -180,7 +185,8 @@ export class IndexScene extends Scene {
removeEvents() { removeEvents() {
super.removeEvents(); super.removeEvents();
unwatchPageVisibility(this.onPageVisibilityChange) unwatchPageVisibility(this.onPageVisibilityChange);
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_drawGrayBtn').removeEventListener(FYGE.MouseEvent.CLICK, this.onclick_index_drawBtn, 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