Commit 2e0068a1 authored by wildfirecode13's avatar wildfirecode13

update

parent de5e6189
{
"code": null,
"data": [
{
"nickname": "123",
"amount": "999"
},
{
"nickname": "789",
"amount": "777"
},
{
"nickname": "456",
"amount": "888"
}
],
"message": "sed dolor nulla sint ut",
"success": true
}
\ No newline at end of file
......@@ -23,6 +23,8 @@ export enum WebNetName {
* 是否可分享
*/
canshare = "/projectx/{projectId}/game/canshare.do",
carouselInfo = "/projectx/{projectId}/carousel/carouselInfo.do",
/**
* 参与
*/
......
......@@ -7,6 +7,7 @@ import TestButton from "../common/TestButton";
import getQueryParams from "../getQueryParams";
import { PrizePanel } from "../panels/prize";
import { RulePanel } from "../panels/rule";
import { sendWebNet, WebNetName } from "../WebNet";
import { IndexScene } from "./IndexScene";
let prize;
export class NewbieScene extends Scene {
......@@ -54,15 +55,23 @@ export class NewbieScene extends Scene {
this.ruleBtn = new TestButton('规则按钮');
group.add(this.ruleBtn);
const q = this.addChild(new Marquee(
[
'159****1111邀请了11位好友,获得了yyy体验金',
'138****2222邀请了22位好友,获得了xxxx体验金',
'189****3333邀请了33位好友,获得了zzzzz体验金',
]
));
q.y=300;
q.x=50;
sendWebNet(WebNetName.carouselInfo).then(res => {
console.log('carouselInfo ', res);
const template = '{phone}邀请了{friend}位好友,获得了{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 = 300;
q.x = 50;
});
}
initEvents() {
......
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