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
b9c93791
Commit
b9c93791
authored
Mar 23, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b4fa4d57
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
114 additions
and
62 deletions
+114
-62
MainBase.ts
egret/libs/new_wx/MainBase.ts
+2
-0
help_invite2_text3.png
egret/resource/assets/help/help_invite2_text3.png
+0
-0
help_invite2_text4.png
egret/resource/assets/help/help_invite2_text4.png
+0
-0
default.res.json
egret/resource/default.res.json
+11
-1
default.thm.json
egret/resource/default.thm.json
+1
-0
HelpInviteSkin.exml
egret/resource/skins/HelpInviteSkin.exml
+7
-9
HelpScratchSkin.exml
egret/resource/skins/HelpScratchSkin.exml
+14
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+7
-27
HelpBloodPanel.ts
egret/src/panels/help/HelpBloodPanel.ts
+1
-1
HelpInvitePanel.ts
egret/src/panels/help/HelpInvitePanel.ts
+12
-22
HelpScratchPanel.ts
egret/src/panels/help/HelpScratchPanel.ts
+57
-0
doHelp.json
mock/happyclear/doHelp.json
+2
-2
No files found.
egret/libs/new_wx/MainBase.ts
View file @
b9c93791
...
@@ -80,6 +80,7 @@ import BombTips2Panel from "../../src/panels/BombTips2Panel";
...
@@ -80,6 +80,7 @@ import BombTips2Panel from "../../src/panels/BombTips2Panel";
import
BackIndexPanel
from
"../../src/panels/BackIndexPanel"
;
import
BackIndexPanel
from
"../../src/panels/BackIndexPanel"
;
import
HelpBloodPanel
from
"../../src/panels/help/HelpBloodPanel"
;
import
HelpBloodPanel
from
"../../src/panels/help/HelpBloodPanel"
;
import
HelpInvitePanel
from
"../../src/panels/help/HelpInvitePanel"
;
import
HelpInvitePanel
from
"../../src/panels/help/HelpInvitePanel"
;
import
HelpScratchPanel
from
"../../src/panels/help/HelpScratchPanel"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
constructor
()
{
...
@@ -170,6 +171,7 @@ export default class MainBase extends eui.UILayer {
...
@@ -170,6 +171,7 @@ export default class MainBase extends eui.UILayer {
[
'recharge'
,
{
cls
:
RechargePanel
}],
[
'recharge'
,
{
cls
:
RechargePanel
}],
[
'HelpBloodPanel'
,
{
cls
:
HelpBloodPanel
}],
[
'HelpBloodPanel'
,
{
cls
:
HelpBloodPanel
}],
[
'HelpInvitePanel'
,
{
cls
:
HelpInvitePanel
}],
[
'HelpInvitePanel'
,
{
cls
:
HelpInvitePanel
}],
[
'HelpScratchPanel'
,
{
cls
:
HelpScratchPanel
}],
];
];
const
scenes
=
[
const
scenes
=
[
...
...
egret/resource/assets/help/help_invite2_text3.png
0 → 100644
View file @
b9c93791
15.3 KB
egret/resource/assets/help/help_invite2_text4.png
0 → 100644
View file @
b9c93791
13.9 KB
egret/resource/default.res.json
View file @
b9c93791
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
},
},
{
{
"name"
:
"preload"
,
"name"
:
"preload"
,
"keys"
:
"help_blood_fail_text2_png,help_blood_fail_text3_png,help_blood_fail_text4_png"
"keys"
:
"help_blood_fail_text2_png,help_blood_fail_text3_png,help_blood_fail_text4_png
,help_invite2_text3_png,help_invite2_text4_png
"
}
}
],
],
"resources"
:
[
"resources"
:
[
...
@@ -5085,6 +5085,16 @@
...
@@ -5085,6 +5085,16 @@
"name"
:
"help_blood_fail_text4_png"
,
"name"
:
"help_blood_fail_text4_png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"url"
:
"assets/help/help_blood_fail_text4.png"
"url"
:
"assets/help/help_blood_fail_text4.png"
},
{
"name"
:
"help_invite2_text3_png"
,
"type"
:
"image"
,
"url"
:
"assets/help/help_invite2_text3.png"
},
{
"name"
:
"help_invite2_text4_png"
,
"type"
:
"image"
,
"url"
:
"assets/help/help_invite2_text4.png"
}
}
]
]
}
}
\ No newline at end of file
egret/resource/default.thm.json
View file @
b9c93791
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
"skins"
:
{},
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"exmls"
:
[
"resource/skins/HelpScratchSkin.exml"
,
"resource/skins/HelpBloodSkin.exml"
,
"resource/skins/HelpBloodSkin.exml"
,
"resource/skins/HelpInviteSkin.exml"
,
"resource/skins/HelpInviteSkin.exml"
,
"resource/skins/ADSkin.exml"
,
"resource/skins/ADSkin.exml"
,
...
...
egret/resource/skins/HelpInviteSkin.exml
View file @
b9c93791
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"HelpInviteSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
class=
"HelpInviteSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
source=
"help_blood_1_bg_png"
y=
"26"
horizontalCenter=
"0
"
/>
<e:Image
y=
"26"
horizontalCenter=
"0"
source=
"help_invite2_png
"
/>
<e:Group
y=
"855"
horizontalCenter=
"0"
>
<e:Group
y=
"855"
horizontalCenter=
"0"
>
<e:Image
id=
"helpbtn"
source=
"help_blood_1_btn_png"
x=
"0"
y=
"0
"
/>
<e:Image
id=
"helpbtn"
x=
"0"
y=
"0"
source=
"help_invite2_btn_png
"
/>
<e:Image
id=
"gobtn"
source=
"help_blood_fail_btn_png"
x=
"0"
y=
"0
"
visible=
"false"
/>
<e:Image
id=
"gobtn"
x=
"0"
y=
"0"
source=
"help_invite2_btn2_png
"
visible=
"false"
/>
</e:Group>
</e:Group>
<e:Group
y=
"88"
width=
"100%"
horizontalCenter=
"0"
>
<e:Group
y=
"88"
width=
"100%"
horizontalCenter=
"0"
>
<e:Image
id=
"txt_standby"
source=
"help_blood_1_text_png"
y=
"0"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_standby"
y=
"0"
horizontalCenter=
"0"
source=
"help_invite2_text_png"
visible=
"false"
/>
<e:Image
id=
"txt_success"
source=
"help_blood_success_text2_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_success"
horizontalCenter=
"0"
source=
"help_invite2_text2_png"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002026"
source=
"help_blood_fail_text_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error0200202"
horizontalCenter=
"0"
source=
"help_invite2_text3_png"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002016"
source=
"help_blood_fail_text2_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error400017"
horizontalCenter=
"0"
source=
"help_invite2_text4_png"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002036"
source=
"help_blood_fail_text3_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002025"
source=
"help_blood_fail_text4_png"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
</e:Group>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/HelpScratchSkin.exml
0 → 100644
View file @
b9c93791
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"HelpScratchSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
y=
"26"
horizontalCenter=
"0"
source=
"help_invite2_png"
/>
<e:Group
y=
"855"
horizontalCenter=
"0"
>
<e:Image
id=
"helpbtn"
x=
"0"
y=
"0"
source=
"help_invite2_btn_png"
/>
<e:Image
id=
"gobtn"
x=
"0"
y=
"0"
source=
"help_invite2_btn2_png"
visible=
"false"
/>
</e:Group>
<e:Group
y=
"88"
width=
"100%"
horizontalCenter=
"0"
>
<e:Image
id=
"txt_standby"
y=
"0"
horizontalCenter=
"0"
source=
"help_invite2_text_png"
visible=
"false"
/>
<e:Image
id=
"txt_success"
horizontalCenter=
"0"
source=
"help_invite2_text2_png"
visible=
"false"
/>
<e:Image
id=
"txt_error0200202"
horizontalCenter=
"0"
source=
"help_invite2_text3_png"
visible=
"false"
/>
<e:Image
id=
"txt_error400017"
horizontalCenter=
"0"
source=
"help_invite2_text4_png"
visible=
"false"
/>
</e:Group>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
b9c93791
...
@@ -82,29 +82,9 @@ export default class MapScene extends Scene {
...
@@ -82,29 +82,9 @@ export default class MapScene extends Scene {
parmas
.
push
({
netCallback
:
netCallback
,
code
:
code
});
parmas
.
push
({
netCallback
:
netCallback
,
code
:
code
});
}
else
{
// 刮刮卡
}
else
{
// 刮刮卡
const
_code
=
code
.
slice
(
8
);
const
netCallback
=
()
=>
{
doHelpFlag
=
true
;
};
NetManager
.
ins
.
scratchDoHelp
((
success
,
res
)
=>
{
panels
.
push
(
'HelpScratchPanel'
);
doHelpFlag
=
true
;
parmas
.
push
({
netCallback
:
netCallback
,
code
:
code
});
switch
(
true
)
{
case
(
res
.
code
==
"0000024"
):
showToast
(
"今日刮卡次数已达到上线限哦~"
);
break
;
case
(
res
.
code
==
"0000022"
):
showToast
(
"不可以给自己刮哦~"
);
break
;
case
(
res
.
code
==
"0000023"
):
showToast
(
"已经给好友刮过了哦~"
);
break
;
default
:
break
;
}
if
(
!
success
)
{
return
;
}
showToast
(
"助力成功,参与闯关赢现金"
/*"帮刮成功!"*/
);
NetManager
.
ins
.
showLog
(
getlogItem
(
52
));
NetManager
.
ins
.
showLog
(
getlogItem
(
36
));
},
_code
);
}
}
return
true
;
return
true
;
}
}
...
@@ -164,10 +144,10 @@ export default class MapScene extends Scene {
...
@@ -164,10 +144,10 @@ export default class MapScene extends Scene {
const
parmas
=
[];
const
parmas
=
[];
const
panels
=
[];
const
panels
=
[];
const
result
=
this
.
sendInvite
(
panels
,
parmas
);
const
result
=
this
.
sendInvite
(
panels
,
parmas
);
//
if (result) {
if
(
result
)
{
//
PanelCtrl.instance.showPanels(panels, parmas, this.onAllPanelHide);
PanelCtrl
.
instance
.
showPanels
(
panels
,
parmas
,
this
.
onAllPanelHide
);
//
return;
return
;
//
}
}
const
date
=
new
Date
();
const
date
=
new
Date
();
date
.
setHours
(
0
,
0
,
0
,
0
);
date
.
setHours
(
0
,
0
,
0
,
0
);
const
nowTimerStr
=
date
.
getTime
()
+
''
;
const
nowTimerStr
=
date
.
getTime
()
+
''
;
...
...
egret/src/panels/help/HelpBloodPanel.ts
View file @
b9c93791
...
@@ -21,7 +21,7 @@ export default class HelpBloodPanel extends Panel {
...
@@ -21,7 +21,7 @@ export default class HelpBloodPanel extends Panel {
onclick_gobtn
()
{
onclick_gobtn
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
88
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
88
));
this
.
hidePanel
();
this
.
hidePanel
();
//
gotoNextLevel();
gotoNextLevel
();
}
}
onClick
()
{
onClick
()
{
...
...
egret/src/panels/help/HelpInvitePanel.ts
View file @
b9c93791
...
@@ -22,7 +22,7 @@ export default class HelpInvitePanel extends Panel {
...
@@ -22,7 +22,7 @@ export default class HelpInvitePanel extends Panel {
onclick_gobtn
()
{
onclick_gobtn
()
{
// NetManager.ins.clickLog(getlogItem(88));
// NetManager.ins.clickLog(getlogItem(88));
this
.
hidePanel
();
this
.
hidePanel
();
//
gotoNextLevel();
gotoNextLevel
();
}
}
onClick
()
{
onClick
()
{
...
@@ -32,31 +32,21 @@ export default class HelpInvitePanel extends Panel {
...
@@ -32,31 +32,21 @@ export default class HelpInvitePanel extends Panel {
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
NetManager
.
ins
.
doHelp
((
success
,
res
)
=>
{
NetManager
.
ins
.
doHelp
((
success
,
res
)
=>
{
this
.
netCallback
();
this
.
netCallback
();
this
[
'txt_standby'
].
visible
=
false
;
if
(
success
)
{
if
(
success
)
{
this
[
'txt_success'
].
visible
=
true
;
}
else
{
}
else
{
if
(
res
.
code
==
"400017"
||
res
.
code
==
"0000022"
||
res
.
code
==
"0200202"
)
{
var
codeMsgs
=
{
"400017"
:
"您不是新用户呢~"
,
"0000022"
:
"不可以给自己助力哦~"
,
"0200202"
:
"已经给好友助力过了哦~"
,
}
if
(
res
&&
codeMsgs
[
res
.
code
]
&&
this
[
`txt_error
${
res
.
code
}
`
])
{
this
[
`txt_error
${
res
.
code
}
`
].
visible
=
true
;
}
else
{
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
}
}
}
}
// switch (true) {
// case (res.code == "400017"):
// showToast("您不是新用户呢~");
// break;
// case (res.code == "0000022"):
// showToast("不可以给自己助力哦~");
// break;
// case (res.code == "0200202"):
// showToast("已经给好友助力过了哦~");
// break;
// default:
// break;
// }
// if (!success) {
// return;
// }
// showToast("助力成功");
// NetManager.ins.showLog(getlogItem(36));
},
this
.
code
,
dojoin
.
data
);
},
this
.
code
,
dojoin
.
data
);
}
}
get
skinResKey
()
{
return
'helpGroup'
}
get
skinResKey
()
{
return
'helpGroup'
}
...
...
egret/src/panels/help/HelpScratchPanel.ts
0 → 100644
View file @
b9c93791
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"../../Main"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
gotoNextLevel
}
from
"../gotoNextLevel"
;
import
{
DataManager
}
from
"../../../libs/tw/manager/DataManager"
;
export
default
class
HelpScratchPanel
extends
Panel
{
netCallback
;
code
;
start
(
data
)
{
this
.
netCallback
=
data
.
netCallback
;
this
.
code
=
data
.
code
;
// NetManager.ins.showLog(getlogItem(87));
this
[
'gobtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_gobtn
,
this
);
this
[
'helpbtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onClick
,
this
);
this
[
'txt_standby'
].
visible
=
true
;
this
[
'helpbtn'
].
visible
=
true
;
}
onclick_gobtn
()
{
// NetManager.ins.clickLog(getlogItem(88));
this
.
hidePanel
();
gotoNextLevel
();
}
onClick
()
{
this
[
'helpbtn'
].
visible
=
false
;
this
[
'gobtn'
].
visible
=
true
;
const
_code
=
this
.
code
.
slice
(
8
);
NetManager
.
ins
.
scratchDoHelp
((
success
,
res
)
=>
{
this
.
netCallback
();
switch
(
true
)
{
case
(
res
.
code
==
"0000024"
):
showToast
(
"今日刮卡次数已达到上线限哦~"
);
break
;
case
(
res
.
code
==
"0000022"
):
showToast
(
"不可以给自己刮哦~"
);
break
;
case
(
res
.
code
==
"0000023"
):
showToast
(
"已经给好友刮过了哦~"
);
break
;
default
:
break
;
}
if
(
!
success
)
{
return
;
}
showToast
(
"助力成功,参与闯关赢现金"
/*"帮刮成功!"*/
);
},
_code
);
}
get
skinResKey
()
{
return
'helpGroup'
}
get
skinKey
()
{
return
'HelpScratch'
}
}
\ No newline at end of file
mock/happyclear/doHelp.json
View file @
b9c93791
{
{
"success"
:
true
,
"success"
:
0
,
"code"
:
null
,
"code"
:
"0200202"
,
"desc"
:
null
,
"desc"
:
null
,
"timestamp"
:
1566199822308
,
"timestamp"
:
1566199822308
,
"data"
:
""
"data"
:
""
...
...
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