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
55819f6c
Commit
55819f6c
authored
Aug 16, 2021
by
shunx 马
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'disu0811' of gitlab2.dui88.com:wildfirecode13/wfc13 into disu0811
parents
d7454b7a
27ceea23
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
15 deletions
+68
-15
drawPrize.do.json
project/mock/webNet/dazzle/drawPrize.do.json
+1
-1
index.do.json
project/mock/webNet/dazzle/index.do.json
+1
-1
uploadSingleJs.js
project/scripts/uploadSingleJs.js
+12
-0
cost.ts
project/src/panels/cost.ts
+11
-5
BoxGroup.ts
project/src/scenes/BoxGroup.ts
+42
-7
IndexScene.ts
project/src/scenes/IndexScene.ts
+1
-1
No files found.
project/mock/webNet/dazzle/drawPrize.do.json
View file @
55819f6c
...
...
@@ -32,5 +32,5 @@
]
},
"message"
:
"12312312"
,
"success"
:
0
"success"
:
1
}
\ No newline at end of file
project/mock/webNet/dazzle/index.do.json
View file @
55819f6c
...
...
@@ -123,7 +123,7 @@
"surplusCount"
:
1
,
"credits"
:
111111
,
"needCredits"
:
110
,
"type"
:
1
,
"type"
:
2
,
"isMember"
:
1
},
"message"
:
null
,
...
...
project/scripts/uploadSingleJs.js
View file @
55819f6c
...
...
@@ -37,6 +37,7 @@ function uploadSingleJs(url) {
//单js文件上传
co
(
function
*
()
{
const
originPath
=
`/db_games/
${
url
}
/output.js`
;
var
client
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAI4Fw25WcfcGv7FvcHoiHK'
,
...
...
@@ -51,6 +52,17 @@ function uploadSingleJs(url) {
}
if
(
originFile
.
status
===
404
)
yield
client
.
put
(
originPath
,
"./output.js"
);
const
originPath2
=
`/db_games/
${
url
}
/output.js.map`
;
var
originFile2
;
try
{
originFile2
=
yield
client
.
head
(
originPath2
);
}
catch
(
error
)
{
originFile2
=
error
;
}
if
(
originFile2
.
status
===
404
)
yield
client
.
put
(
originPath2
,
"./output.js.map"
);
})
}
...
...
project/src/panels/cost.ts
View file @
55819f6c
...
...
@@ -3,6 +3,7 @@ import { RES } from "../../module/RES";
import
{
layers
}
from
"../../module/views/layers"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
centerTextField
from
"../common/centerTextField"
;
import
{
delayClick
}
from
"../common/delayClick"
;
import
getObject
from
"../common/getObject"
;
import
{
sendWebNetWithToken
}
from
"../sendWebNetWithToken"
;
import
{
getWebData
,
sendLog
,
sendWebNet
}
from
"../WebNet"
;
...
...
@@ -20,14 +21,14 @@ export class CostPanel extends Panel {
getObject
(
this
,
"cost_tips"
).
text
=
`消耗
${
cost
}
积分拆开1个盲盒`
;
}
cost_open
()
{
cost_open
(
e
)
{
sendLog
(
"click"
,
1
);
this
.
dispatchEvent
(
"stopIndexEnterFrame"
,
{});
this
.
getPrize
();
this
.
getPrize
(
e
.
target
);
}
getPrize
=
async
()
=>
{
getPrize
=
async
(
btn
:
FYGE
.
Sprite
)
=>
{
btn
.
mouseEnable
=
false
;
const
indexResult
=
getWebData
(
WebNetName
.
index
);
const
params
:
any
=
{
...
...
@@ -38,11 +39,16 @@ export class CostPanel extends Panel {
if
(
indexResult
.
data
.
type
==
1
)
{
params
.
credits
=
indexResult
.
data
.
needCredits
;
result
=
await
sendWebNet
(
WebNetName
.
getCreditCost
,
params
);
if
(
!
result
.
success
)
return
;
if
(
!
result
.
success
)
{
btn
.
mouseEnable
=
true
;
return
;
}
prizeData
=
await
sendWebNetWithToken
(
WebNetName
.
drawPrize
,
{
ticket
:
result
.
data
});
btn
.
mouseEnable
=
true
;
}
else
{
prizeData
=
await
sendWebNetWithToken
(
WebNetName
.
drawPrize
);
btn
.
mouseEnable
=
true
;
}
sendWebNet
(
WebNetName
.
index
).
then
(
res
=>
{
...
...
project/src/scenes/BoxGroup.ts
View file @
55819f6c
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
layers
}
from
"../../module/views/layers"
;
import
{
delayClick
}
from
"../common/delayClick"
;
import
{
CostPanel
}
from
"../panels/cost"
;
import
{
getTimesPanel
}
from
"../panels/getTimes"
;
import
{
NoPrizePanel
}
from
"../panels/noprize"
;
import
{
notEnoughMoneyPanel
}
from
"../panels/notEnoughMoney"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
import
{
timesNotEnoughPanel
}
from
"../panels/timesNotEnough"
;
import
{
getWebData
}
from
"../WebNet"
;
import
{
sendWebNetWithToken
}
from
"../sendWebNetWithToken"
;
import
{
getWebData
,
sendWebNet
}
from
"../WebNet"
;
import
{
WebNetName
}
from
"../WebNetName"
;
import
{
Box
}
from
"./Box"
;
...
...
@@ -87,20 +91,51 @@ export class BoxGroup extends FYGE.Sprite {
indexsvga
.
startAniRange
(
1
,
indexsvga
.
totalFrames
,
1
,
()
=>
{
const
result
=
getWebData
(
WebNetName
.
index
);
if
(
result
.
data
.
surplusCount
<=
0
)
{
if
(
result
.
data
.
type
==
2
)
if
(
result
.
data
.
type
==
2
)
showPanel
(
timesNotEnoughPanel
)
else
showPanel
(
getTimesPanel
);
}
else
{
if
(
result
.
data
.
type
==
2
)
{
this
.
getPrize
();
}
else
{
if
(
result
.
data
.
needCredits
>
result
.
data
.
credits
)
{
showPanel
(
notEnoughMoneyPanel
);
}
else
{
showPanel
(
CostPanel
);
}
}
}
});
}
getPrize
=
async
()
=>
{
const
indexResult
=
getWebData
(
WebNetName
.
index
);
const
params
:
any
=
{
toPlaywayId
:
'dazzle'
,
toActionId
:
'drawPrize'
};
let
result
,
prizeData
;
prizeData
=
await
sendWebNetWithToken
(
WebNetName
.
drawPrize
);
sendWebNet
(
WebNetName
.
index
).
then
(
res
=>
{
layers
.
stage
.
dispatchEvent
(
'updateIndexData'
)
})
if
(
prizeData
&&
prizeData
.
success
)
{
if
(
prizeData
.
data
&&
prizeData
.
data
.
options
)
{
if
(
prizeData
.
data
.
options
[
0
].
optionId
==
"thanks"
)
{
showPanel
(
NoPrizePanel
)
}
else
{
showPanel
(
PrizePanel
);
}
}
}
}
}
project/src/scenes/IndexScene.ts
View file @
55819f6c
...
...
@@ -178,7 +178,7 @@ export class IndexScene extends Scene {
reDegree
.
text
=
`
${
result
.
data
.
surplusCount
}
`
;
getBoxButton
.
visible
=
true
;
shareButton
.
visible
=
false
;
hand
.
visible
=
tru
e
;
hand
.
visible
=
fals
e
;
}
else
{
reDegree
.
text
=
'0'
;
needCredits
.
text
=
`
${
result
.
data
.
needCredits
}
`
+
"积分/次"
;
...
...
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