Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wfc13
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
wfc13
Commits
c5db0784
Commit
c5db0784
authored
Aug 13, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
4c5a133a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
70 additions
and
72 deletions
+70
-72
drawPrize.do.json
project/mock/webNet/dazzle/drawPrize.do.json
+36
-0
getFreeCount.do.json
project/mock/webNet/dazzle/getFreeCount.do.json
+1
-0
index.do.json
project/mock/webNet/dazzle/index.do.json
+6
-5
index.do.json
project/mock/webNet/game/index.do.json
+0
-16
join.do.json
project/mock/webNet/game/join.do.json
+0
-6
queryResult.do.json
project/mock/webNet/game/queryResult.do.json
+0
-18
Main.ts
project/src/Main.ts
+1
-0
WebNetName.ts
project/src/WebNetName.ts
+5
-13
IndexScene.ts
project/src/scenes/IndexScene.ts
+20
-13
StartScene.ts
project/src/template/StartScene.ts
+1
-1
No files found.
project/mock/webNet/dazzle/drawPrize.do.json
0 → 100644
View file @
c5db0784
{
"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
project/mock/webNet/dazzle/getFreeCount.do.json
0 → 100644
View file @
c5db0784
{}
\ No newline at end of file
project/mock/webNet/dazzle/index.do.json
View file @
c5db0784
{
"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
project/mock/webNet/game/index.do.json
deleted
100644 → 0
View file @
4c5a133a
{
"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
project/mock/webNet/game/join.do.json
deleted
100644 → 0
View file @
4c5a133a
{
"success"
:
true
,
"message"
:
""
,
"code"
:
""
,
"data"
:
1234
}
\ No newline at end of file
project/mock/webNet/game/queryResult.do.json
deleted
100644 → 0
View file @
4c5a133a
{
"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
project/src/Main.ts
View file @
c5db0784
...
...
@@ -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"
;
...
...
project/src/WebNetName.ts
View file @
c5db0784
...
...
@@ -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
project/src/scenes/IndexScene.ts
View file @
c5db0784
...
...
@@ -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,25 +27,25 @@ export class IndexScene extends Scene {
constructor
()
{
super
();
}
}
start
()
{
super
.
start
();
this
.
getIndex
();
// showPanel(SharePanel);
getObject
(
this
,
'index_sharetips'
).
visible
=
false
;
getObject
(
this
,
'index_sharetips'
).
visible
=
false
;
this
.
initContainer
();
this
.
initmask
();
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'
];
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
);
}
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
);
...
...
@@ -64,7 +64,7 @@ export class IndexScene extends Scene {
initEvents
()
{
super
.
initEvents
();
this
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
const
rulePop
=
getObject
(
this
,
'index_rule'
);
const
rulePop
=
getObject
(
this
,
'index_rule'
);
rulePop
&&
rulePop
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
toRule
,
this
);
}
...
...
@@ -83,18 +83,25 @@ export class IndexScene extends Scene {
}
getIndex
=
async
()
=>
{
const
result
=
await
sendWebNet
(
WebNetName
.
projectI
ndex
);
if
(
!
result
.
success
)
return
;
if
(
result
&&
result
.
data
&&
result
.
data
.
type
==
2
)
{
const
result
=
getWebData
(
WebNetName
.
i
ndex
);
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
)
{
}
}
}
}
project/src/template/StartScene.ts
View file @
c5db0784
...
...
@@ -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
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment