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
b1d1686a
Commit
b1d1686a
authored
Oct 26, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
50b0580d
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
159 additions
and
18 deletions
+159
-18
.buildrc.js
.buildrc.js
+1
-0
index.html
egret/index.html
+1
-0
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+18
-0
BagItem2Skin.exml
egret/resource/skins/BagItem2Skin.exml
+1
-1
TurntablePrize2Skin.exml
egret/resource/skins/TurntablePrize2Skin.exml
+13
-1
BagPanel.ts
egret/src/panels/BagPanel.ts
+15
-14
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+3
-0
TurntablePrize2Panel.ts
egret/src/panels/TurntablePanel/TurntablePrize2Panel.ts
+36
-1
config.js
mock/config.js
+3
-0
getrecord.json
mock/happyclear/getrecord.json
+67
-0
turnabledojoin.json
mock/happyclear/turnabledojoin.json
+1
-1
No files found.
.buildrc.js
View file @
b1d1686a
...
@@ -2,6 +2,7 @@ module.exports = {
...
@@ -2,6 +2,7 @@ module.exports = {
devPort
:
8080
,
devPort
:
8080
,
opn
:
0
,
opn
:
0
,
proxy
:
{
proxy
:
{
'/crecord/*'
:
'http://localhost:3000'
,
'/signactivity/*'
:
'http://localhost:3000'
,
'/signactivity/*'
:
'http://localhost:3000'
,
'/customActivity/*'
:
'http://localhost:3000'
,
'/customActivity/*'
:
'http://localhost:3000'
,
'/ngapi/*'
:
'http://localhost:3000'
,
'/ngapi/*'
:
'http://localhost:3000'
,
...
...
egret/index.html
View file @
b1d1686a
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
<script
src=
"libs/pad-zeropadding.js"
></script>
<script
src=
"libs/pad-zeropadding.js"
></script>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<script>
<script>
window
[
'plugs'
]
=
[
1
,
2
,
3
]
// localStorage.clear();
// localStorage.clear();
window
[
'isInvitePage'
]
=
0
;
window
[
'isInvitePage'
]
=
0
;
var
targetUrl
=
'https://gameact.suning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651404'
;
var
targetUrl
=
'https://gameact.suning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651404'
;
...
...
egret/libs/tw/manager/NetManager.ts
View file @
b1d1686a
...
@@ -910,6 +910,24 @@ export class NetManager extends ABNetManager {
...
@@ -910,6 +910,24 @@ export class NetManager extends ABNetManager {
};
};
this
.
send
(
net
);
this
.
send
(
net
);
}
}
public
hc_getRecord
(
origins
)
{
return
new
Promise
((
r
)
=>
{
const
param
:
any
=
{
page
:
1
,
pageSize
:
500
,
origins
:
origins
};
const
net
:
INetData
=
{
name
:
'hc_getRecord'
,
uri
:
window
[
'duiba'
]
+
'/crecord/getrecord'
,
type
:
'get'
,
dataType
:
'json'
,
param
:
param
,
callback
:
r
};
this
.
send
(
net
);
})
}
public
hc_turnableBaseInfo
(
callback
:
Function
,
propType
?:
number
):
void
{
public
hc_turnableBaseInfo
(
callback
:
Function
,
propType
?:
number
):
void
{
const
d
:
any
=
{
const
d
:
any
=
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
...
...
egret/resource/skins/BagItem2Skin.exml
View file @
b1d1686a
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"BagItem2Skin"
width=
"508"
height=
"225"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
class=
"BagItem2Skin"
width=
"508"
height=
"225"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16e01911ccd"
/>
<w:Config
id=
"16e01911ccd"
/>
<e:Image
width=
"508"
height=
"225"
source=
"{data.
url
}"
/>
<e:Image
width=
"508"
height=
"225"
source=
"{data.
img
}"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/TurntablePrize2Skin.exml
View file @
b1d1686a
...
@@ -5,7 +5,10 @@
...
@@ -5,7 +5,10 @@
<e:Image
id=
"light1"
source=
"invitebg2_png"
x=
"386"
y=
"307"
anchorOffsetX=
"356"
anchorOffsetY=
"296"
/>
<e:Image
id=
"light1"
source=
"invitebg2_png"
x=
"386"
y=
"307"
anchorOffsetX=
"356"
anchorOffsetY=
"296"
/>
<e:Group
id=
"container"
y=
"-98.45"
x=
"-3"
/>
<e:Group
id=
"container"
y=
"-98.45"
x=
"-3"
/>
<e:Image
source=
"turnprize2bg_png"
y=
"159"
horizontalCenter=
"0"
/>
<e:Image
source=
"turnprize2bg_png"
y=
"159"
horizontalCenter=
"0"
/>
<e:Image
width=
"508"
height=
"225"
source=
"{data.url}"
horizontalCenter=
"0"
y=
"333.76"
/>
<e:Group
y=
"326"
horizontalCenter=
"0"
>
<e:Image
width=
"508"
height=
"225"
source=
"{data.url}"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
<e:Image
id=
"scratch_progress"
y=
"0"
x=
"0"
source=
"scratch_card_98_png"
/>
</e:Group>
<e:Button
id=
"closeBtn"
label=
""
y=
"242.88"
x=
"615"
>
<e:Button
id=
"closeBtn"
label=
""
y=
"242.88"
x=
"615"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
...
@@ -15,4 +18,13 @@
...
@@ -15,4 +18,13 @@
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Image
id=
"btn"
source=
"turnprize2按钮_png"
y=
"677"
horizontalCenter=
"0"
/>
<e:Image
id=
"btn"
source=
"turnprize2按钮_png"
y=
"677"
horizontalCenter=
"0"
/>
<e:Group
x=
"124"
y=
"606"
width=
"506"
height=
"57"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
>
<e:Image
id=
"progressMask0"
source=
"scratch_progress_bg_png"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
x=
"7"
verticalCenter=
"0"
/>
<e:Group
id=
"progressGroup0"
x=
"8"
verticalCenter=
"0"
>
<e:Image
id=
"progressBg0"
source=
"scratch_progress_bg_png"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
x=
"0"
y=
"0"
width=
"437"
height=
"22"
/>
<e:Rect
id=
"progress0"
fillColor=
"0xEB1917"
left=
"0"
verticalCenter=
"0"
width=
"0"
top=
"0"
bottom=
"0"
/>
<e:Label
id=
"progressLabel0"
text=
"仅剩90.7%"
size=
"18"
verticalCenter=
"0"
horizontalCenter=
"0"
bold=
"true"
/>
</e:Group>
<e:Image
id=
"hongbao0"
source=
"scratch_hongbao_png"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
horizontalCenter=
"219"
/>
</e:Group>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/src/panels/BagPanel.ts
View file @
b1d1686a
...
@@ -4,7 +4,18 @@ import BagItemRenderer from "./bag/BagItemRenderer";
...
@@ -4,7 +4,18 @@ import BagItemRenderer from "./bag/BagItemRenderer";
import
BagIte2mRenderer
from
"./bag/BagItemRenderer2"
;
import
BagIte2mRenderer
from
"./bag/BagItemRenderer2"
;
import
{
getPropNums
}
from
"../getHomeData"
;
import
{
getPropNums
}
from
"../getHomeData"
;
import
PropType
from
"../PropType"
;
import
PropType
from
"../PropType"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
const
getorigins
=
()
=>
{
// const pre = CFG.actId + '00';
let
plugs
:
any
=
window
[
'plugs'
];
let
list
:
any
=
[
DataManager
.
ins
.
customCfgData
.
oaId
+
'00'
];
// list.push(pre);
plugs
=
plugs
.
map
(
p
=>
p
+
'01'
);
list
=
list
.
concat
(
plugs
);
return
list
.
join
(
','
)
}
export
default
class
BagPanel
extends
Panel
{
export
default
class
BagPanel
extends
Panel
{
list
:
eui
.
List
;
list
:
eui
.
List
;
list2
:
eui
.
List
;
list2
:
eui
.
List
;
...
@@ -47,20 +58,10 @@ export default class BagPanel extends Panel {
...
@@ -47,20 +58,10 @@ export default class BagPanel extends Panel {
}
}
]);
]);
this
.
list2
.
itemRenderer
=
BagIte2mRenderer
;
this
.
list2
.
itemRenderer
=
BagIte2mRenderer
;
this
.
list2
.
dataProvider
=
new
eui
.
ArrayCollection
([
NetManager
.
ins
.
hc_getRecord
(
getorigins
()).
then
(()
=>
{
{
const
{
records
}
=
DataManager
.
ins
.
getData
(
'hc_getRecord'
);
url
:
"http://yun.duiba.com.cn/db_games/1022/111.png"
this
.
list2
.
dataProvider
=
new
eui
.
ArrayCollection
(
records
);
},
});
{
url
:
"http://yun.duiba.com.cn/db_games/1022/111.png"
},
{
url
:
"http://yun.duiba.com.cn/db_games/1022/111.png"
},
{
url
:
"http://yun.duiba.com.cn/db_games/1022/111.png"
}
]);
}
}
showlog
()
{
showlog
()
{
...
...
egret/src/panels/ScratchPanel.ts
View file @
b1d1686a
...
@@ -6,6 +6,7 @@ import { iswx } from "../iswx";
...
@@ -6,6 +6,7 @@ import { iswx } from "../iswx";
import
ScratchRulePanel
from
"./ScratchRulePanel"
;
import
ScratchRulePanel
from
"./ScratchRulePanel"
;
import
CutTimer
from
"../CutTimer"
;
import
CutTimer
from
"../CutTimer"
;
import
Utils
from
"../Utils"
;
import
Utils
from
"../Utils"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
ScratchPanel
extends
Panel
{
export
default
class
ScratchPanel
extends
Panel
{
private
cutTimer
:
CutTimer
;
private
cutTimer
:
CutTimer
;
...
@@ -18,6 +19,8 @@ export default class ScratchPanel extends Panel {
...
@@ -18,6 +19,8 @@ export default class ScratchPanel extends Panel {
async
start
(
data
)
{
async
start
(
data
)
{
super
.
start
();
super
.
start
();
this
.
showlog
();
this
.
showlog
();
const
scratchData
=
DataManager
.
ins
.
getData
(
'hc_turnableDojoin'
);
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
false
;
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
false
;
this
[
'con'
].
addChild
(
this
.
data
.
mv
);
this
[
'con'
].
addChild
(
this
.
data
.
mv
);
...
...
egret/src/panels/TurntablePanel/TurntablePrize2Panel.ts
View file @
b1d1686a
...
@@ -12,7 +12,8 @@ export default class TurnPrize2Panel extends Panel {
...
@@ -12,7 +12,8 @@ export default class TurnPrize2Panel extends Panel {
super
.
start
();
super
.
start
();
this
.
showlog
();
this
.
showlog
();
this
.
data
.
url
=
"http://yun.duiba.com.cn/db_games/1022/111.png"
;
this
.
setProgress
(
data
.
completePercent
);
this
.
data
.
url
=
data
.
prizeImage
;
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
false
;
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
false
;
addAdComp
(
84
,
816
,
this
);
addAdComp
(
84
,
816
,
this
);
data
.
mv
.
gotoAndPlay
(
10
,
true
)
data
.
mv
.
gotoAndPlay
(
10
,
true
)
...
@@ -23,6 +24,40 @@ export default class TurnPrize2Panel extends Panel {
...
@@ -23,6 +24,40 @@ export default class TurnPrize2Panel extends Panel {
this
[
'container'
].
addChild
(
data
.
mv
);
this
[
'container'
].
addChild
(
data
.
mv
);
}
}
private
setProgress
(
progress
)
{
if
(
progress
>
100
)
{
progress
=
100
;
}
else
if
(
progress
<
0
)
{
progress
=
0
;
}
this
[
"progressLabel"
].
text
=
`仅剩
${(
100
-
progress
).
toFixed
(
2
)}
%`
;
// 进度条文字
const
_width
=
this
[
"progressBg"
].
width
*
progress
/
100
;
// 宽度
const
dProgress
=
Math
.
abs
(
progress
-
this
[
"progress"
].
width
/
this
[
"progressBg"
].
width
);
// 比当前进度的差值的绝对值
const
_duration
=
1000
*
dProgress
/
100
;
// 算出变化的时间
egret
.
Tween
.
get
(
this
[
"progress"
]).
to
({
width
:
_width
},
_duration
);
const
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"
;
}
}
playBgAni
()
{
playBgAni
()
{
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
true
;
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
true
;
const
time
=
7000
;
const
time
=
7000
;
...
...
mock/config.js
View file @
b1d1686a
const
path
=
require
(
'path'
);
const
path
=
require
(
'path'
);
const
config
=
{
const
config
=
{
'/crecord/getrecord'
:
{
data
:
'./happyclear/getrecord.json'
},
'/customActivity/happyclear/bigWheel/baseInfo'
:
{
'/customActivity/happyclear/bigWheel/baseInfo'
:
{
data
:
'./happyclear/turnablebaseInfo.json'
data
:
'./happyclear/turnablebaseInfo.json'
},
},
...
...
mock/happyclear/getrecord.json
0 → 100644
View file @
b1d1686a
{
"records"
:
[
{
"new"
:
false
,
"img"
:
"//yun.dui88.com/images/201907/himtwh01g7.png"
,
"itemType"
:
"coupon"
,
"quantity"
:
1
,
"gmtCreate"
:
"2019-07-31 14:48:06"
,
"title"
:
"亚组委-每日一次"
,
"type"
:
20
,
"orderTypeTitle"
:
"抽奖获得"
,
"url"
:
"/crecord/recordDetailNew?orderId=1059793873663030339&dpm=1.26.0.1&dcm=101.49383.0.0&fromPage=record&dbnewopen"
,
"emdDpmJson"
:
"{
\"
dpm
\"
:
\"
1.26.0.1
\"
,
\"
domain
\"
:
\"
//activity.m.duibadev.com.cn
\"
,
\"
dcm
\"
:
\"
101.49383.0.0
\"
}"
,
"statusText"
:
"<span>有效期至:2019-08-17</span>"
,
"invalid"
:
false
,
"emdJson"
:
"{
\"
consumer_id
\"
:500212051,
\"
info_type
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
button_type
\"
:
\"
20001
\"
,
\"
domain
\"
:
\"
//activity.m.duibadev.com.cn
\"
,
\"
ip
\"
:
\"
10.10.94.90
\"
,
\"
locationType
\"
:5,
\"
locationNum
\"
:1,
\"
app_id
\"
:1,
\"
info
\"
:
\"
30034663
\"
}"
},
{
"new"
:
false
,
"img"
:
"//yun.dui88.com/images/201907/himtwh01g7.png"
,
"itemType"
:
"coupon"
,
"quantity"
:
1
,
"gmtCreate"
:
"2019-07-31 14:48:06"
,
"title"
:
"亚组委-每日一次"
,
"type"
:
20
,
"orderTypeTitle"
:
"抽奖获得"
,
"url"
:
"/crecord/recordDetailNew?orderId=1059793873663030339&dpm=1.26.0.1&dcm=101.49383.0.0&fromPage=record&dbnewopen"
,
"emdDpmJson"
:
"{
\"
dpm
\"
:
\"
1.26.0.1
\"
,
\"
domain
\"
:
\"
//activity.m.duibadev.com.cn
\"
,
\"
dcm
\"
:
\"
101.49383.0.0
\"
}"
,
"statusText"
:
"<span>有效期至:2019-08-17</span>"
,
"invalid"
:
false
,
"emdJson"
:
"{
\"
consumer_id
\"
:500212051,
\"
info_type
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
button_type
\"
:
\"
20001
\"
,
\"
domain
\"
:
\"
//activity.m.duibadev.com.cn
\"
,
\"
ip
\"
:
\"
10.10.94.90
\"
,
\"
locationType
\"
:5,
\"
locationNum
\"
:1,
\"
app_id
\"
:1,
\"
info
\"
:
\"
30034663
\"
}"
},
{
"new"
:
false
,
"img"
:
"//yun.dui88.com/images/201907/himtwh01g7.png"
,
"itemType"
:
"coupon"
,
"quantity"
:
1
,
"gmtCreate"
:
"2019-07-31 14:48:06"
,
"title"
:
"亚组委-每日一次"
,
"type"
:
20
,
"orderTypeTitle"
:
"抽奖获得"
,
"url"
:
"/crecord/recordDetailNew?orderId=1059793873663030339&dpm=1.26.0.1&dcm=101.49383.0.0&fromPage=record&dbnewopen"
,
"emdDpmJson"
:
"{
\"
dpm
\"
:
\"
1.26.0.1
\"
,
\"
domain
\"
:
\"
//activity.m.duibadev.com.cn
\"
,
\"
dcm
\"
:
\"
101.49383.0.0
\"
}"
,
"statusText"
:
"<span>有效期至:2019-08-17</span>"
,
"invalid"
:
false
,
"emdJson"
:
"{
\"
consumer_id
\"
:500212051,
\"
info_type
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
button_type
\"
:
\"
20001
\"
,
\"
domain
\"
:
\"
//activity.m.duibadev.com.cn
\"
,
\"
ip
\"
:
\"
10.10.94.90
\"
,
\"
locationType
\"
:5,
\"
locationNum
\"
:1,
\"
app_id
\"
:1,
\"
info
\"
:
\"
30034663
\"
}"
},
{
"new"
:
false
,
"img"
:
"//yun.dui88.com/images/201907/3pi154iy9u.png"
,
"itemType"
:
"virtual"
,
"quantity"
:
1
,
"gmtCreate"
:
"2019-07-31 14:48:06"
,
"title"
:
"亚组委-2能量"
,
"type"
:
20
,
"orderTypeTitle"
:
"抽奖获得"
,
"url"
:
"/crecord/recordDetailNew?orderId=1059793873663020339&dpm=1.26.0.1&dcm=101.49387.0.0&fromPage=record&dbnewopen"
,
"emdDpmJson"
:
"{
\"
dpm
\"
:
\"
1.26.0.1
\"
,
\"
domain
\"
:
\"
//activity.m.duibadev.com.cn
\"
,
\"
dcm
\"
:
\"
101.49387.0.0
\"
}"
,
"statusText"
:
"<span class='invalid'>失败</span>"
,
"invalid"
:
true
,
"emdJson"
:
"{
\"
consumer_id
\"
:500212051,
\"
info_type
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
button_type
\"
:
\"
20001
\"
,
\"
domain
\"
:
\"
//activity.m.duibadev.com.cn
\"
,
\"
ip
\"
:
\"
10.10.94.90
\"
,
\"
locationType
\"
:5,
\"
locationNum
\"
:2,
\"
app_id
\"
:1,
\"
info
\"
:
\"
30034662
\"
}"
}
],
"success"
:
true
,
"nextPage"
:
false
,
"invalidPage"
:
false
}
\ No newline at end of file
mock/happyclear/turnabledojoin.json
View file @
b1d1686a
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"isScratchCard"
:
true
,
"isScratchCard"
:
true
,
"option"
:{
"option"
:{
"completePercent"
:
"完成进度"
,
"completePercent"
:
"完成进度"
,
"prizeImage"
:
"
图片
"
,
"prizeImage"
:
"
http://yun.duiba.com.cn/db_games/1022/111.png
"
,
"remainPercent"
:
"剩余进度"
,
"remainPercent"
:
"剩余进度"
,
"scratchCardTaskId"
:
1
,
"scratchCardTaskId"
:
1
,
"categoryType"
:
4
,
"categoryType"
:
4
,
...
...
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