Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
xiaoxiaole
Commits
70c865fa
Commit
70c865fa
authored
Oct 12, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b9636b57
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
23 deletions
+14
-23
Utils.ts
egret/src/Utils.ts
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+5
-8
InviteCutTimePanel.ts
egret/src/panels/InviteCutTimePanel.ts
+4
-7
InvitePanel.ts
egret/src/panels/InvitePanel.ts
+4
-7
No files found.
egret/src/Utils.ts
View file @
70c865fa
...
...
@@ -33,7 +33,7 @@ export default class Utils {
* @param num 数字
* @param length 位数
*/
prefixInteger
(
num
,
length
)
{
p
ublic
static
p
refixInteger
(
num
,
length
)
{
return
(
Array
(
length
).
join
(
'0'
)
+
num
).
slice
(
-
length
);
}
}
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
70c865fa
...
...
@@ -19,6 +19,7 @@ import { loadSvga } from "../loadSvga";
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
CountDown
from
"./CountDown"
;
import
AvatarComp
from
"./AvatarComp"
;
import
Utils
from
"../Utils"
;
export
default
class
MapScene
extends
Scene
{
...
...
@@ -34,7 +35,7 @@ export default class MapScene extends Scene {
sendInvite
(){
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
if
(
!
dojoin
)
return
;
NetManager
.
ins
.
doHelp
(()
=>
{},,
dojoin
.
data
);
NetManager
.
ins
.
doHelp
(()
=>
{},
Utils
.
getRequestByKey
(
"shareCode"
)
,
dojoin
.
data
);
}
// 邀请有礼角标倒计时
...
...
@@ -462,16 +463,12 @@ export default class MapScene extends Scene {
let
sec
=
~~
((
time
-
hour
*
3600000
-
min
*
60000
)
/
1000
);
// 秒
return
{
hour
:
thi
s
.
prefixInteger
(
hour
,
2
),
min
:
thi
s
.
prefixInteger
(
min
,
2
),
sec
:
thi
s
.
prefixInteger
(
sec
,
2
)
hour
:
Util
s
.
prefixInteger
(
hour
,
2
),
min
:
Util
s
.
prefixInteger
(
min
,
2
),
sec
:
Util
s
.
prefixInteger
(
sec
,
2
)
}
}
// 截取数字补0
prefixInteger
(
num
,
length
)
{
return
(
Array
(
length
).
join
(
'0'
)
+
num
).
slice
(
-
length
);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
onTap_friendBtn
()
{
...
...
egret/src/panels/InviteCutTimePanel.ts
View file @
70c865fa
...
...
@@ -3,6 +3,7 @@ import { changeMapScene } from "../startScene/StartScene";
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
getHomeData
from
"../getHomeData"
;
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
Utils
from
"../Utils"
;
/**
* 邀请规则面板
...
...
@@ -69,16 +70,12 @@ export default class InviteCutTimePanel extends Panel {
let
sec
=
~~
((
time
-
hour
*
3600000
-
min
*
60000
)
/
1000
);
// 秒
return
{
hour
:
thi
s
.
prefixInteger
(
hour
,
2
),
min
:
thi
s
.
prefixInteger
(
min
,
2
),
sec
:
thi
s
.
prefixInteger
(
sec
,
2
)
hour
:
Util
s
.
prefixInteger
(
hour
,
2
),
min
:
Util
s
.
prefixInteger
(
min
,
2
),
sec
:
Util
s
.
prefixInteger
(
sec
,
2
)
}
}
prefixInteger
(
num
,
length
)
{
return
(
Array
(
length
).
join
(
'0'
)
+
num
).
slice
(
-
length
);
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
...
...
egret/src/panels/InvitePanel.ts
View file @
70c865fa
...
...
@@ -3,6 +3,7 @@ import { iswx } from "../iswx";
import
getSkinPath
from
"../../libs/new_wx/utils/getSkinPath"
;
import
InviteRulePanel
from
"./InviteRulePanel"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
Utils
from
"../Utils"
;
export
default
class
InvitePanel
extends
Panel
{
public
prizeImg
:
eui
.
Image
;
...
...
@@ -114,16 +115,12 @@ export default class InvitePanel extends Panel {
let
sec
=
~~
((
time
-
hour
*
3600000
-
min
*
60000
)
/
1000
);
// 秒
return
{
hour
:
thi
s
.
prefixInteger
(
hour
,
2
),
min
:
thi
s
.
prefixInteger
(
min
,
2
),
sec
:
thi
s
.
prefixInteger
(
sec
,
2
)
hour
:
Util
s
.
prefixInteger
(
hour
,
2
),
min
:
Util
s
.
prefixInteger
(
min
,
2
),
sec
:
Util
s
.
prefixInteger
(
sec
,
2
)
}
}
prefixInteger
(
num
,
length
)
{
return
(
Array
(
length
).
join
(
'0'
)
+
num
).
slice
(
-
length
);
}
private
setWXShareTip
()
{
this
.
wxShareTip
.
visible
=
false
;
this
.
wxShareTip
.
width
=
this
.
width
/
window
.
innerWidth
*
window
.
innerWidth
;
...
...
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