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 { ...@@ -23,6 +23,8 @@ export enum WebNetName {
* 是否可分享 * 是否可分享
*/ */
canshare = "/projectx/{projectId}/game/canshare.do", canshare = "/projectx/{projectId}/game/canshare.do",
carouselInfo = "/projectx/{projectId}/carousel/carouselInfo.do",
/** /**
* 参与 * 参与
*/ */
......
...@@ -7,6 +7,7 @@ import TestButton from "../common/TestButton"; ...@@ -7,6 +7,7 @@ import TestButton from "../common/TestButton";
import getQueryParams from "../getQueryParams"; import getQueryParams from "../getQueryParams";
import { PrizePanel } from "../panels/prize"; import { PrizePanel } from "../panels/prize";
import { RulePanel } from "../panels/rule"; import { RulePanel } from "../panels/rule";
import { sendWebNet, WebNetName } from "../WebNet";
import { IndexScene } from "./IndexScene"; import { IndexScene } from "./IndexScene";
let prize; let prize;
export class NewbieScene extends Scene { export class NewbieScene extends Scene {
...@@ -40,7 +41,7 @@ export class NewbieScene extends Scene { ...@@ -40,7 +41,7 @@ export class NewbieScene extends Scene {
onClick_prizeBtn() { onClick_prizeBtn() {
this.openPrize(this.data); this.openPrize(this.data);
} }
onClick_ruleBtn() { onClick_ruleBtn() {
showPanel(RulePanel); showPanel(RulePanel);
} }
...@@ -54,15 +55,23 @@ export class NewbieScene extends Scene { ...@@ -54,15 +55,23 @@ export class NewbieScene extends Scene {
this.ruleBtn = new TestButton('规则按钮'); this.ruleBtn = new TestButton('规则按钮');
group.add(this.ruleBtn); group.add(this.ruleBtn);
const q = this.addChild(new Marquee(
[ sendWebNet(WebNetName.carouselInfo).then(res => {
'159****1111邀请了11位好友,获得了yyy体验金', console.log('carouselInfo ', res);
'138****2222邀请了22位好友,获得了xxxx体验金',
'189****3333邀请了33位好友,获得了zzzzz体验金', const template = '{phone}邀请了{friend}位好友,获得了{amount}体验金';
] const datas = res.data.map(item=>{
)); let str = template.replace('{phone}',item.nickname);
q.y=300; str = str.replace('{friend}',item.friend);
q.x=50; str = str.replace('{amount}',item.amount);
return str
});
const q = this.addChild(new Marquee(datas));
q.y = 300;
q.x = 50;
});
} }
initEvents() { 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