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
37a6c2f1
Commit
37a6c2f1
authored
Sep 26, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bb8cc5c5
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
18 deletions
+32
-18
PrizePanel.ts
egret/libs/new_wx/components/PrizePanel.ts
+1
-1
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+1
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+9
-6
BoxPanel.ts
egret/src/panels/BoxPanel.ts
+1
-1
SignPanel.ts
egret/src/panels/SignPanel.ts
+10
-4
SignPrizePanel.ts
egret/src/panels/SignPrizePanel.ts
+6
-2
doSign.json
mock/sign/doSign.json
+3
-3
getSignInfo.json
mock/sign/getSignInfo.json
+1
-1
No files found.
egret/libs/new_wx/components/PrizePanel.ts
View file @
37a6c2f1
...
...
@@ -19,7 +19,7 @@ export default class PrizePanel extends Panel {
setGray
(
this
[
'picc'
]);
this
.
_level
=
parseInt
(
data
.
level
+
''
);
const
itemid
=
DataManager
.
ins
.
getData
(
'getPlugOrderStatus'
).
lottery
.
itemId
;
this
.
data
.
img
=
`http://yun.duiba.com.cn/db_games/09
1
6/
${
itemid
}
.png`
;
this
.
data
.
img
=
`http://yun.duiba.com.cn/db_games/09
2
6/
${
itemid
}
.png`
;
this
[
'shareBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
15
));
...
...
egret/libs/tw/manager/NetManager.ts
View file @
37a6c2f1
...
...
@@ -1268,6 +1268,7 @@ export class NetManager extends ABNetManager {
param
:
{
id
:
signActivityId
},
hideMsg
:
true
,
callback
:
callback
};
this
.
send
(
net
);
...
...
egret/src/mapScene/MapScene.ts
View file @
37a6c2f1
...
...
@@ -37,12 +37,15 @@ export default class MapScene extends Scene {
const
{
signInfoVO
}
=
DataManager
.
ins
.
getData
(
'getSignInfo'
);
if
(
signInfoVO
.
continueDay
>=
7
)
return
;
const
date
=
new
Date
();
date
.
setHours
(
0
,
0
,
0
,
0
);
const
nowTimerStr
=
date
.
getTime
()
+
''
;
const
oldTimerStr
=
localStorage
.
getItem
(
'nowTimerStr'
+
window
[
'CFG'
].
consumerId
);
if
(
oldTimerStr
!=
nowTimerStr
)
{
localStorage
.
setItem
(
'nowTimerStr'
+
window
[
'CFG'
].
consumerId
,
nowTimerStr
);
// const date = new Date();
// date.setHours(0, 0, 0, 0);
// const nowTimerStr = date.getTime() + '';
// const oldTimerStr = localStorage.getItem('nowTimerStr' + window['CFG'].consumerId);
// if (oldTimerStr != nowTimerStr) {
// localStorage.setItem('nowTimerStr' + window['CFG'].consumerId, nowTimerStr);
// PanelCtrl.instance.show('sign');
// }
if
(
signInfoVO
.
todaySigned
==
0
){
PanelCtrl
.
instance
.
show
(
'sign'
);
}
...
...
egret/src/panels/BoxPanel.ts
View file @
37a6c2f1
...
...
@@ -14,7 +14,7 @@ export default class BoxPanel extends Panel {
// this.data.img = DataManager.ins.getData('getPlugOrderStatus').lottery.imgurl;
const
itemid
=
DataManager
.
ins
.
getData
(
'getPlugOrderStatus'
).
lottery
.
itemId
;
this
.
data
.
img
=
`http://yun.duiba.com.cn/db_games/09
1
6/
${
itemid
}
.png`
;
this
.
data
.
img
=
`http://yun.duiba.com.cn/db_games/09
2
6/
${
itemid
}
.png`
;
}
showlog
()
{
NetManager
.
ins
.
showLog
(
getlogItem
(
17
));
...
...
egret/src/panels/SignPanel.ts
View file @
37a6c2f1
...
...
@@ -41,12 +41,18 @@ export default class SignPanel extends Panel {
];
const
func
=
(
data
,
item
:
SignItem
)
=>
{
NetManager
.
ins
.
doSign
((
s
)
=>
{
this
.
hidePanel
();
if
(
s
)
{
const
{
customInfo
}
=
DataManager
.
ins
.
getData
([
'dosign'
]);
if
(
customInfo
.
code
==
100004
||
!
customInfo
.
success
)
{
showToast
(
'哎呀!奖励与您擦肩而过~'
);
const
{
customInfo
,
success
}
=
DataManager
.
ins
.
getData
([
'dosign'
]);
if
(
!
success
||
!
customInfo
.
success
||
customInfo
.
prizeType
==
'none'
)
{
if
(
customInfo
.
code
==
100004
)
{
showToast
(
'哎呀,奖励擦肩而过!明天再来试试吧!'
);
}
else
{
showToast
(
'哎呀,奖励擦肩而过!'
);
}
return
;
}
item
.
setSinged
();
// showToast('签到成功!快去闯关吧~');
PanelCtrl
.
instance
.
show
(
'signPrize'
);
...
...
@@ -58,7 +64,7 @@ export default class SignPanel extends Panel {
},
window
[
'collectRuleId'
]);
});
}
else
{
showToast
(
'哎呀
!奖励与您擦肩而过~
'
);
showToast
(
'哎呀
,奖励擦肩而过!
'
);
}
},
window
[
'signActivityId'
])
console
.
log
(
data
);
...
...
egret/src/panels/SignPrizePanel.ts
View file @
37a6c2f1
...
...
@@ -12,8 +12,12 @@ export default class SignPrizePanel extends Panel {
//奖品类型,none无奖励, object实物,virtual虚拟商品,coupon券,道具prop,元宝coin,体力times,
const
{
customInfo
}
=
DataManager
.
ins
.
getData
([
'dosign'
]);
const
prizeType
=
customInfo
.
prizeType
;
if
(
customInfo
.
logo
&&
prizeType
!=
'times'
&&
prizeType
!=
'coin'
&&
prizeType
!=
'prop'
)
{
this
[
'img'
].
source
=
customInfo
.
logo
;
}
else
{
if
(
customInfo
.
itemId
)
this
[
'img'
].
source
=
`http://yun.duiba.com.cn/db_games/0916/
${
customInfo
.
itemId
}
.png`
;
this
[
'img'
].
source
=
`http://yun.duiba.com.cn/db_games/0926/
${
customInfo
.
itemId
}
.png`
;
}
this
[
'nums'
].
text
=
'x'
+
customInfo
.
prizeCount
;
...
...
mock/sign/doSign.json
View file @
37a6c2f1
...
...
@@ -4,10 +4,10 @@
"customInfo"
:{
"success"
:
true
,
"errorMsg"
:
null
,
"code"
:
"
000000
"
,
"prizeType"
:
""
,
"code"
:
""
,
"prizeType"
:
"
object
"
,
"prizeName"
:
"奖品名称"
,
"logo"
:
"
奖品图片
"
,
"logo"
:
"
http://yun.duiba.com.cn/db_games/activity/game/guideImage/guide2.png
"
,
"prizeCount"
:
10
,
"itemId"
:
59521
}
...
...
mock/sign/getSignInfo.json
View file @
37a6c2f1
{
"success"
:
true
,
"signInfoVO"
:
{
"continueDay"
:
1
,
"continueDay"
:
6
,
"todaySigned"
:
0
}
}
\ 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