Commit 67b5eacc authored by wildfirecode13's avatar wildfirecode13

u

parent f7049f14
{ {
"code": null, "code": null,
"data": 1, "data": 0,
"message": null, "message": null,
"success": true "success": true
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"alreadyOpenAccount": false, "alreadyOpenAccount": false,
"assistFriendNum": 1, "assistFriendNum": 1,
"canWithdraw": true, "canWithdraw": true,
"experienceAmount": 233, "experienceAmount": 51200,
"maxExperienceAmount": 2500, "maxExperienceAmount": 2500,
"millionShares": null, "millionShares": null,
"otherExperienceAmount": 1, "otherExperienceAmount": 1,
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
"dependencies": { "dependencies": {
"@spark/share": "^2.0.90", "@spark/share": "^2.0.90",
"@spark/utils": "^2.0.46", "@spark/utils": "^2.0.46",
"duiba-utils": "^1.0.9" "duiba-utils": "^1.0.9",
"svga-parser": "^2.0.0"
}, },
"scripts": { "scripts": {
"clearSameImg": "node scripts/clearSameImg && node scripts/flushRes", "clearSameImg": "node scripts/clearSameImg && node scripts/flushRes",
......
...@@ -55,6 +55,10 @@ ...@@ -55,6 +55,10 @@
{ {
"keys": "share_success_bg.png,share_success_btn.png,share_success_close.png,share_success_okbtn.png,share_success_title.png", "keys": "share_success_bg.png,share_success_btn.png,share_success_close.png,share_success_okbtn.png,share_success_title.png",
"name": "share_success" "name": "share_success"
},
{
"keys": "index.svga,open.svga,prize.svga",
"name": "svga"
} }
], ],
"path": "./resource/" "path": "./resource/"
......
This diff is collapsed.
...@@ -18,47 +18,56 @@ import updateShareFunc from '../share'; ...@@ -18,47 +18,56 @@ 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,yesterdayIncome,sumIncome,sevenDayAnnualization,assistFriendNum,otherExperienceAmount}) { updateIndexUI({ experienceAmount, yesterdayIncome, sumIncome, sevenDayAnnualization, assistFriendNum, otherExperienceAmount }) {
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';
getObject(this,'index_sevenDayAnnualizationTips').text = sevenDayAnnualization; getObject(this, 'index_sevenDayAnnualizationTips').text = sevenDayAnnualization;
getObject(this,'index_yesterdayIncomeTips').text = `昨日收益:${yesterdayIncome||'0'}元`; getObject(this, 'index_yesterdayIncomeTips').text = `昨日收益:${yesterdayIncome || '0'}元`;
getObject(this,'index_invitePercentTips').text = `${experienceAmount}/1000000`; getObject(this, 'index_invitePercentTips').text = `${experienceAmount}/1000000`;
getObject(this,'index_inviteTips').text = `已有${assistFriendNum}位好友助力,体验金增加${otherExperienceAmount}元`; getObject(this, 'index_inviteTips').text = `已有${assistFriendNum}位好友助力,体验金增加${otherExperienceAmount}元`;
const prize_tips1 = getObject(this, 'index_experienceAmountTips2'); const index_experienceAmountTips2 = getObject(this, 'index_experienceAmountTips2');
const prize_tips2 = getObject(this, 'index_experienceAmountTips'); const index_experienceAmountTips = getObject(this, 'index_experienceAmountTips');
const w = prize_tips1.textWidth + prize_tips2.textWidth; index_experienceAmountTips2.x = 375 + experienceAmount.toString().length * 18;
prize_tips2.x = (750 - w) / 2; // const w = index_experienceAmountTips2.textWidth + index_experienceAmountTips.textWidth;
prize_tips1.x = prize_tips2.x + prize_tips2.textWidth; // index_experienceAmountTips.x = (750 - w) / 2;
// index_experienceAmountTips2.x = index_experienceAmountTips.x + index_experienceAmountTips.textWidth;
let percent = 0.05; let percent = 0.05;
if (experienceAmount / MAX_MONEY > percent) { if (experienceAmount / MAX_MONEY > percent) {
percent = experienceAmount / MAX_MONEY; percent = experienceAmount / MAX_MONEY;
} }
const progressBar = new ProgressBarS(getObject(this, 'index_progress')); const progressBar = new ProgressBarS(getObject(this, 'index_progress'));
progressBar.value = percent; progressBar.value = percent;
const __tmp__ = { a: 0 };
FYGE.Tween.get(__tmp__, {
loop: false, onChange: (param) => {
index_experienceAmountTips.text = Math.ceil(experienceAmount * __tmp__.a) + '';
progressBar.value =percent*__tmp__.a;
}
}).to({ a: 1 }, 700)
} }
onclick_index_inviteBtn() { onclick_index_inviteBtn() {
showShareMask(); showShareMask();
} }
onclick_index_drawBtn() { onclick_index_drawBtn() {
const {canWithdraw} = getWebData( WebNetName.myWallet).data; const { canWithdraw } = getWebData(WebNetName.myWallet).data;
if(canWithdraw){ if (canWithdraw) {
showWaiting(); showWaiting();
getPxTokenSave().then(token => { getPxTokenSave().then(token => {
sendWebNet(WebNetName.withDraw, { token: token }).then(res => { sendWebNet(WebNetName.withDraw, { token: token }).then(res => {
hideWaiting(); hideWaiting();
if(res.success) if (res.success)
showPanel(DrawPanel,res.data); showPanel(DrawPanel, res.data);
}); });
}) })
}else{ } else {
showToast('收益未满7天,不能提现哦~') showToast('收益未满7天,不能提现哦~')
} }
} }
page: FYGE.ScrollPage; page: FYGE.ScrollPage;
...@@ -73,14 +82,15 @@ export class IndexScene extends Scene { ...@@ -73,14 +82,15 @@ export class IndexScene extends Scene {
getObject(this, 'index_drawGrayBtn').visible = false; getObject(this, 'index_drawGrayBtn').visible = false;
centerTextField(getObjects(this,[ centerTextField(getObjects(this, [
'index_yesterdayIncomeTips', 'index_yesterdayIncomeTips',
'index_invitePercentTips', 'index_invitePercentTips',
'index_experienceAmountTips',
'index_inviteTips' 'index_inviteTips'
])); ]));
centerTextField(getObject(this,'index_sumIncomeTips'),0,-144+5); centerTextField(getObject(this, 'index_sumIncomeTips'), 0, -144 + 5);
centerTextField(getObject(this,'index_sevenDayAnnualizationTips'),0,140); centerTextField(getObject(this, 'index_sevenDayAnnualizationTips'), 0, 140);
} }
async start(data) { async start(data) {
...@@ -159,7 +169,7 @@ export class IndexScene extends Scene { ...@@ -159,7 +169,7 @@ export class IndexScene extends Scene {
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)
} }
removeEvents() { removeEvents() {
super.removeEvents(); super.removeEvents();
unwatchPageVisibility(this.onPageVisibilityChange) unwatchPageVisibility(this.onPageVisibilityChange)
......
...@@ -59,6 +59,8 @@ export class NewbieScene extends Scene { ...@@ -59,6 +59,8 @@ export class NewbieScene extends Scene {
initUi() { initUi() {
super.initUi(); super.initUi();
// loadSvga()
sendWebNet(WebNetName.carouselInfo).then(res => { sendWebNet(WebNetName.carouselInfo).then(res => {
const template = '{phone}邀请了1位好友,获得了{amount}体验金'; const template = '{phone}邀请了1位好友,获得了{amount}体验金';
......
...@@ -4026,6 +4026,11 @@ supports-color@^6.1.0: ...@@ -4026,6 +4026,11 @@ supports-color@^6.1.0:
dependencies: dependencies:
has-flag "^3.0.0" has-flag "^3.0.0"
svga-parser@^2.0.0:
version "2.0.0"
resolved "http://npm.dui88.com:80/svga-parser/-/svga-parser-2.0.0.tgz#c1e17e64b8ac4dced28fa4dfc6c53d11a5121446"
integrity sha1-weF+ZLisTc7Sj6TfxsU9EaUSFEY=
tapable@^1.0.0, tapable@^1.1.3: tapable@^1.0.0, tapable@^1.1.3:
version "1.1.3" version "1.1.3"
resolved "http://npm.dui88.com:80/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" resolved "http://npm.dui88.com:80/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
......
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