Commit 360b7bd5 authored by wildfirecode13's avatar wildfirecode13

u

parent 5e928fba
This diff is collapsed.
......@@ -1065,7 +1065,7 @@ export const SkinJson ={
"y": 1294,
"type": "text",
"props": {
"text": "今日剩余助力次数:6次",
"text": "",
"size": 26,
"fillColor": "#c75b2b",
"textAlpha": 1
......@@ -1077,7 +1077,7 @@ export const SkinJson ={
"y": 1070,
"type": "text",
"props": {
"text": "****元体验金,预期收益**元\r",
"text": "",
"size": 40,
"fillColor": "#c75b2b",
"textAlpha": 1
......
......@@ -4,6 +4,7 @@ import Marquee from "../common/Marquee";
import getObject from "../getObject";
import getQueryParams from "../getQueryParams";
import { AssistPanel } from "../panels/assist";
import { RulePanel } from "../panels/rule";
import { getPxTokenSave, sendWebNet, WebNetName } from "../WebNet";
export class ShareScene extends Scene {
......@@ -16,48 +17,57 @@ export class ShareScene extends Scene {
})
}
get groupNames() { return ["share"] }
get skinName() { return "share" }
initUi() {
super.initUi();
onClick_share_rule(){
showPanel(RulePanel);
}
async start(data) {
super.start();
console.log('ShareScene query>>',JSON.stringify(data.query));
getPxTokenSave().then(token=>{
sendWebNet(WebNetName.shareInfo,{code:getQueryParams().code,token:token}).then(res => {});
sendWebNet(WebNetName.shareInfo,{code:getQueryParams().code,token:token}).then(res => {
const {experienceAmount,preIncom,remainAssist}=res.data;
getObject(this,'share_tips1').text=`${experienceAmount}元体验金,预期收益${preIncom}元`
getObject(this,'share_tips2').text=`今日剩余助力次数:${remainAssist}次`
});
})
sendWebNet(WebNetName.carouselInfo).then(res => {
console.log('carouselInfo ', res);
const template = '{phone}邀请了{friend}位好友,获得了{amount}体验金';
const template = '{phone}邀请1位好友,获得了{amount}体验金';
const datas = res.data.map(item=>{
let str = template.replace('{phone}',item.nickname);
str = str.replace('{friend}',item.friend);
str = str.replace('{amount}',item.amount);
return str
});
const q = this.addChild(new Marquee(datas));
q.y = 50;
q.x = 50;
q.x = 135; q.y=448;
window['q']=q;
});
}
initEvents() {
super.initEvents();
getObject(this,'share_rule').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_rule, this);
getObject(this,'share_assist').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_assist, this);
}
removeEvents() {
super.removeEvents();
getObject(this,'share_rule').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_rule, this);
getObject(this,'share_assist').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_assist, this);
}
get groupNames() { return ["share"] }
get skinName() { return "share" }
initUi() {
super.initUi();
}
}
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