Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yyh
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
yyh
Commits
d75e5d79
Commit
d75e5d79
authored
Dec 10, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6141a8b0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
8 deletions
+59
-8
index.html
egret/index.html
+7
-0
CertificateScene.ts
egret/src/yazuwei/CertificateScene.ts
+13
-2
ShareStarterScene.ts
egret/src/yazuwei/ShareStarterScene.ts
+12
-2
TransScene.ts
egret/src/yazuwei/TransScene.ts
+17
-4
accept.json
mock/yzw/accept.json
+9
-0
openPass.json
mock/yzw/openPass.json
+1
-0
No files found.
egret/index.html
View file @
d75e5d79
...
@@ -413,6 +413,13 @@
...
@@ -413,6 +413,13 @@
}
}
</script> -->
</script> -->
<script
src=
"output.js"
></script>
<script
src=
"output.js"
></script>
<!-- <script src="https://yun.duiba.com.cn/db_games/debug/vconsole.min.js"></script>
<script>
// init vConsole 11111
var vConsole = new VConsole();
console.log('Hello world');
</script> -->
</body>
</body>
</html>
</html>
\ No newline at end of file
egret/src/yazuwei/CertificateScene.ts
View file @
d75e5d79
import
Scene
from
"../views/Scene"
;
import
Scene
from
"../views/Scene"
;
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
export
default
class
CertificateScene
extends
Scene
{
export
default
class
CertificateScene
extends
Scene
{
protected
get
skinKey
(){
return
'Certificate'
}
protected
get
skinKey
(){
return
'Certificate'
}
...
@@ -11,13 +12,23 @@ export default class CertificateScene extends Scene{
...
@@ -11,13 +12,23 @@ export default class CertificateScene extends Scene{
this
.
initUI
(
data
);
this
.
initUI
(
data
);
}
}
_from
initUI
(
data
){
initUI
(
data
){
this
[
'from'
].
text
=
'11111111'
;
this
.
once
(
egret
.
Event
.
ADDED_TO_STAGE
,
()
=>
{
this
[
'to'
].
text
=
'22222222'
;
this
.
height
=
this
.
stage
.
stageHeight
;
},
this
);
this
.
_from
=
data
.
from
;
this
[
'from'
].
text
=
data
.
inviterPhone
;
this
[
'to'
].
text
=
data
.
inviteePhone
;
}
}
onTap_btn
(){
onTap_btn
(){
console
.
log
(
'onTap_btn'
)
console
.
log
(
'onTap_btn'
)
if
(
this
.
_from
==
'ShareStarterScene'
)
{
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
ShareStarterScene
);
}
else
{
location
.
href
=
window
[
'indexUrl'
];
}
}
}
initEvents
(){
initEvents
(){
...
...
egret/src/yazuwei/ShareStarterScene.ts
View file @
d75e5d79
...
@@ -7,6 +7,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
...
@@ -7,6 +7,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import
{
loadSvga
}
from
"../loadSvga"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
{
getResPath
}
from
"../utils"
;
import
{
getResPath
}
from
"../utils"
;
import
{
wait
}
from
"../GameConst"
;
import
{
wait
}
from
"../GameConst"
;
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
export
default
class
ShareStarterScene
extends
Scene
{
export
default
class
ShareStarterScene
extends
Scene
{
_bg
:
SVGA
.
EgretMovieClip
;
_bg
:
SVGA
.
EgretMovieClip
;
...
@@ -70,12 +71,21 @@ export default class ShareStarterScene extends Scene {
...
@@ -70,12 +71,21 @@ export default class ShareStarterScene extends Scene {
this
.
_trans
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
this
.
_trans
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
console
.
log
(
'COMPLETE'
)
console
.
log
(
'COMPLETE'
)
this
.
changeToStandBy
();
this
.
changeToStandBy
();
this
[
'tipsWrapper'
].
visible
=
true
;
this
[
'transbtn'
].
visible
=
true
;
// const data = DataManager.ins.getData('accept').data;
// data.from = 'ShareStarterScene';
// SceneCtrl.instance.change(ModuleTypes.CertificateScene, data);
const
data
:
any
=
{}
data
.
from
=
'ShareStarterScene'
;
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
CertificateScene
,
data
);
},
this
);
},
this
);
}
}
onTap_sharebtn
()
{
onTap_sharebtn
()
{
this
[
'tipsWrapper'
].
visible
=
false
;
this
[
'tipsWrapper'
].
visible
=
false
;
this
[
'transbtn'
].
visible
=
false
;
this
[
'transbtn'
].
visible
=
false
;
//这里要调用分享方法
//这里要调用分享方法
yzwNet
.
genInvite
(()
=>
{
yzwNet
.
genInvite
(()
=>
{
let
sharecode
=
DataManager
.
ins
.
getData
(
'genInvite'
).
data
;
let
sharecode
=
DataManager
.
ins
.
getData
(
'genInvite'
).
data
;
...
...
egret/src/yazuwei/TransScene.ts
View file @
d75e5d79
...
@@ -5,6 +5,8 @@ import GameConst, { wait } from "../GameConst";
...
@@ -5,6 +5,8 @@ import GameConst, { wait } from "../GameConst";
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
yzwNet
}
from
"../NetConst"
;
import
{
yzwNet
}
from
"../NetConst"
;
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
export
default
class
TransScene
extends
Scene
{
export
default
class
TransScene
extends
Scene
{
_bg
:
SVGA
.
EgretMovieClip
;
_bg
:
SVGA
.
EgretMovieClip
;
...
@@ -49,12 +51,16 @@ export default class TransScene extends Scene {
...
@@ -49,12 +51,16 @@ export default class TransScene extends Scene {
.
to
({
alpha
:
1
},
500
).
wait
(
500
);
.
to
({
alpha
:
1
},
500
).
wait
(
500
);
}
}
_shakeTag
;
addShareEvent
()
{
addShareEvent
()
{
console
.
log
(
'addShareEvent window.DeviceMotionEvent'
,
window
.
DeviceMotionEvent
);
if
(
window
.
DeviceMotionEvent
)
{
if
(
window
.
DeviceMotionEvent
)
{
var
speed
=
25
;
var
speed
=
25
;
var
x
=
0
,
y
=
0
,
z
=
0
,
lastX
=
0
,
lastY
=
0
,
lastZ
=
0
;
var
x
=
0
,
y
=
0
,
z
=
0
,
lastX
=
0
,
lastY
=
0
,
lastZ
=
0
;
window
.
addEventListener
(
'devicemotion'
,
(
event
)
=>
{
window
.
addEventListener
(
'devicemotion'
,
(
eventData
)
=>
{
var
acceleration
=
event
.
accelerationIncludingGravity
;
console
.
log
(
'devicemotion'
,
eventData
)
var
acceleration
=
eventData
.
accelerationIncludingGravity
;
x
=
acceleration
.
x
;
x
=
acceleration
.
x
;
y
=
acceleration
.
y
;
y
=
acceleration
.
y
;
if
(
Math
.
abs
(
x
-
lastX
)
>
speed
||
Math
.
abs
(
y
-
lastY
)
>
speed
)
{
if
(
Math
.
abs
(
x
-
lastX
)
>
speed
||
Math
.
abs
(
y
-
lastY
)
>
speed
)
{
...
@@ -67,13 +73,15 @@ export default class TransScene extends Scene {
...
@@ -67,13 +73,15 @@ export default class TransScene extends Scene {
}
}
onshake
()
{
onshake
()
{
if
(
this
.
_shakeTag
)
return
;
this
.
_shakeTag
=
true
;
this
[
'shareTips'
].
visible
=
false
;
this
[
'shareTips'
].
visible
=
false
;
let
sharecode
=
GameConst
.
getQueryString
(
"shareCode"
);
let
sharecode
=
GameConst
.
getQueryString
(
"shareCode"
);
NetManager
.
ins
.
yyh_updateAnimationState
(
sharecode
,
3
,
(
success
)
=>
{
NetManager
.
ins
.
yyh_updateAnimationState
(
sharecode
,
3
,
(
success
)
=>
{
if
(
success
)
{
if
(
success
)
{
this
.
changeToTrans
();
this
.
changeToTrans
();
NetManager
.
ins
.
yyh_updateAnimationState
(
sharecode
,
0
,
(
success
)
=>
{
});
NetManager
.
ins
.
yyh_updateAnimationState
(
sharecode
,
0
,
(
success
)
=>
{
});
}
}
});
});
}
}
...
@@ -105,10 +113,15 @@ export default class TransScene extends Scene {
...
@@ -105,10 +113,15 @@ export default class TransScene extends Scene {
this
.
_trans
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
this
.
_trans
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
console
.
log
(
'COMPLETE'
)
console
.
log
(
'COMPLETE'
)
this
.
changeToStandBy
();
this
.
changeToStandBy
();
if
(
!
this
.
_isInviterSide
)
{
if
(
!
this
.
_isInviterSide
)
{
this
.
_standby
.
x
=
40
;
this
.
_standby
.
x
=
40
;
this
.
_standby
.
y
=
10
;
this
.
_standby
.
y
=
10
;
}
}
const
data
=
DataManager
.
ins
.
getData
(
'accept'
).
data
;
data
.
from
=
'TransScene'
;
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
CertificateScene
,
data
);
},
this
);
},
this
);
}
}
...
@@ -127,7 +140,7 @@ export default class TransScene extends Scene {
...
@@ -127,7 +140,7 @@ export default class TransScene extends Scene {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
onshake
();
this
.
onshake
();
},
10
000
);
},
3
000
);
}
}
initEvents
()
{
initEvents
()
{
...
...
mock/yzw/accept.json
0 → 100644
View file @
d75e5d79
{
"code"
:
null
,
"data"
:
{
"inviterPhone"
:
123
,
"inviteePhone"
:
456
},
"message"
:
null
,
"success"
:
true
}
\ No newline at end of file
mock/yzw/openPass.json
0 → 100644
View file @
d75e5d79
{
"code"
:
null
,
"data"
:{
"inviterPhone"
:
null
,
"inviteePhone"
:
null
},
"message"
:
null
,
"success"
:
true
}
\ 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