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
7b0ac09b
Commit
7b0ac09b
authored
Oct 26, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole
into dev
parents
e6366cdb
80e2bc32
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 @
7b0ac09b
...
...
@@ -2,6 +2,7 @@ module.exports = {
devPort
:
8080
,
opn
:
0
,
proxy
:
{
'/crecord/*'
:
'http://localhost:3000'
,
'/signactivity/*'
:
'http://localhost:3000'
,
'/customActivity/*'
:
'http://localhost:3000'
,
'/ngapi/*'
:
'http://localhost:3000'
,
...
...
egret/index.html
View file @
7b0ac09b
...
...
@@ -48,6 +48,7 @@
<script
src=
"libs/pad-zeropadding.js"
></script>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<script>
window
[
'plugs'
]
=
[
1
,
2
,
3
]
// localStorage.clear();
window
[
'isInvitePage'
]
=
0
;
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 @
7b0ac09b
...
...
@@ -910,6 +910,24 @@ export class NetManager extends ABNetManager {
};
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
{
const
d
:
any
=
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
...
...
egret/resource/skins/BagItem2Skin.exml
View file @
7b0ac09b
<?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"
>
<w:Config
id=
"16e01911ccd"
/>
<e:Image
width=
"508"
height=
"225"
source=
"{data.
url
}"
/>
<e:Image
width=
"508"
height=
"225"
source=
"{data.
img
}"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/TurntablePrize2Skin.exml
View file @
7b0ac09b
...
...
@@ -5,7 +5,10 @@
<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: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:skinName>
<e:Skin
states=
"up,down,disabled"
>
...
...
@@ -15,4 +18,13 @@
</e:skinName>
</e:Button>
<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>
\ No newline at end of file
egret/src/panels/BagPanel.ts
View file @
7b0ac09b
...
...
@@ -4,7 +4,18 @@ import BagItemRenderer from "./bag/BagItemRenderer";
import
BagIte2mRenderer
from
"./bag/BagItemRenderer2"
;
import
{
getPropNums
}
from
"../getHomeData"
;
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
{
list
:
eui
.
List
;
list2
:
eui
.
List
;
...
...
@@ -47,20 +58,10 @@ export default class BagPanel extends Panel {
}
]);
this
.
list2
.
itemRenderer
=
BagIte2mRenderer
;
this
.
list2
.
dataProvider
=
new
eui
.
ArrayCollection
([
{
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"
},
{
url
:
"http://yun.duiba.com.cn/db_games/1022/111.png"
}
]);
NetManager
.
ins
.
hc_getRecord
(
getorigins
()).
then
(()
=>
{
const
{
records
}
=
DataManager
.
ins
.
getData
(
'hc_getRecord'
);
this
.
list2
.
dataProvider
=
new
eui
.
ArrayCollection
(
records
);
});
}
showlog
()
{
...
...
egret/src/panels/ScratchPanel.ts
View file @
7b0ac09b
...
...
@@ -6,6 +6,7 @@ import { iswx } from "../iswx";
import
ScratchRulePanel
from
"./ScratchRulePanel"
;
import
CutTimer
from
"../CutTimer"
;
import
Utils
from
"../Utils"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
ScratchPanel
extends
Panel
{
private
cutTimer
:
CutTimer
;
...
...
@@ -18,6 +19,8 @@ export default class ScratchPanel extends Panel {
async
start
(
data
)
{
super
.
start
();
this
.
showlog
();
const
scratchData
=
DataManager
.
ins
.
getData
(
'hc_turnableDojoin'
);
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
false
;
this
[
'con'
].
addChild
(
this
.
data
.
mv
);
...
...
egret/src/panels/TurntablePanel/TurntablePrize2Panel.ts
View file @
7b0ac09b
...
...
@@ -12,7 +12,8 @@ export default class TurnPrize2Panel extends Panel {
super
.
start
();
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
;
addAdComp
(
84
,
816
,
this
);
data
.
mv
.
gotoAndPlay
(
10
,
true
)
...
...
@@ -23,6 +24,40 @@ export default class TurnPrize2Panel extends Panel {
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
()
{
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
true
;
const
time
=
7000
;
...
...
mock/config.js
View file @
7b0ac09b
const
path
=
require
(
'path'
);
const
config
=
{
'/crecord/getrecord'
:
{
data
:
'./happyclear/getrecord.json'
},
'/customActivity/happyclear/bigWheel/baseInfo'
:
{
data
:
'./happyclear/turnablebaseInfo.json'
},
...
...
mock/happyclear/getrecord.json
0 → 100644
View file @
7b0ac09b
{
"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 @
7b0ac09b
...
...
@@ -4,7 +4,7 @@
"isScratchCard"
:
true
,
"option"
:{
"completePercent"
:
"完成进度"
,
"prizeImage"
:
"
图片
"
,
"prizeImage"
:
"
http://yun.duiba.com.cn/db_games/1022/111.png
"
,
"remainPercent"
:
"剩余进度"
,
"scratchCardTaskId"
:
1
,
"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