Commit 360b7bd5 authored by wildfirecode13's avatar wildfirecode13

u

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