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
1dcc0e20
Commit
1dcc0e20
authored
Oct 29, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b98fa211
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
Utils.ts
egret/src/Utils.ts
+3
-0
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+1
-0
scratchGetTaskInfo.json
mock/happyclear/scratchGetTaskInfo.json
+12
-12
No files found.
egret/src/Utils.ts
View file @
1dcc0e20
...
@@ -60,6 +60,9 @@ export default class Utils {
...
@@ -60,6 +60,9 @@ export default class Utils {
* @returns {Object} obj - 拷贝完成的对象
* @returns {Object} obj - 拷贝完成的对象
*/
*/
public
static
deepClone
(
src
,
dst
=
undefined
)
{
public
static
deepClone
(
src
,
dst
=
undefined
)
{
if
(
src
){
return
src
;
}
let
_obj
=
dst
||
(
src
instanceof
Array
?
[]
:
{});
let
_obj
=
dst
||
(
src
instanceof
Array
?
[]
:
{});
for
(
let
key
in
src
)
{
for
(
let
key
in
src
)
{
let
prop
=
src
[
key
];
let
prop
=
src
[
key
];
...
...
egret/src/panels/ScratchPanel.ts
View file @
1dcc0e20
...
@@ -214,6 +214,7 @@ class ScratchItem extends eui.ItemRenderer {
...
@@ -214,6 +214,7 @@ class ScratchItem extends eui.ItemRenderer {
dataChanged
()
{
dataChanged
()
{
this
.
img
.
mask
=
this
.
mask
;
this
.
img
.
mask
=
this
.
mask
;
let
s
=
this
.
data
.
avatar
||
"http://yun.duiba.com.cn/db_games/default_avatar.png"
;
this
.
img
.
source
=
this
.
data
.
avatar
||
"http://yun.duiba.com.cn/db_games/default_avatar.png"
;
this
.
img
.
source
=
this
.
data
.
avatar
||
"http://yun.duiba.com.cn/db_games/default_avatar.png"
;
this
.
img
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
img
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
scratchGetShareCode
((
success
,
res
)
=>
{
NetManager
.
ins
.
scratchGetShareCode
((
success
,
res
)
=>
{
...
...
mock/happyclear/scratchGetTaskInfo.json
View file @
1dcc0e20
{
{
"success"
:
true
,
"success"
:
true
,
"code"
:
null
,
"code"
:
"0000000000"
,
"desc"
:
null
,
"desc"
:
"OK"
,
"timestamp"
:
15
6619982230
8
,
"timestamp"
:
15
7231893338
8
,
"data"
:
{
"data"
:
{
"scratchCardTaskId"
:
1
222
,
"scratchCardTaskId"
:
1
,
"taskStatus"
:
1
,
"taskStatus"
:
1
,
"prizeImage"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"prizeImage"
:
"//yun.dui88.com/images/201910/e6pmpk2pne.png"
,
"currentTime"
:
1570673808000
,
"currentTime"
:
1572318933366
,
"endTime"
:
1570673810000
,
"endTime"
:
1572358710000
,
"completePercent"
:
"90.50"
,
"completePercent"
:
"91.0"
,
"remainPercent"
:
"9.50"
,
"remainPercent"
:
"9.0"
,
"helpedCount"
:
4
,
"totalNeedCount"
:
3
,
"helpedCount"
:
1
,
"avatarList"
:
[
"avatarList"
:
[
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
null
""
]
]
}
}
}
}
\ 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