Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shuijf
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
shuijf
Commits
4c05defa
Commit
4c05defa
authored
Jun 27, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8f8addec
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
142 additions
and
77 deletions
+142
-77
launch.json
.vscode/launch.json
+15
-0
main.scene
assets/scenes/main.scene
+30
-4
PrizeDialogContent.ts
assets/scripts/dialogs/PrizeDialogContent.ts
+6
-6
SceneStart.ts
assets/scripts/scenes/SceneStart.ts
+28
-4
index.html
index.html
+1
-1
manifest.json
manifest.json
+1
-1
dojion.1.json
mock/customActivity/sjf/activity/dojion.1.json
+0
-17
dojion.json
mock/customActivity/sjf/activity/dojion.json
+8
-44
dojion2.json
mock/customActivity/sjf/activity/dojion2.json
+53
-0
No files found.
.vscode/launch.json
0 → 100644
View file @
4c05defa
{
//
使用
IntelliSense
了解相关属性。
//
悬停以查看现有属性的描述。
//
欲了解更多信息,请访问
:
https
:
//go.microsoft.com/fwlink/?linkid=
830387
"version"
:
"0.2.0"
,
"configurations"
:
[
{
"type"
:
"chrome"
,
"request"
:
"launch"
,
"name"
:
"Launch Chrome against localhost"
,
"url"
:
"http://localhost:3001"
,
"webRoot"
:
"${workspaceFolder}"
}
]
}
\ No newline at end of file
assets/scenes/main.scene
View file @
4c05defa
...
...
@@ -106,7 +106,8 @@
"doJoin": "dynamic|API|doJoin",
"getNgameStartStatus": "dynamic|API|getNgameStartStatus",
"getOrderStatus": "dynamic|API|getOrderStatus",
"Drop": "res|f46e6c22-442d-4e5c-a03f-b1b5a073f5a2"
"Drop": "res|f46e6c22-442d-4e5c-a03f-b1b5a073f5a2",
"countTxt": "entity|69f9ed92-756e-4962-a4ad-7513b8f0b41f"
},
"disabled": false
},
...
...
@@ -776,7 +777,7 @@
"properties": {
"position": {
"x": 0,
"y":
28
7
"y":
324.1428571428571
7
}
}
},
...
...
@@ -792,9 +793,34 @@
}
],
"uuid": "1daa1f87-10c0-48a6-9779-5a9ed3f1e2f3"
},
{
"name": "countTxt",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": 284.14285714285717
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "剩余可抽奖次数为0",
"fillColor": "rgba(255, 255, 255, 1)",
"textStyle": {
"fontSize": 25
}
}
}
],
"uuid": "69f9ed92-756e-4962-a4ad-7513b8f0b41f"
}
],
"disabled":
tru
e
"disabled":
fals
e
}
]
},
...
...
@@ -1417,7 +1443,7 @@
"uuid": "f5f89b3f-da91-42ba-ac08-3cda2792bb07"
}
],
"disabled":
fals
e
"disabled":
tru
e
}
],
"disabled": false
...
...
assets/scripts/dialogs/PrizeDialogContent.ts
View file @
4c05defa
...
...
@@ -17,7 +17,7 @@ export default class PrizeDialogContent extends DialogContent {
pic
:
Entity
;
useBtn
:
Entity
;
// getOrderStatus:dynamic;
private
_y
;
private
_y
;
private
_link
:
string
;
private
loadImage
=
(
url
:
string
):
Promise
<
HTMLImageElement
>
=>
{
return
new
Promise
<
HTMLImageElement
>
((
resolve
,
reject
)
=>
{
...
...
@@ -55,16 +55,16 @@ export default class PrizeDialogContent extends DialogContent {
// this.useBtn.enabled = this.name.enabled = isDuibaPrize;
this
.
tips
.
enabled
=
!
isDuibaPrize
;
if
(
isDuibaPrize
)
{
//大牌券
this
.
_link
=
data
.
link
;
imgUrl
=
data
.
imgU
rl
;
setY
(
this
.
useBtn
,
this
.
_y
)
this
.
_link
=
data
.
l
uckBagDetail
.
l
ink
;
imgUrl
=
data
.
luckBagDetail
.
imgu
rl
;
setY
(
this
.
useBtn
,
this
.
_y
)
}
else
{
//线下
imgUrl
=
data
.
imgurl
;
this
.
_link
=
window
[
'recordUrl'
];
setY
(
this
.
useBtn
,
this
.
_y
+
30
)
setY
(
this
.
useBtn
,
this
.
_y
+
30
)
}
setText
(
this
.
name
,
data
.
title
)
setText
(
this
.
name
,
data
.
title
?
data
.
title
:
data
.
luckBagDetail
.
title
);
setText
(
this
.
prizeType
,
this
.
getTypeStr
(
data
.
prizeType
));
const
texRender
=
this
.
pic
.
getComponent
(
TextureRenderer
);
...
...
assets/scripts/scenes/SceneStart.ts
View file @
4c05defa
...
...
@@ -9,6 +9,7 @@ import { alien } from "../navigator/StackNavigator";
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
getRotation
,
setRotation
}
from
"../transformUtils"
;
import
Drop
from
"./Drop"
;
import
{
setText
}
from
"../entityUtils"
;
export
default
class
SceneStart
extends
ScillaComponent
implements
INavigatorViewBase
{
Drop
:
resource
;
...
...
@@ -23,6 +24,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
_drop
:
Drop
;
doJoin
:
dynamic
;
onAwake
()
{
super
.
onAwake
();
if
(
!
this
.
_drop
)
{
...
...
@@ -31,13 +34,27 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
this
.
_drop
.
callback
=
this
.
dropEndCallback
;
this
.
entity
.
addChild
(
this
.
_drop
.
entity
);
}
this
.
updateCountTxt
();
}
dropEndCallback
=
()
=>
{
this
.
onShakeOver
();
}
initGameStage
()
{
// initGameStage() {
// this.updateCountTxt();
// }
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
}
`
);
}
onClick_startbtn
()
{
...
...
@@ -88,11 +105,18 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
onGotDojoin
(
data
)
{
this
.
updateCountTxt
();
// console.log('onGotDojoin', this.doJoin);
if
(
data
.
prizeType
==
0
)
{
//幸运奖
this
.
broadcast
(
'callApi'
,
1
,
'getOrderStatus'
,
{
orderId
:
data
.
orderId
});
this
.
startbtn
.
getComponent
(
Button
).
enabled
=
true
;
if
(
data
.
luck
&&
data
.
luck
.
luckBagDetail
)
{
this
.
bubbling
(
'showDialog'
,
'Prize'
,
{
isDuibaPrize
:
true
,
data
:
data
.
luck
});
}
else
{
this
.
bubbling
(
'showDialog'
,
'Alert'
,
'您与奖品擦肩而过~'
);
}
}
else
{
//线下奖品 1,一等奖;2,二等奖;3,三等奖;4,四等奖 5谢谢 6
this
.
startbtn
.
getComponent
(
Button
).
enabled
=
true
;
if
(
data
.
prizeType
==
5
)
{
//5谢谢
...
...
index.html
View file @
4c05defa
...
...
@@ -61,7 +61,7 @@
'startTime'
:
1
,
'endTime'
:
2
,
'weddingId'
:
1111
,
'freeLimit'
:
0
,
'freeLimit'
:
1
0
,
'weixinUid'
:
00000
,
'nickname'
:
'honingwon'
,
'activity'
:
{
id
:
1
}
...
...
manifest.json
View file @
4c05defa
...
...
@@ -16,7 +16,7 @@
"entryScene"
:
"main"
},
"webServiceUrl-"
:
"http://10.10.93.204:7555 http://localhost:3010"
,
"webServiceUrl"
:
""
,
"webServiceUrl"
:
"
http://localhost:4001
"
,
"webServiceUrl2"
:
"http://localhost:4001"
},
"dataCenterConfig"
:
{
...
...
mock/customActivity/sjf/activity/dojion.1.json
deleted
100644 → 0
View file @
8f8addec
{
"code"
:
null
,
"data"
:
{
"imgurl"
:
"//yun.dui88.com/upload/uP99F1462438316972.png"
,
"luck"
:
null
,
"orderId"
:
22
,
"freeLimit"
:
-3
,
"prizeType"
:
4
,
"link"
:
null
,
"orderStatus"
:
2
,
"title"
:
"惊喜娃娃机奖品1"
,
"prizeId"
:
3
},
"success"
:
true
,
"desc"
:
null
,
"timestamp"
:
1561540156975
}
\ No newline at end of file
mock/customActivity/sjf/activity/dojion.json
View file @
4c05defa
{
"code"
:
null
,
"data"
:
{
"imgurl"
:
null
,
"luck"
:
{
"exposure"
:
{
"dpm"
:
"1.4.1.0"
,
"os"
:
"Android"
,
"isEmbed"
:
true
,
"orderId"
:
"39"
,
"consumerId"
:
1561541886179
,
"ip"
:
"127.0.0.1"
,
"materialId"
:
18245
,
"advertId"
:
2958
,
"dcm"
:
"104.2958.0.0"
,
"activityId"
:
2
,
"activityUseType"
:
"0"
,
"appId"
:
1
,
"domain"
:
"//activity.tuia.cn"
,
"slotId"
:
null
},
"luckBagDetail"
:
{
"androidDownloadUrl"
:
"//activity.tuia.cn/activity/redirect?orderId=39&activityId=2&appId=1&consumerId=1561541886179&materialId=18245&os=Android&advertId=2958&ip=127.0.0.1&activityUseType=0&dpm=1.4.1.0&dcm=104.2958.0.0&device_type=directad&url=www.baidu.com"
,
"link"
:
null
,
"stInfoDpmImg"
:
null
,
"useBtnText"
:
"马上使用"
,
"title"
:
"mock test"
,
"stInfoDpmGoUse"
:
null
,
"stInfoDpmClose"
:
null
,
"openUrl"
:
""
,
"imgurl"
:
"//////yun.dui88.com/babi/img/2omlvuy6mf.jpg"
,
"showUse"
:
true
,
"linkTo"
:
null
,
"iosDownloadUrl"
:
"//activity.tuia.cn/activity/redirect?orderId=39&activityId=2&appId=1&consumerId=1561541886179&materialId=18245&os=Android&advertId=2958&ip=127.0.0.1&activityUseType=0&dpm=1.4.1.0&dcm=104.2958.0.0&device_type=directad&url=www.baidu.com"
,
"couponKey"
:
null
,
"tip"
:
"1"
,
"couponCode"
:
null
,
"isDownloadUrl"
:
null
,
"validate"
:
"2019-04-26"
}
},
"orderId"
:
39
,
"freeLimit"
:
-6
,
"prizeType"
:
0
,
"imgurl"
:
"//yun.dui88.com/upload/uP99F1462438316972.png"
,
"luck"
:
null
,
"orderId"
:
22
,
"freeLimit"
:
1
,
"prizeType"
:
4
,
"link"
:
null
,
"orderStatus"
:
2
,
"title"
:
"
福袋
"
,
"prizeId"
:
null
"title"
:
"
惊喜娃娃机奖品1
"
,
"prizeId"
:
3
},
"success"
:
true
,
"desc"
:
null
,
"timestamp"
:
156154
1886231
"timestamp"
:
156154
0156975
}
\ No newline at end of file
mock/customActivity/sjf/activity/dojion2.json
0 → 100644
View file @
4c05defa
{
"code"
:
null
,
"data"
:
{
"imgurl"
:
null
,
"luck"
:
{
"exposure"
:
{
"dpm"
:
"1.4.1.0"
,
"os"
:
"Android"
,
"isEmbed"
:
true
,
"orderId"
:
"39"
,
"consumerId"
:
1561541886179
,
"ip"
:
"127.0.0.1"
,
"materialId"
:
18245
,
"advertId"
:
2958
,
"dcm"
:
"104.2958.0.0"
,
"activityId"
:
2
,
"activityUseType"
:
"0"
,
"appId"
:
1
,
"domain"
:
"//activity.tuia.cn"
,
"slotId"
:
null
},
"luckBagDetail"
:
{
"androidDownloadUrl"
:
"//activity.tuia.cn/activity/redirect?orderId=39&activityId=2&appId=1&consumerId=1561541886179&materialId=18245&os=Android&advertId=2958&ip=127.0.0.1&activityUseType=0&dpm=1.4.1.0&dcm=104.2958.0.0&device_type=directad&url=www.baidu.com"
,
"link"
:
null
,
"stInfoDpmImg"
:
null
,
"useBtnText"
:
"马上使用"
,
"title"
:
"mock test"
,
"stInfoDpmGoUse"
:
null
,
"stInfoDpmClose"
:
null
,
"openUrl"
:
""
,
"imgurl"
:
"//yun.dui88.com/babi/img/2omlvuy6mf.jpg"
,
"showUse"
:
true
,
"linkTo"
:
null
,
"iosDownloadUrl"
:
"//activity.tuia.cn/activity/redirect?orderId=39&activityId=2&appId=1&consumerId=1561541886179&materialId=18245&os=Android&advertId=2958&ip=127.0.0.1&activityUseType=0&dpm=1.4.1.0&dcm=104.2958.0.0&device_type=directad&url=www.baidu.com"
,
"couponKey"
:
null
,
"tip"
:
"1"
,
"couponCode"
:
null
,
"isDownloadUrl"
:
null
,
"validate"
:
"2019-04-26"
}
},
"orderId"
:
39
,
"freeLimit"
:
-6
,
"prizeType"
:
0
,
"link"
:
null
,
"orderStatus"
:
2
,
"title"
:
"福袋"
,
"prizeId"
:
null
},
"success"
:
true
,
"desc"
:
null
,
"timestamp"
:
1561541886231
}
\ 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