Commit f6142299 authored by shunx 马's avatar shunx 马

合并

parents 27ce5e84 c5db0784
No preview for this file type
{
"code": null,
"data": {
"extra": null,
"options": [
{
"extra": null,
"optionId": "deserunt",
"optionImg": "consequat Ut",
"optionName": "magna eu do",
"position": -45488243,
"prizeId": "est adipisicing irure qui cillum",
"prizeType": -61249868,
"ruleId": "nisi aute ut",
"sendCount": -86055442,
"url": "anim qui",
"userRecordId": -31001876
},
{
"extra": null,
"optionId": "et esse laborum",
"optionImg": "mollit eiusmod et ullamco cillum",
"optionName": "aliquip dolore qui nulla",
"position": -13810392,
"prizeId": "non labore eiusmod consequat",
"prizeType": -25600732,
"ruleId": "fugiat minim in adipisicing",
"sendCount": 3860338,
"url": "eu veniam ipsum tempor",
"userRecordId": -15254782
}
]
},
"message": null,
"success": false
}
\ No newline at end of file
{
"code": null,
"data": {
"surplusCount": 1,
"credits": 100,
"needCredits": 10,
"type": 2
"surplusCount": -20577795,
"credits": -89490523,
"needCredits": -51255361,
"type": 2,
"isMember":1
},
"message": null,
"success": true
"success": 1
}
\ No newline at end of file
{
"success": true,
"message": "",
"code": "",
"data": {
"ruleIdList": [
"ru_1",
"ru_2",
"ru_3",
"ru_4"
],
"drawStatus": 12,
"prizeId": "aa",
"gameCounts": 1
}
}
\ No newline at end of file
{
"success": true,
"message": "",
"code": "",
"data": 1234
}
\ No newline at end of file
{
"success": true,
"message": "",
"code": "",
"data": {
"type": 1,
"status": 1,
"prize": {
"prizeId": "sp_1",
"prizeType": 1,
"optionId": "sdhjfhjhjjj",
"optionName": "10元话费",
"optionImg": "https://www.baidu.com/xxoo2.png",
"userRecordId": 1235,
"url": "https://www.baidu.com/order/1235"
}
}
}
\ No newline at end of file
......@@ -71,6 +71,7 @@ export class Main {
//加载通用资源
await RES.loadGroup("common");
await RES.loadGroup("svga");
await sendWebNet(WebNetName.index);
console.log("通用资源加载完成")
//h5环境时,隐藏加载中
if (FYGE.getEnv() == "web" && document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
......
......@@ -4,18 +4,8 @@
*/
export enum WebNetName {
login = "/customActivity/disu/login",
/**
* 首页
*/
index = "/projectx/{projectId}/game/index.do",
/**
* 参与
*/
join = "/projectx/{projectId}/game/join.do",
/**
* 获取结果
*/
queryResult = "/projectx/{projectId}/game/queryResult.do",
/**
* 获取规则
*/
......@@ -23,5 +13,7 @@
/**
* 获取首页数据
*/
projectIndex = "/projectx/{projectId}/dazzle/index.do"
index = "/projectx/{projectId}/dazzle/index.do",
drawPrize = "/projectx/{projectId}/dazzle/drawPrize.do",
getFreeCount = "/projectx/{projectId}/dazzle/getFreeCount.do"
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ import { RulePanel } from "../panels/RulePanel";
import { Box } from "./Box";
import { BoxGroup } from "./BoxGroup";
import { ScrollItem } from "./ScrollItem";
import { sendWebNet } from "../WebNet";
import { getWebData, sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName";
......@@ -27,8 +27,8 @@ export class IndexScene extends Scene {
constructor() {
super();
}
}
start() {
super.start();
this.getIndex();
......@@ -42,14 +42,14 @@ export class IndexScene extends Scene {
const list = new FYGE.ScrollList(ScrollItem, 131+20, 131, 620, 154, false);
const array = ['//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png','//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'];
list.updateData(array);
list.position.set(80, 1240+30);
list.position.set(80, 1240 + 30);
this.addChild(list);
this.stage.addEventListener("restartEnterFrame",this.onRestartFrame,this);
}
initContainer() {
boxArea = new FYGE.Sprite;
boxArea.position.set(74,449+30)
boxArea.position.set(74, 449 + 30)
this.addChild(boxArea);
boxGroup = this.addChild(new BoxGroup());
boxArea.addChild(boxGroup);
......@@ -92,15 +92,22 @@ export class IndexScene extends Scene {
}
getIndex = async () => {
const result = await sendWebNet(WebNetName.projectIndex);
if (!result.success) return;
if (result && result.data && result.data.type == 2) {
const result = getWebData(WebNetName.index);
if (result && result.data) {
const reDegree = getObject(this, 'index_timestips2');
reDegree.text = result.data.surplusCount;
const credits = getObject(this, 'index_moneytips2');
credits.text = result.data.credits;
const needCredits = getObject(this, 'index_costtips');
needCredits.text = result.data.needCredits + "积分/次";
if (result.data.type == 2) {
} else if (result.data.type == 2) {
}
}
}
......
......@@ -36,7 +36,7 @@ export class StartScene extends Scene {
//开始游戏
this.startBtn.addEventListener(FYGE.MouseEvent.CLICK, async () => {
showWaiting();
var res = await sendWebNet(WebNetName.join)
var res = await sendWebNet(WebNetName.index)
hideWaiting();
if (res.success) {
changeScene(PlayScene, { ...res.data });
......
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