Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shuijf2
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
shuijf2
Commits
121bd2a0
Commit
121bd2a0
authored
Jun 28, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b55bc6cd
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
8532 additions
and
8487 deletions
+8532
-8487
.DS_Store
.DS_Store
+0
-0
.gitignore
.gitignore
+2
-1
main.scene
assets/scenes/main.scene
+18
-3
MainController.ts
assets/scripts/MainController.ts
+2
-1
SampleApi.ts
assets/scripts/api/SampleApi.ts
+9
-7
SceneStart.ts
assets/scripts/scenes/SceneStart.ts
+24
-14
bundle.js
debug/bundle.js
+8461
-8453
bundle.js.map
debug/bundle.js.map
+1
-1
.DS_Store
dist/.DS_Store
+0
-0
fuck.html
fuck.html
+6
-5
manifest.json
manifest.json
+2
-2
getActivityFreeLimt.json
mock/customActivity/sjf/activity/getActivityFreeLimt.json
+7
-0
No files found.
.DS_Store
View file @
121bd2a0
No preview for this file type
.gitignore
View file @
121bd2a0
node_modules
debug
debug/*.js
debug/*.js.map
.rpt2_cache
dist
**/*/.DS_Store
\ No newline at end of file
assets/scenes/main.scene
View file @
121bd2a0
...
...
@@ -189,6 +189,21 @@
}
]
}
},
{
"script": "./scripts/api/SampleApi",
"properties": {
"method": "POST",
"name": "limitTimes",
"onResponse": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "updateCountFromNet"
}
],
"uri": "/customActivity/sjf/activity/getActivityFreeLimt"
}
}
],
"uuid": "41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
...
...
@@ -383,7 +398,7 @@
"_x": 0,
"_y": 245.1060606060605,
"x": 0,
"y": 1
99.07431457431449
"y": 1
87.64574314574307
}
}
},
...
...
@@ -429,7 +444,7 @@
"_x": 0,
"_y": 299.651515151515,
"x": 0,
"y": 2
71.08008658008646
"y": 2
59.65151515151507
}
}
},
...
...
@@ -481,7 +496,7 @@
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(254, 220, 187, 1)",
"text": "
啥也没发
"
"text": ""
}
}
],
...
...
assets/scripts/MainController.ts
View file @
121bd2a0
...
...
@@ -21,7 +21,8 @@ export default class MainController extends ScillaComponent {
initEnv
();
console
.
log
(
'游戏刷新了...'
);
// const limit = localStorage.getItem('')
}
...
...
assets/scripts/api/SampleApi.ts
View file @
121bd2a0
...
...
@@ -4,16 +4,16 @@
* 简单的api组件
*/
import
{
utils
,
}
from
'scilla/src'
import
{
utils
,
}
from
'scilla/src'
import
ApiComponent
from
"./ApiComponent"
;
import
{
callApi
}
from
"../net/webService"
;
import
{
callApi
}
from
"../net/webService"
;
export
default
class
SampleApi
extends
ApiComponent
{
uri
:
string
;
ignoreSuccessField
=
false
;
async
callApi
(
name
,
paramsInput
,
...
args
){
if
(
this
.
name
==
name
)
{
async
callApi
(
name
,
paramsInput
,
...
args
)
{
if
(
this
.
name
==
name
)
{
await
this
.
execute
(
paramsInput
,
...
args
);
}
}
...
...
@@ -23,20 +23,22 @@ export default class SampleApi extends ApiComponent {
const
params
=
{};
if
(
this
.
params
)
{
if
(
this
.
params
)
{
utils
.
injectProp
(
params
,
this
.
params
);
}
if
(
paramsInput
)
{
if
(
paramsInput
)
{
utils
.
injectProp
(
params
,
paramsInput
);
}
const
{
uri
,
method
}
=
this
;
const
{
uri
,
method
}
=
this
;
try
{
console
.
log
(
`
${
uri
}
==>
${
JSON
.
stringify
(
params
)}
`
);
const
response
=
await
callApi
(
uri
,
params
,
method
,
'json'
,
this
.
ignoreSuccessField
);
this
.
onGotResponse
(
response
);
console
.
log
(
`
${
uri
}
<<==
${
JSON
.
stringify
(
response
)}
`
);
return
response
.
data
;
}
catch
(
e
)
{
...
...
assets/scripts/scenes/SceneStart.ts
View file @
121bd2a0
...
...
@@ -52,14 +52,36 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
updateCountFromNet
(
limit
:
number
)
{
if
(
limit
<
0
)
limit
=
0
;
setText
(
this
.
countTxt
,
`剩余次数:
${
limit
}
`
);
console
.
log
(
'updateCountFromNet'
,
`剩余次数:
${
limit
}
`
)
}
updateCountTxtFromDojoin
()
{
let
limit
=
0
;
if
(
this
.
doJoin
)
{
limit
=
this
.
doJoin
.
freeLimit
;
}
if
(
limit
<
0
)
limit
=
0
;
setText
(
this
.
countTxt
,
`剩余次数:
${
limit
}
`
);
console
.
log
(
'updateCountTxtFromDojoin'
,
`剩余次数:
${
limit
}
`
)
}
onAwake
()
{
super
.
onAwake
();
this
.
updateCountTxt
();
this
.
broadcast
(
'callApi'
,
1
,
'rankInfo2'
,
{
weddingId
:
window
[
'CFG'
].
weddingId
,
activityId
:
window
[
'CFG'
].
activityId
});
this
.
broadcast
(
'callApi'
,
1
,
'limitTimes'
,
{
weddingId
:
window
[
'CFG'
].
weddingId
,
activityId
:
window
[
'CFG'
].
activityId
});
this
.
_shakeTimes
=
0
;
this
.
_counter
=
0
;
this
.
_lastTime
=
-
1
;
...
...
@@ -88,18 +110,6 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
return
'prizeShowed-'
+
window
[
'CFG'
].
weixinUid
+
'-'
+
window
[
'CFG'
].
weddingId
+
'-'
+
window
[
'CFG'
].
activityId
}
updateCountTxt
()
{
let
limit
=
0
;
if
(
this
.
doJoin
)
{
limit
=
this
.
doJoin
.
freeLimit
;
}
else
{
limit
=
window
[
'CFG'
].
freeLimit
;
}
if
(
limit
<
0
)
limit
=
0
;
setText
(
this
.
countTxt
,
`剩余次数:
${
limit
}
`
);
console
.
log
(
`剩余次数:
${
limit
}
`
)
}
initGameStage
()
{
console
.
log
(
'initGameStage'
)
}
...
...
@@ -131,7 +141,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
onGotDojoin
()
{
console
.
log
(
'onGotDojoin'
,
this
.
doJoin
);
this
.
startbtn
.
getComponent
(
Button
).
enabled
=
true
;
this
.
updateCountTxt
();
this
.
updateCountTxt
FromDojoin
();
setTimeout
(()
=>
{
this
.
bubbling
(
'fuck'
,
'guide'
);
},
50
);
...
...
debug/bundle.js
View file @
121bd2a0
This diff is collapsed.
Click to expand it.
debug/bundle.js.map
View file @
121bd2a0
This diff is collapsed.
Click to expand it.
dist/.DS_Store
deleted
100644 → 0
View file @
b55bc6cd
File deleted
fuck.html
View file @
121bd2a0
...
...
@@ -12,6 +12,9 @@
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
...
...
@@ -23,13 +26,13 @@
<div
id=
"gameContainer"
style=
"width: 100%;height: 100%;overflow: hidden;"
></div>
<script
src=
"//yun.duiba.com.cn/db_games/zepto.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/security.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/1561
641018
/bundle.js"
></script>
<script
src=
"//yun.duiba.com.cn/db_games/1561
707303
/bundle.js"
></script>
<script>
setTimeout
(
function
()
{
var
loadingEl
=
document
.
getElementById
(
'loading'
);
function
onProcess
(
p
)
{
if
(
p
>=
1
)
{
loadingEl
.
style
.
display
=
'none'
;
}
}
var
options
=
{
resPath
:
"//yun.duiba.com.cn/db_games/1561
639721
/"
};
window
[
'shuijf'
].
startup
(
document
.
getElementById
(
'gameContainer'
),
options
,
onProcess
);
var
options
=
{
resPath
:
"//yun.duiba.com.cn/db_games/1561
707833
/"
};
window
[
'shuijf'
].
startup
(
document
.
getElementById
(
'gameContainer'
),
options
,
onProcess
);
},
100
);
window
[
'COUNT_DOWN_SEC'
]
=
10
;
window
[
'COUNT_DOWN_SEC'
]
=
5
;
window
[
'ruleContent'
]
=
'starttttttt<br>第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行<br>第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行endddddd'
;
</script>
...
...
@@ -70,8 +73,6 @@
<script
src=
"https://yun.duiba.com.cn/db_games/debug/vconsole.min.js"
></script>
<script>
// init vConsole
...
...
manifest.json
View file @
121bd2a0
...
...
@@ -16,8 +16,8 @@
"entryScene"
:
"main"
},
"webServiceUrl-"
:
"http://10.10.93.204:7555 http://localhost:3010"
,
"webServiceUrl1"
:
""
,
"webServiceUrl"
:
"
http://localhost:4001
"
"webServiceUrl1"
:
"
http://localhost:4001
"
,
"webServiceUrl"
:
""
},
"dataCenterConfig"
:
{
"dataCenterRoot"
:
[
...
...
mock/customActivity/sjf/activity/getActivityFreeLimt.json
0 → 100644
View file @
121bd2a0
{
"success"
:
true
,
"code"
:
null
,
"desc"
:
null
,
"timestamp"
:
1561625108247
,
"data"
:
111
}
\ No newline at end of file
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