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
399b3d5a
Commit
399b3d5a
authored
Dec 11, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
40294174
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
4 deletions
+26
-4
index.html
egret/index.html
+1
-1
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+8
-1
ShareStarterSkin.exml
egret/resource/skins/ShareStarterSkin.exml
+1
-0
ShareStarterScene.ts
egret/src/yazuwei/ShareStarterScene.ts
+15
-1
pollingAnimationState.json
mock/yzw/pollingAnimationState.json
+1
-1
No files found.
egret/index.html
View file @
399b3d5a
...
...
@@ -53,7 +53,7 @@
<script>
// window['pageID'] = 'TeamShareScene';
// window['pageID'] = 'JoinShareScene';
window
[
'pageID'
]
=
'TransScene'
;
//
window['pageID'] = 'TransScene';
// window['pageID'] = 'Share2Scene';
window
[
'TransLink'
]
=
''
;
window
[
'projectId'
]
=
"1"
;
...
...
egret/libs/tw/manager/NetManager.ts
View file @
399b3d5a
...
...
@@ -1552,7 +1552,14 @@ export class NetManager extends ABNetManager {
// }
// }
stopPolling
(){
if
(
this
.
_pollingTimer
)
{
clearTimeout
(
this
.
_pollingTimer
);
this
.
_pollingTimer
=
0
;
}
}
// onNotSuccess: Function;
_pollingTimer
;
onResponse
(
net
,
result
)
{
var
_this
=
this
;
//数据处理
...
...
@@ -1561,7 +1568,7 @@ export class NetManager extends ABNetManager {
if
(
net
.
pollingCount
&&
net
.
pollingCheck
(
data
))
{
net
.
pollingCount
-=
1
;
//轮询接口特殊处理
setTimeout
(
function
()
{
this
.
_pollingTimer
=
setTimeout
(
function
()
{
_this
.
send
(
net
);
},
500
);
}
...
...
egret/resource/skins/ShareStarterSkin.exml
View file @
399b3d5a
...
...
@@ -7,6 +7,7 @@
<e:Image
id=
"shareTips"
source=
"transfer _toast3_png"
horizontalCenter=
"0"
x=
"139"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
y=
"10"
visible=
"false"
/>
</e:Group>
<e:Image
id=
"transbtn"
source=
"sharestarter_btn_png"
x=
"622"
y=
"27"
/>
<e:Button
id=
"backBtn"
label=
"Button"
skinName=
"ui.IconButtonSkin"
icon=
"backstartBtn_png"
width=
"104"
height=
"40"
scaleX=
"1"
scaleY=
"1"
anchorOffsetX=
"52"
anchorOffsetY=
"20"
x=
"52"
y=
"50"
/>
<e:Group
id=
"tipsWrapper"
x=
"142"
bottom=
"55"
>
<e:Image
id=
"sharebtn"
source=
"sharestarter_sharebtn_png"
x=
"38"
y=
"0"
/>
<e:Label
text=
"每传递一个新用户, 可获得100分数"
y=
"117"
x=
"0"
/>
...
...
egret/src/yazuwei/ShareStarterScene.ts
View file @
399b3d5a
...
...
@@ -14,6 +14,7 @@ export default class ShareStarterScene extends Scene {
_standby
:
SVGA
.
EgretMovieClip
;
_trans
:
SVGA
.
EgretMovieClip
;
_shareCode
;
_playingAni
=
false
;
protected
get
skinKey
()
{
return
'ShareStarter'
}
constructor
(
data
)
{
super
();
...
...
@@ -101,6 +102,7 @@ export default class ShareStarterScene extends Scene {
}
this
[
'matchingTips'
].
visible
=
true
;
this
.
_playingAni
=
true
;
NetManager
.
ins
.
yyh_pollingAnimationState
((
success
)
=>
{
const
data
=
DataManager
.
ins
.
getData
(
'yyh_pollingAnimationState'
).
data
;
if
(
data
.
state
==
3
)
{
//摇一摇
...
...
@@ -122,7 +124,16 @@ export default class ShareStarterScene extends Scene {
})
},
window
[
'projectId'
])
}
onTap_backbtn
(){
if
(
this
.
_playingAni
)
{
NetManager
.
ins
.
stopPolling
();
}
else
{
yzwNet
.
homeBaseInfo
((
s
)
=>
{
let
data
=
DataManager
.
ins
.
getData
(
"homeBaseInfo"
).
data
;
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
data
);
},
window
[
'projectId'
])
}
}
onTap_transbtn
()
{
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
TransRecordPanel
)
}
...
...
@@ -130,5 +141,8 @@ export default class ShareStarterScene extends Scene {
initEvents
()
{
this
.
onTap
(
this
[
'transbtn'
],
this
.
onTap_transbtn
);
this
.
onTap
(
this
[
'sharebtn'
],
this
.
onTap_sharebtn
);
this
.
onTap
(
this
[
'backBtn'
],
this
.
onTap_backbtn
);
}
}
\ No newline at end of file
mock/yzw/pollingAnimationState.json
View file @
399b3d5a
...
...
@@ -3,7 +3,7 @@
"data"
:
{
"inviterUserId"
:
"500412018"
,
"inviteeUserId"
:
"500412019"
,
"state"
:
"
3
"
,
"state"
:
"
0
"
,
"inviterPhone"
:
123
,
"inviteePhone"
:
456
},
...
...
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