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
a728ed0e
Commit
a728ed0e
authored
Oct 30, 2019
by
wjf
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
c6b66336
e929f92f
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
116 additions
and
75 deletions
+116
-75
MainBase.ts
egret/libs/new_wx/MainBase.ts
+2
-0
main2.tmproject
egret/resource/TextureMerger/main2.tmproject
+1
-1
scratch.tmproject
egret/resource/TextureMerger/scratch.tmproject
+1
-1
scratch_mask.png
egret/resource/assets/scratch/scratch_mask.png
+0
-0
default.res.json
egret/resource/default.res.json
+6
-1
BagItemSkin.exml
egret/resource/skins/BagItemSkin.exml
+1
-1
ScratchSkin.exml
egret/resource/skins/ScratchSkin.exml
+4
-5
StartSkin.exml
egret/resource/skins/StartSkin.exml
+2
-2
H52Scene.ts
egret/src/H52Scene.ts
+4
-0
AdSmallComp.ts
egret/src/mapScene/AdSmallComp.ts
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+5
-3
ScratchIcon.ts
egret/src/mapScene/icon/ScratchIcon.ts
+3
-0
TurntableIcon.ts
egret/src/mapScene/icon/TurntableIcon.ts
+2
-2
BagPanel.ts
egret/src/panels/BagPanel.ts
+2
-2
InvitePrizePanel.ts
egret/src/panels/InvitePrizePanel.ts
+2
-2
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+62
-20
ScratchPrizePanel.ts
egret/src/panels/ScratchPrizePanel.ts
+2
-0
advert.json
mock/happyclear/advert.json
+3
-3
getBackReward.json
mock/happyclear/getBackReward.json
+1
-1
getInviteInfo.json
mock/happyclear/getInviteInfo.json
+1
-19
home.json
mock/happyclear/home.json
+2
-2
scratchGetTaskInfo.json
mock/happyclear/scratchGetTaskInfo.json
+9
-9
No files found.
egret/libs/new_wx/MainBase.ts
View file @
a728ed0e
...
...
@@ -349,6 +349,8 @@ export default class MainBase extends eui.UILayer {
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turntable.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turnprize.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/sprize.svga'
);
RES
.
getResAsync
(
'FZY4JW_TTF'
);
RES
.
getResAsync
(
'FZY3JW_1_TTF'
);
}
catch
(
e
)
{
console
.
error
(
e
);
...
...
egret/resource/TextureMerger/main2.tmproject
View file @
a728ed0e
This diff is collapsed.
Click to expand it.
egret/resource/TextureMerger/scratch.tmproject
View file @
a728ed0e
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"scratch","version":5,"files":["../assets/scratch/scratch_bg.png","../assets/scratch/scratch_hongbao.png","../assets/scratch/scratch_help.png","../assets/scratch/scratch_progress_bg.png","../assets/scratch/scratch_wx_tip.png","../assets/scratch/scratchbg2.png","../assets/scratch/scratch_invite.png","../assets/scratch/scratch_card_90.png","../assets/scratch/scratch_card_96.png","../assets/scratch/scratch_card_94.png","../assets/scratch/scratch_card_98.png","../assets/scratch/scratch_user1.png","../assets/scratch/scratch_card_bg.png","../assets/scratch/scratch_card_92.png","../assets/scratch/scratch_user2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"scratch","version":5,"files":["../assets/scratch/scratch_bg.png","../assets/scratch/scratch_hongbao.png","../assets/scratch/scratch_help.png","../assets/scratch/scratch_progress_bg.png","../assets/scratch/scratch_wx_tip.png","../assets/scratch/scratchbg2.png","../assets/scratch/scratch_invite.png","../assets/scratch/scratch_card_90.png","../assets/scratch/scratch_card_96.png","../assets/scratch/scratch_card_94.png","../assets/scratch/scratch_card_98.png","../assets/scratch/scratch_user1.png","../assets/scratch/scratch_card_bg.png","../assets/scratch/scratch_card_92.png","../assets/scratch/scratch_user2.png","../assets/scratch/scratch_mask.png"]}
\ No newline at end of file
egret/resource/assets/scratch/scratch_mask.png
0 → 100644
View file @
a728ed0e
10.8 KB
egret/resource/default.res.json
View file @
a728ed0e
...
...
@@ -129,7 +129,7 @@
"name"
:
"friendshare"
},
{
"keys"
:
"scratch_bg_png,scratch_hongbao_png,scratch_help_png,scratch_progress_bg_png,scratch_wx_tip_png,scratchbg2_png,scratch_invite_png,scratch_card_90_png,scratch_card_96_png,scratch_card_94_png,scratch_card_98_png,scratch_user1_png,scratch_card_bg_png,scratch_card_92_png,scratch_user2_png"
,
"keys"
:
"scratch_bg_png,scratch_hongbao_png,scratch_help_png,scratch_progress_bg_png,scratch_wx_tip_png,scratchbg2_png,scratch_invite_png,scratch_card_90_png,scratch_card_96_png,scratch_card_94_png,scratch_card_98_png,scratch_user1_png,scratch_card_bg_png,scratch_card_92_png,scratch_user2_png
,scratch_mask_png
"
,
"name"
:
"scratch"
},
{
...
...
@@ -2917,6 +2917,11 @@
"url"
:
"assets/common/FZY4JW.TTF"
,
"type"
:
"bin"
,
"name"
:
"FZY4JW_TTF"
},
{
"url"
:
"assets/scratch/scratch_mask.png"
,
"type"
:
"image"
,
"name"
:
"scratch_mask_png"
}
]
}
\ No newline at end of file
egret/resource/skins/BagItemSkin.exml
View file @
a728ed0e
...
...
@@ -4,5 +4,5 @@
<e:Image
id=
"hammer"
source=
"bag_icon2_png"
horizontalCenter=
"-6"
verticalCenter=
"0.5"
visible=
"false"
/>
<e:Image
id=
"boom"
source=
"bag_icon1_png"
horizontalCenter=
"0"
verticalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"change"
source=
"bag_icon3_png"
horizontalCenter=
"0"
verticalCenter=
"0"
visible=
"false"
/>
<e:Label
id=
"nums"
text=
"15"
textColor=
"0xc33700"
right=
"10"
bottom=
"10"
/>
<e:Label
id=
"nums"
text=
"15"
textColor=
"0xc33700"
right=
"10"
bottom=
"10"
fontFamily=
"FZY3JW"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/ScratchSkin.exml
View file @
a728ed0e
...
...
@@ -4,11 +4,10 @@
<w:Config
id=
"16dd8f58b77"
visible=
"false"
/>
<e:Image
id=
"light2"
x=
"376"
y=
"317"
anchorOffsetX=
"356"
anchorOffsetY=
"296"
source=
"scratchbg2_png"
/>
<e:Image
id=
"light1"
x=
"376"
y=
"317"
anchorOffsetX=
"356"
anchorOffsetY=
"296"
source=
"scratchbg2_png"
/>
<e:Group
id=
"con"
y=
"5
8
.03"
/>
<e:Label
id=
"numLabel"
text=
"共2位好友帮你刮了90.3%"
y=
"381.33"
textColor=
"0xF54500"
size=
"2
8"
horizontalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
fontFamily=
"z2
"
/>
<e:Group
id=
"con"
y=
"5
3
.03"
/>
<e:Label
id=
"numLabel"
text=
"共2位好友帮你刮了90.3%"
y=
"381.33"
textColor=
"0xF54500"
size=
"2
7"
horizontalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
fontFamily=
"FZY3JW
"
/>
<e:Image
y=
"414"
horizontalCenter=
"0"
source=
"scratch_card_bg_png"
/>
<e:Image
id=
"prizeImg"
y=
"435"
source=
""
width=
"510"
height=
"228"
horizontalCenter=
"0"
/>
<e:Image
id=
"scratch_progress"
y=
"414"
horizontalCenter=
"0"
x=
"10"
source=
"scratch_card_90_png"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"605"
y=
"219.33"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
xmlns:w=
"http://ns.egret.com/wing"
>
...
...
@@ -26,7 +25,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
id=
"cutTimeLabel"
text=
"将在23:43:21后失效"
y=
"895.33"
size=
"28"
textColor=
"0xffffff"
horizontalCenter=
"0.5"
fontFamily=
"
z2"
bold=
"true
"
/>
<e:Label
id=
"cutTimeLabel"
text=
"将在23:43:21后失效"
y=
"895.33"
size=
"28"
textColor=
"0xffffff"
horizontalCenter=
"0.5"
fontFamily=
"
FZY3JW
"
/>
<e:Label
text=
"帮刮\n记录"
y=
"805"
size=
"28"
textColor=
"0xFFFFFF"
horizontalCenter=
"-248"
/>
<e:Scroller
width=
"487"
height=
"90"
y=
"783"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
horizontalCenter=
"32.5"
>
<e:Group
anchorOffsetX=
"0"
y=
"2"
>
...
...
@@ -49,7 +48,7 @@
<e:Group
id=
"progressGroup"
x=
"8"
verticalCenter=
"0"
>
<e:Image
id=
"progressBg"
source=
"scratch_progress_bg_png"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
x=
"0"
y=
"0"
width=
"437"
height=
"22"
/>
<e:Rect
id=
"progress"
fillColor=
"0xeb1917"
left=
"0"
verticalCenter=
"0"
width=
"0"
top=
"0"
bottom=
"0"
/>
<e:Label
id=
"progressLabel"
text=
"仅剩90.7%"
size=
"18"
verticalCenter=
"2"
horizontalCenter=
"0.5"
bold=
"true"
verticalAlign=
"middle"
textAlign=
"center"
fontFamily=
"
z2
"
/>
<e:Label
id=
"progressLabel"
text=
"仅剩90.7%"
size=
"18"
verticalCenter=
"2"
horizontalCenter=
"0.5"
bold=
"true"
verticalAlign=
"middle"
textAlign=
"center"
fontFamily=
"
FZY3JW
"
/>
</e:Group>
<e:Image
id=
"hongbao"
source=
"scratch_hongbao_png"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
horizontalCenter=
"219"
/>
</e:Group>
...
...
egret/resource/skins/StartSkin.exml
View file @
a728ed0e
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"StartSkin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16705cb4eec"
/>
<e:Label
id=
"FZY
TW3"
text=
"1"
y=
"1048"
textColor=
"0x244B00"
fontFamily=
"FZYTW3"
horizontalCenter=
"0
"
/>
<e:Label
id=
"FZY
TW4"
text=
"1"
y=
"1048"
textColor=
"0x244B00"
fontFamily=
"FZYTW4"
horizontalCenter=
"0
"
/>
<e:Label
id=
"FZY
3JW"
text=
" "
y=
"1048"
textColor=
"0x244B00"
fontFamily=
"FZY3JW"
horizontalCenter=
"0"
visible=
"false
"
/>
<e:Label
id=
"FZY
4JW"
text=
" "
y=
"1048"
textColor=
"0x244B00"
fontFamily=
"FZY4JW"
horizontalCenter=
"0"
visible=
"false
"
/>
<e:Component
id=
"container1"
width=
"20"
height=
"20"
x=
"0"
y=
"0"
/>
<e:Component
id=
"container2"
width=
"20"
height=
"20"
x=
"0"
y=
"0"
/>
<e:Group
x=
"140"
y=
"1023.94"
>
...
...
egret/src/H52Scene.ts
View file @
a728ed0e
import
Scene
from
"../libs/new_wx/components/Scene"
;
import
Utils
from
"./Utils"
;
import
PanelCtrl
from
"../libs/new_wx/ctrls/panelCtrl"
;
import
{
NetManager
}
from
"../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"./Main"
;
export
default
class
H52Scene
extends
Scene
{
async
start
(
data
?)
{
NetManager
.
ins
.
showLog
(
getlogItem
(
51
));
super
.
start
();
this
[
'group'
].
y
=
(
this
.
stage
.
stageHeight
-
1624
)
/
2
// this.height=this.stage.stageHeight;
...
...
@@ -13,6 +16,7 @@ export default class H52Scene extends Scene {
// PanelCtrl.instance.show('inviterule')
// },this);
this
[
'gobtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
51
));
const
code
=
Utils
.
getRequestByKey
(
'shareCode'
);
window
.
location
.
href
=
`
${
window
[
'targetUrl'
]}
&shareCode=
${
code
}
`
},
this
);
...
...
egret/src/mapScene/AdSmallComp.ts
View file @
a728ed0e
...
...
@@ -29,7 +29,7 @@ export default class AdSmallComp extends ComponentBase {
this
[
'img'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
data
.
logid
)
NetManager
.
ins
.
show
Log
(
getlogItem
(
data
.
logid
));
NetManager
.
ins
.
click
Log
(
getlogItem
(
data
.
logid
));
wait
(
50
).
then
(()
=>
{
window
.
location
.
href
=
result
.
url
;
});
...
...
egret/src/mapScene/MapScene.ts
View file @
a728ed0e
...
...
@@ -26,6 +26,7 @@ import ScratchIcon from "./icon/ScratchIcon";
import
TurntableIcon
from
"./icon/TurntableIcon"
;
let
doHelpFlag
=
false
;
let
doScratchHelpFlag
=
false
;
// let adTag = false;
export
default
class
MapScene
extends
Scene
{
static
adData
;
...
...
@@ -43,12 +44,12 @@ export default class MapScene extends Scene {
sendInvite
()
{
const
code
=
Utils
.
getRequestByKey
(
'shareCode'
);
if
(
!
code
)
return
;
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
if
(
!
dojoin
)
return
;
if
(
doHelpFlag
)
{
return
;
}
if
(
code
.
indexOf
(
"12345678"
)
==
-
1
){
// 邀请有礼
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
if
(
!
dojoin
)
return
;
NetManager
.
ins
.
doHelp
((
success
,
res
)
=>
{
doHelpFlag
=
true
;
switch
(
true
)
{
...
...
@@ -73,6 +74,7 @@ export default class MapScene extends Scene {
}
if
(
!
success
)
{
return
;
}
showToast
(
"帮刮成功!"
);
NetManager
.
ins
.
showLog
(
getlogItem
(
52
));
NetManager
.
ins
.
showLog
(
getlogItem
(
36
));
},
_code
);
}
...
...
@@ -301,7 +303,7 @@ export default class MapScene extends Scene {
if
(
mapAdvert
==
null
)
mapAdvert
=
{
enable
:
false
,
advertList
:
[]}
this
[
'adBtn'
].
visible
=
mapAdvert
.
enable
;
if
(
this
[
'adBtn'
])
{
if
(
this
[
'adBtn'
]
.
visible
)
{
NetManager
.
ins
.
showLog
(
getlogItem
(
32
));
}
if
(
mapAdvert
.
enable
)
{
...
...
egret/src/mapScene/icon/ScratchIcon.ts
View file @
a728ed0e
...
...
@@ -8,12 +8,14 @@ import { loadSvga } from "../../loadSvga";
import
getResPath
from
"../../../libs/new_tc/getResPath"
;
import
Utils
from
"../../Utils"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
getlogItem
}
from
"../../Main"
;
export
default
class
ScratchIcon
extends
IconBase
{
private
cutTimer
:
CutTimer
=
null
;
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
super
(
name
,
group
,
btn
,
tipsBg
,
tipsLabel
);
NetManager
.
ins
.
showLog
(
getlogItem
(
49
));
}
protected
start
()
{
...
...
@@ -64,6 +66,7 @@ export default class ScratchIcon extends IconBase {
*/
protected
onTouchBtn
(
e
:
egret
.
TouchEvent
)
{
super
.
onTouchBtn
(
e
);
NetManager
.
ins
.
showLog
(
getlogItem
(
49
));
NetManager
.
ins
.
scratchGetTaskInfo
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
...
...
egret/src/mapScene/icon/TurntableIcon.ts
View file @
a728ed0e
...
...
@@ -11,11 +11,11 @@ import { getlogItem } from "../../Main";
export
default
class
TurntableIcon
extends
IconBase
{
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
?:
eui
.
Image
,
tipsLabel
?:
eui
.
Label
)
{
super
(
name
,
group
,
btn
,
tipsBg
,
tipsLabel
);
NetManager
.
ins
.
showLog
(
getlogItem
(
43
));
}
protected
start
()
{
super
.
start
();
NetManager
.
ins
.
showLog
(
getlogItem
(
43
));
//有免费次数
//没有免费次数
//如果元宝足够
...
...
@@ -23,8 +23,8 @@ export default class TurntableIcon extends IconBase {
}
updateIcon
(){
NetManager
.
ins
.
clickLog
(
getlogItem
(
43
));
NetManager
.
ins
.
hc_turnableBaseInfo
((
success
,
res
)
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
43
));
if
(
!
success
){
this
.
visible
=
false
;
return
;
...
...
egret/src/panels/BagPanel.ts
View file @
a728ed0e
...
...
@@ -32,14 +32,14 @@ export default class BagPanel extends Panel {
this
[
'btn2'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
'group1'
].
visible
=
true
;
this
[
'group2'
].
visible
=
false
;
NetManager
.
ins
.
click
Log
(
getlogItem
(
39
));
NetManager
.
ins
.
show
Log
(
getlogItem
(
39
));
},
this
);
this
[
'recordbtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
window
.
location
.
href
=
window
[
'__link__'
];
},
this
);
this
[
'shopbtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
PanelCtrl
.
instance
.
show
(
'Shop'
);
NetManager
.
ins
.
show
Log
(
getlogItem
(
39
));
NetManager
.
ins
.
click
Log
(
getlogItem
(
39
));
},
this
);
this
.
list
.
itemRenderer
=
BagItemRenderer
;
...
...
egret/src/panels/InvitePrizePanel.ts
View file @
a728ed0e
...
...
@@ -23,7 +23,7 @@ export default class InvitePrizePanel extends Panel {
start
()
{
super
.
start
();
NetManager
.
ins
.
showLog
(
getlogItem
(
3
8
));
NetManager
.
ins
.
showLog
(
getlogItem
(
3
7
));
}
protected
onSkinComplete
()
{
...
...
@@ -60,7 +60,7 @@ export default class InvitePrizePanel extends Panel {
}
onTapGoPrize
()
{
NetManager
.
ins
.
show
Log
(
getlogItem
(
37
));
NetManager
.
ins
.
click
Log
(
getlogItem
(
37
));
window
.
location
.
href
=
window
[
'__link__'
];
}
...
...
egret/src/panels/ScratchPanel.ts
View file @
a728ed0e
...
...
@@ -7,18 +7,59 @@ import ScratchRulePanel from "./ScratchRulePanel";
import
CutTimer
from
"../CutTimer"
;
import
Utils
from
"../Utils"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
GradientType
=
egret
.
GradientType
;
import
{
getlogItem
}
from
"../Main"
;
export
default
class
ScratchPanel
extends
Panel
{
private
cutTimer
:
CutTimer
;
private
myShape
:
egret
.
Shape
=
new
egret
.
Shape
();
constructor
(
data
)
{
super
();
this
.
data
=
data
;
}
private
pIndex
=
0
;
setGtaphics
(
x
,
y
)
{
setTimeout
(()
=>
{
if
(
this
.
pIndex
%
2
==
0
){
// 双数
y
-=
25
;
if
(
y
<=
this
[
"prizeImg"
].
y
){
this
.
pIndex
++
;
}
}
else
{
// 单数
y
+=
25
;
if
(
y
>=
(
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
)){
this
.
pIndex
++
;
}
}
x
+=
5
;
this
.
myShape
.
graphics
.
lineTo
(
x
,
y
);
if
(
x
>
(
+
this
.
data
.
completePercent
)
/
100
*
this
[
"prizeImg"
].
width
){
return
;
}
this
.
setGtaphics
(
x
,
y
);
},
20
);
}
async
start
(
data
)
{
super
.
start
();
this
.
showlog
();
this
.
initUI
();
this
.
myShape
.
graphics
.
beginFill
(
0xff0000
,
0
);
this
.
myShape
.
graphics
.
drawRect
(
this
[
"prizeImg"
].
x
,
this
[
"prizeImg"
].
y
,
this
[
"prizeImg"
].
width
,
this
[
"prizeImg"
].
height
);
this
.
myShape
.
graphics
.
endFill
();
this
.
addChild
(
this
.
myShape
);
this
[
"prizeImg"
].
mask
=
this
.
myShape
;
this
.
myShape
.
graphics
.
lineStyle
(
130
,
0xff0000
,
1
);
this
.
myShape
.
graphics
.
moveTo
(
this
[
"prizeImg"
].
x
-
30
,
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
width
);
setTimeout
(()
=>
{
this
.
setGtaphics
(
this
[
"prizeImg"
].
x
,
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
);
},
500
);
const
scratchData
=
DataManager
.
ins
.
getData
(
'hc_turnableDojoin'
);
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
false
;
...
...
@@ -42,7 +83,7 @@ export default class ScratchPanel extends Panel {
}
showlog
()
{
NetManager
.
ins
.
showLog
(
getlogItem
(
50
));
}
initEvents
()
{
...
...
@@ -76,7 +117,7 @@ export default class ScratchPanel extends Panel {
}
protected
onSkinComplete
()
{
this
.
getGameRes
().
then
(
r
=>
this
.
initUI
());
}
initUI
()
{
...
...
@@ -148,24 +189,24 @@ export default class ScratchPanel extends Panel {
let
_duration
=
1000
*
dProgress
/
100
;
// 算出变化的时间
egret
.
Tween
.
get
(
this
[
"progress"
]).
to
({
width
:
_width
},
_duration
);
let
i
=
new
eui
.
Image
();
if
(
progress
>=
100
)
{
this
[
"scratch_progress"
].
visible
=
false
;
}
else
if
(
progress
>=
98
&&
progress
<
100
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_98_png"
;
}
else
if
(
progress
>=
96
&&
progress
<
98
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_96_png"
;
}
else
if
(
progress
>=
94
&&
progress
<
96
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_94_png"
;
}
else
if
(
progress
>=
92
&&
progress
<
96
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_92_png"
;
}
else
if
(
progress
<
92
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_90_png"
;
}
//
if(progress >= 100) {
//
this["scratch_progress"].visible = false;
//
} else if(progress >= 98 && progress < 100) {
//
this["scratch_progress"].visible = true;
//
this["scratch_progress"].source = "scratch_card_98_png";
//
} else if(progress >= 96 && progress < 98) {
//
this["scratch_progress"].visible = true;
//
this["scratch_progress"].source = "scratch_card_96_png";
//
} else if(progress >= 94 && progress < 96) {
//
this["scratch_progress"].visible = true;
//
this["scratch_progress"].source = "scratch_card_94_png";
//
} else if(progress >= 92 && progress < 96) {
//
this["scratch_progress"].visible = true;
//
this["scratch_progress"].source = "scratch_card_92_png";
//
} else if(progress < 92) {
//
this["scratch_progress"].visible = true;
//
this["scratch_progress"].source = "scratch_card_90_png";
//
}
}
private
setWXShareTip
()
{
...
...
@@ -221,6 +262,7 @@ class ScratchItem extends eui.ItemRenderer {
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
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
50
));
NetManager
.
ins
.
scratchGetShareCode
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
...
...
egret/src/panels/ScratchPrizePanel.ts
View file @
a728ed0e
...
...
@@ -24,6 +24,7 @@ export default class ScratchPrizePanel extends Panel {
start
()
{
super
.
start
();
this
.
initUI
();
NetManager
.
ins
.
showLog
(
getlogItem
(
53
));
NetManager
.
ins
.
showLog
(
getlogItem
(
54
));
}
...
...
@@ -51,6 +52,7 @@ export default class ScratchPrizePanel extends Panel {
super
.
onTouchTap_closeBtn
();
break
;
case
(
e
.
target
==
this
.
ok_btn
):
// 去领奖
NetManager
.
ins
.
clickLog
(
getlogItem
(
53
));
window
.
location
.
href
=
window
[
'__link__'
];
break
;
case
(
e
.
target
==
this
.
game_btn
):
// 继续闯关
...
...
mock/happyclear/advert.json
View file @
a728ed0e
{
"code"
:
"0000000000"
,
"data"
:
{
"mapAdvert"
:
{
"mapAdvert
1
"
:
{
"enable"
:
true
,
"advertList"
:
[
{
...
...
@@ -10,7 +10,7 @@
}
]
},
"noticeAdvert"
:
{
"noticeA
1
dvert"
:
{
"enable"
:
true
,
"advertList"
:
[
{
...
...
@@ -19,7 +19,7 @@
}
]
},
"popupAdvert"
:
{
"enable"
:
true
,
"popupAd
1
vert"
:
{
"enable"
:
true
,
"advertList"
:
[
{
"img"
:
"//yun.duiba.com.cn/images/201910/zqtdp6xibw.jpg"
,
...
...
mock/happyclear/getBackReward.json
View file @
a728ed0e
...
...
@@ -16,6 +16,6 @@
"value"
:
"虚拟商品标识符"
},
"desc"
:
"OK"
,
"success"
:
true
,
"success"
:
0
,
"timestamp"
:
1572079274940
}
\ No newline at end of file
mock/happyclear/getInviteInfo.json
View file @
a728ed0e
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1572249599076
,
"data"
:
{
"invitationId"
:
null
,
"invitationCount"
:
null
,
"sysTime"
:
null
,
"endTime"
:
null
,
"completeFlag"
:
6
,
"openPrizMsg"
:
null
,
"prizeType"
:
null
,
"prizeName"
:
null
,
"prizeImg"
:
null
,
"facePrice"
:
null
,
"invitationUser"
:
null
}
}
\ No newline at end of file
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1572403459420
,
"data"
:{
"invitationId"
:
null
,
"invitationCount"
:
1
,
"sysTime"
:
1572403459405
,
"endTime"
:
1572489858000
,
"completeFlag"
:
0
,
"openPrizMsg"
:
null
,
"prizeType"
:
"7"
,
"prizeName"
:
null
,
"prizeImg"
:
"//yun.dui88.com/images/201910/s0yhv1nlil.jpeg"
,
"facePrice"
:
"3651404_286462788044574721"
,
"invitationUser"
:[]}}
\ No newline at end of file
mock/happyclear/home.json
View file @
a728ed0e
...
...
@@ -22,9 +22,9 @@
"num"
:
3
}
],
"remainEnargy"
:
1
,
"remainEnargy"
:
5
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
0
,
"canReceiveTreasureBoxNum"
:
1
0
,
"nextRangeStarsNum"
:
0
,
"isGetAllTreasureBox"
:
true
,
"refectionCountdown"
:
1685
...
...
mock/happyclear/scratchGetTaskInfo.json
View file @
a728ed0e
...
...
@@ -2,17 +2,17 @@
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
15724
05066301
,
"timestamp"
:
15724
20059060
,
"data"
:
{
"scratchCardTaskId"
:
1
,
"taskStatus"
:
1
,
"scratchCardTaskId"
:
3
,
"taskStatus"
:
2
,
"prizeImage"
:
"//yun.dui88.com/images/201910/9u6nk8sjt8.jpg"
,
"currentTime"
:
15724
0506629
0
,
"endTime"
:
157249
1337
000
,
"completePercent"
:
"
91.
0"
,
"remainPercent"
:
"
9.
0"
,
"currentTime"
:
15724
2005906
0
,
"endTime"
:
157249
3282
000
,
"completePercent"
:
"
10
0"
,
"remainPercent"
:
"0"
,
"totalNeedCount"
:
1
,
"helpedCount"
:
0
,
"avatarList"
:
[]
"helpedCount"
:
1
,
"avatarList"
:
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