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
a945e2dc
Commit
a945e2dc
authored
Oct 29, 2019
by
wjf
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
6c914c8b
1e1a1c03
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
64 additions
and
51 deletions
+64
-51
main2.tmproject
egret/resource/TextureMerger/main2.tmproject
+1
-1
ScratchSkin.exml
egret/resource/skins/ScratchSkin.exml
+1
-1
TurntablePrize2Skin.exml
egret/resource/skins/TurntablePrize2Skin.exml
+1
-1
Utils.ts
egret/src/Utils.ts
+3
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+1
-1
ScratchIcon.ts
egret/src/mapScene/icon/ScratchIcon.ts
+1
-1
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+8
-3
Turntable.ts
egret/src/panels/TurntablePanel/Turntable.ts
+13
-10
TurntablePrizePanel.ts
egret/src/panels/TurntablePanel/TurntablePrizePanel.ts
+3
-1
getBackReward.json
mock/happyclear/getBackReward.json
+12
-17
scratchGetTaskInfo.json
mock/happyclear/scratchGetTaskInfo.json
+12
-12
turnabledojoin.json
mock/happyclear/turnabledojoin.json
+8
-3
No files found.
egret/resource/TextureMerger/main2.tmproject
View file @
a945e2dc
This diff is collapsed.
Click to expand it.
egret/resource/skins/ScratchSkin.exml
View file @
a945e2dc
...
...
@@ -49,7 +49,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=
"
0"
horizontalCenter=
"0"
bold=
"true
"
/>
<e:Label
id=
"progressLabel"
text=
"仅剩90.7%"
size=
"18"
verticalCenter=
"
2"
horizontalCenter=
"0.5"
bold=
"true"
verticalAlign=
"middle"
textAlign=
"center
"
/>
</e:Group>
<e:Image
id=
"hongbao"
source=
"scratch_hongbao_png"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
horizontalCenter=
"219"
/>
</e:Group>
...
...
egret/resource/skins/TurntablePrize2Skin.exml
View file @
a945e2dc
...
...
@@ -23,7 +23,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=
"0"
horizontalCenter=
"0"
bold=
"true
"
/>
<e:Label
id=
"progressLabel"
text=
"仅剩90.7%"
size=
"18"
bold=
"true"
verticalAlign=
"middle"
textAlign=
"center"
horizontalCenter=
"0"
verticalCenter=
"0
"
/>
</e:Group>
<e:Image
id=
"hongbao"
source=
"scratch_hongbao_png"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
horizontalCenter=
"219"
/>
</e:Group>
...
...
egret/src/Utils.ts
View file @
a945e2dc
...
...
@@ -60,6 +60,9 @@ export default class Utils {
* @returns {Object} obj - 拷贝完成的对象
*/
public
static
deepClone
(
src
,
dst
=
undefined
)
{
if
(
src
){
return
src
;
}
let
_obj
=
dst
||
(
src
instanceof
Array
?
[]
:
{});
for
(
let
key
in
src
)
{
let
prop
=
src
[
key
];
...
...
egret/src/mapScene/MapScene.ts
View file @
a945e2dc
...
...
@@ -116,7 +116,7 @@ export default class MapScene extends Scene {
}
const
backData
=
DataManager
.
ins
.
getData
(
'hc_getBackReward'
);
if
(
backData
.
data
)
{
if
(
backData
.
success
&&
backData
.
data
)
{
panels
.
push
(
'back'
);
}
...
...
egret/src/mapScene/icon/ScratchIcon.ts
View file @
a945e2dc
...
...
@@ -81,7 +81,7 @@ export default class ScratchIcon extends IconBase {
// PanelCtrl.instance.show('scratch', res.data);
break
;
case
(
status
==
2
):
// 当前任务完成待领奖 请求领奖接口
NetManager
.
ins
.
scratchTakePrize
((
success
,
res
)
=>
{
NetManager
.
ins
.
scratchTakePrize
((
success
)
=>
{
if
(
!
success
)
{
return
;
}
...
...
egret/src/panels/ScratchPanel.ts
View file @
a945e2dc
...
...
@@ -8,7 +8,7 @@ import CutTimer from "../CutTimer";
import
Utils
from
"../Utils"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
i
ScratchPanel
extends
Panel
{
export
default
class
ScratchPanel
extends
Panel
{
private
cutTimer
:
CutTimer
;
constructor
(
data
)
{
...
...
@@ -20,7 +20,7 @@ export default class iScratchPanel extends Panel {
super
.
start
();
this
.
showlog
();
const
scratchData
=
DataManager
.
ins
.
getData
(
'hc_turnableDojoin'
);
const
scratchData
=
DataManager
.
ins
.
getData
(
'hc_turnableDojoin'
);
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
false
;
this
[
'con'
].
addChild
(
this
.
data
.
mv
);
...
...
@@ -91,7 +91,11 @@ export default class iScratchPanel extends Panel {
}
// 添加邀请图标
let
dNum
=
this
.
data
.
helpedCount
-
this
.
data
.
avatarList
.
length
;
let
noAvatarNum
=
this
.
data
.
helpedCount
-
this
.
data
.
avatarList
.
length
;
// 没有头像的人数
let
dNum
=
this
.
data
.
totalNeedCount
-
this
.
data
.
avatarList
.
length
-
noAvatarNum
;
// 没邀请的人数
for
(
let
i
=
0
;
i
<
noAvatarNum
;
i
++
){
this
.
data
.
avatarList
.
push
(
""
);
}
for
(
let
i
=
0
;
i
<
dNum
;
i
++
)
{
this
.
data
.
avatarList
.
push
(
"scratch_invite_png"
);
}
...
...
@@ -214,6 +218,7 @@ class ScratchItem extends eui.ItemRenderer {
dataChanged
()
{
this
.
img
.
mask
=
this
.
mask
;
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
.
scratchGetShareCode
((
success
,
res
)
=>
{
...
...
egret/src/panels/TurntablePanel/Turntable.ts
View file @
a945e2dc
...
...
@@ -14,6 +14,7 @@ import wait from "../../../libs/new_tc/wait";
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
getHomeData
from
"../../getHomeData"
;
import
{
getlogItem
}
from
"../../Main"
;
import
SceneCtrl
from
"../../../libs/new_wx/ctrls/sceneCtrl"
;
// export const loadTurntableSvga = (callback) => {
// loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// // await wait(100);
...
...
@@ -117,6 +118,9 @@ export default class Turntable extends Panel {
console
.
warn
(
error
)
}
NetManager
.
ins
.
hc_turnableDojoin
((
success
,
res
)
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
Loading
.
instace
.
hide
();
// if(!success) {
// return;
...
...
@@ -166,9 +170,9 @@ export default class Turntable extends Panel {
PanelCtrl
.
instance
.
show
(
"TurntableNoPrizePanel"
,
{
type
:
3
});
}
else
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turnprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
let
_data
=
Utils
.
deepClone
(
data
);
_
data
.
mv
=
mv
;
PanelCtrl
.
instance
.
show
(
'TurnPrizePanel'
,
_
data
);
//
let _data = Utils.deepClone(data);
data
.
mv
=
mv
;
PanelCtrl
.
instance
.
show
(
'TurnPrizePanel'
,
data
);
});
}
});
...
...
@@ -299,15 +303,14 @@ export default class Turntable extends Panel {
}
v
.
prizeImg
=
prizeImg
;
RotaryData
.
key
.
push
(
v
.
categoryType
);
RotaryData
.
data
[
v
.
categoryType
]
=
[{
start
:
i
*
60
-
20
,
end
:
i
*
60
+
20
}];
if
(
i
>=
6
){
return
;
if
(
i
>=
6
)
{
continue
;
}
RotaryData
.
data
[
v
.
categoryType
]
=
[{
start
:
i
*
60
-
20
,
end
:
i
*
60
+
20
}];
this
[
`img
${
i
}
`
].
source
=
v
.
prizeImg
;
if
(
this
.
data
.
onceAgain
)
{
// 再抽一次
this
.
onTapStart
();
}
}
if
(
this
.
data
.
onceAgain
)
{
// 再抽一次
this
.
onTapStart
();
}
});
...
...
egret/src/panels/TurntablePanel/TurntablePrizePanel.ts
View file @
a945e2dc
...
...
@@ -37,7 +37,9 @@ export default class TurnPrizePanel extends Panel {
updateOption
(
option
:
any
)
{
const
{
categoryType
,
img
,
num
,
propType
}
=
option
;
// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
this
[
'propnums'
].
text
=
'x'
+
num
;
this
[
'propnums'
].
text
=
'x1'
;
if
(
num
)
this
[
'propnums'
].
text
=
'x'
+
num
;
switch
(
categoryType
)
{
case
2
:
this
[
'blood'
].
visible
=
true
;
...
...
mock/happyclear/getBackReward.json
View file @
a945e2dc
{
"code"
:
"0000000000"
,
"data"
:{
"completePercent"
:
"99"
,
"prizeImage"
:
""
,
"remainPercent"
:
"剩余进度"
,
"scratchCardTaskId"
:
1
,
"categoryType"
:
4
,
"title"
:
"奖品信息"
,
"coinType"
:
1
,
"maxValue"
:
10
,
"minValue"
:
10
,
"appItemId"
:
2099
,
"img"
:
"http://yun.duiba.com.cn/db_games/1022/111.png"
,
"name"
:
"虚拟商品名称"
,
"value"
:
"虚拟商品编码"
,
"num"
:
10
,
"propType"
:
1
"appItemId"
:
2322
,
"categoryType"
:
1
,
"coinType"
:
1
,
"img"
:
"1"
,
"maxValue"
:
2
,
"minValue"
:
1
,
"name"
:
"测试商品"
,
"num"
:
3
,
"propType"
:
2
,
"rate"
:
"概率"
,
"title"
:
"商品信息"
,
"value"
:
"虚拟商品标识符"
},
"desc"
:
"OK"
,
"success"
:
true
,
...
...
mock/happyclear/scratchGetTaskInfo.json
View file @
a945e2dc
{
"success"
:
true
,
"code"
:
null
,
"desc"
:
null
,
"timestamp"
:
15
6619982230
8
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
15
7231893338
8
,
"data"
:
{
"scratchCardTaskId"
:
1
222
,
"scratchCardTaskId"
:
1
,
"taskStatus"
:
1
,
"prizeImage"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"currentTime"
:
1570673808000
,
"endTime"
:
1570673810000
,
"completePercent"
:
"90.50"
,
"remainPercent"
:
"9.50"
,
"helpedCount"
:
4
,
"prizeImage"
:
"//yun.dui88.com/images/201910/e6pmpk2pne.png"
,
"currentTime"
:
1572318933366
,
"endTime"
:
1572358710000
,
"completePercent"
:
"91.0"
,
"remainPercent"
:
"9.0"
,
"totalNeedCount"
:
3
,
"helpedCount"
:
2
,
"avatarList"
:
[
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
""
null
]
}
}
\ No newline at end of file
mock/happyclear/turnabledojoin.json
View file @
a945e2dc
...
...
@@ -2,10 +2,15 @@
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1572
262646931
,
"timestamp"
:
1572
327888728
,
"data"
:
{
"isScratchCard"
:
false
,
"option"
:
null
,
"isScratchCard"
:
true
,
"option"
:
{
"scratchCardTaskId"
:
7
,
"prizeImage"
:
"//yun.dui88.com/images/201910/e6pmpk2pne.png"
,
"completePercent"
:
"8"
,
"remainPercent"
:
null
},
"orderNum"
:
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