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 @@
...
@@ -49,7 +49,7 @@
<e:Group
id=
"progressGroup"
x=
"8"
verticalCenter=
"0"
>
<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: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: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:Group>
<e:Image
id=
"hongbao"
source=
"scratch_hongbao_png"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
horizontalCenter=
"219"
/>
<e:Image
id=
"hongbao"
source=
"scratch_hongbao_png"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
horizontalCenter=
"219"
/>
</e:Group>
</e:Group>
...
...
egret/resource/skins/TurntablePrize2Skin.exml
View file @
a945e2dc
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<e:Group
id=
"progressGroup"
x=
"8"
verticalCenter=
"0"
>
<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: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: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:Group>
<e:Image
id=
"hongbao"
source=
"scratch_hongbao_png"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
horizontalCenter=
"219"
/>
<e:Image
id=
"hongbao"
source=
"scratch_hongbao_png"
scaleX=
"1"
scaleY=
"1"
verticalCenter=
"0"
horizontalCenter=
"219"
/>
</e:Group>
</e:Group>
...
...
egret/src/Utils.ts
View file @
a945e2dc
...
@@ -60,6 +60,9 @@ export default class Utils {
...
@@ -60,6 +60,9 @@ export default class Utils {
* @returns {Object} obj - 拷贝完成的对象
* @returns {Object} obj - 拷贝完成的对象
*/
*/
public
static
deepClone
(
src
,
dst
=
undefined
)
{
public
static
deepClone
(
src
,
dst
=
undefined
)
{
if
(
src
){
return
src
;
}
let
_obj
=
dst
||
(
src
instanceof
Array
?
[]
:
{});
let
_obj
=
dst
||
(
src
instanceof
Array
?
[]
:
{});
for
(
let
key
in
src
)
{
for
(
let
key
in
src
)
{
let
prop
=
src
[
key
];
let
prop
=
src
[
key
];
...
...
egret/src/mapScene/MapScene.ts
View file @
a945e2dc
...
@@ -116,7 +116,7 @@ export default class MapScene extends Scene {
...
@@ -116,7 +116,7 @@ export default class MapScene extends Scene {
}
}
const
backData
=
DataManager
.
ins
.
getData
(
'hc_getBackReward'
);
const
backData
=
DataManager
.
ins
.
getData
(
'hc_getBackReward'
);
if
(
backData
.
data
)
{
if
(
backData
.
success
&&
backData
.
data
)
{
panels
.
push
(
'back'
);
panels
.
push
(
'back'
);
}
}
...
...
egret/src/mapScene/icon/ScratchIcon.ts
View file @
a945e2dc
...
@@ -81,7 +81,7 @@ export default class ScratchIcon extends IconBase {
...
@@ -81,7 +81,7 @@ export default class ScratchIcon extends IconBase {
// PanelCtrl.instance.show('scratch', res.data);
// PanelCtrl.instance.show('scratch', res.data);
break
;
break
;
case
(
status
==
2
):
// 当前任务完成待领奖 请求领奖接口
case
(
status
==
2
):
// 当前任务完成待领奖 请求领奖接口
NetManager
.
ins
.
scratchTakePrize
((
success
,
res
)
=>
{
NetManager
.
ins
.
scratchTakePrize
((
success
)
=>
{
if
(
!
success
)
{
if
(
!
success
)
{
return
;
return
;
}
}
...
...
egret/src/panels/ScratchPanel.ts
View file @
a945e2dc
...
@@ -8,7 +8,7 @@ import CutTimer from "../CutTimer";
...
@@ -8,7 +8,7 @@ import CutTimer from "../CutTimer";
import
Utils
from
"../Utils"
;
import
Utils
from
"../Utils"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
i
ScratchPanel
extends
Panel
{
export
default
class
ScratchPanel
extends
Panel
{
private
cutTimer
:
CutTimer
;
private
cutTimer
:
CutTimer
;
constructor
(
data
)
{
constructor
(
data
)
{
...
@@ -20,7 +20,7 @@ export default class iScratchPanel extends Panel {
...
@@ -20,7 +20,7 @@ export default class iScratchPanel extends Panel {
super
.
start
();
super
.
start
();
this
.
showlog
();
this
.
showlog
();
const
scratchData
=
DataManager
.
ins
.
getData
(
'hc_turnableDojoin'
);
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
);
...
@@ -91,7 +91,11 @@ export default class iScratchPanel extends Panel {
...
@@ -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
++
)
{
for
(
let
i
=
0
;
i
<
dNum
;
i
++
)
{
this
.
data
.
avatarList
.
push
(
"scratch_invite_png"
);
this
.
data
.
avatarList
.
push
(
"scratch_invite_png"
);
}
}
...
@@ -214,6 +218,7 @@ class ScratchItem extends eui.ItemRenderer {
...
@@ -214,6 +218,7 @@ class ScratchItem extends eui.ItemRenderer {
dataChanged
()
{
dataChanged
()
{
this
.
img
.
mask
=
this
.
mask
;
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
.
source
=
this
.
data
.
avatar
||
"http://yun.duiba.com.cn/db_games/default_avatar.png"
;
this
.
img
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
img
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
scratchGetShareCode
((
success
,
res
)
=>
{
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";
...
@@ -14,6 +14,7 @@ import wait from "../../../libs/new_tc/wait";
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
getHomeData
from
"../../getHomeData"
;
import
getHomeData
from
"../../getHomeData"
;
import
{
getlogItem
}
from
"../../Main"
;
import
{
getlogItem
}
from
"../../Main"
;
import
SceneCtrl
from
"../../../libs/new_wx/ctrls/sceneCtrl"
;
// export const loadTurntableSvga = (callback) => {
// export const loadTurntableSvga = (callback) => {
// loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// // await wait(100);
// // await wait(100);
...
@@ -117,6 +118,9 @@ export default class Turntable extends Panel {
...
@@ -117,6 +118,9 @@ export default class Turntable extends Panel {
console
.
warn
(
error
)
console
.
warn
(
error
)
}
}
NetManager
.
ins
.
hc_turnableDojoin
((
success
,
res
)
=>
{
NetManager
.
ins
.
hc_turnableDojoin
((
success
,
res
)
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
Loading
.
instace
.
hide
();
Loading
.
instace
.
hide
();
// if(!success) {
// if(!success) {
// return;
// return;
...
@@ -166,9 +170,9 @@ export default class Turntable extends Panel {
...
@@ -166,9 +170,9 @@ export default class Turntable extends Panel {
PanelCtrl
.
instance
.
show
(
"TurntableNoPrizePanel"
,
{
type
:
3
});
PanelCtrl
.
instance
.
show
(
"TurntableNoPrizePanel"
,
{
type
:
3
});
}
else
{
}
else
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turnprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turnprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
let
_data
=
Utils
.
deepClone
(
data
);
//
let _data = Utils.deepClone(data);
_
data
.
mv
=
mv
;
data
.
mv
=
mv
;
PanelCtrl
.
instance
.
show
(
'TurnPrizePanel'
,
_
data
);
PanelCtrl
.
instance
.
show
(
'TurnPrizePanel'
,
data
);
});
});
}
}
});
});
...
@@ -299,15 +303,14 @@ export default class Turntable extends Panel {
...
@@ -299,15 +303,14 @@ export default class Turntable extends Panel {
}
}
v
.
prizeImg
=
prizeImg
;
v
.
prizeImg
=
prizeImg
;
RotaryData
.
key
.
push
(
v
.
categoryType
);
RotaryData
.
key
.
push
(
v
.
categoryType
);
RotaryData
.
data
[
v
.
categoryType
]
=
[{
start
:
i
*
60
-
20
,
end
:
i
*
60
+
20
}];
if
(
i
>=
6
)
{
if
(
i
>=
6
){
continue
;
return
;
}
}
RotaryData
.
data
[
v
.
categoryType
]
=
[{
start
:
i
*
60
-
20
,
end
:
i
*
60
+
20
}];
this
[
`img
${
i
}
`
].
source
=
v
.
prizeImg
;
this
[
`img
${
i
}
`
].
source
=
v
.
prizeImg
;
}
if
(
this
.
data
.
onceAgain
)
{
// 再抽一次
if
(
this
.
data
.
onceAgain
)
{
// 再抽一次
this
.
onTapStart
();
this
.
onTapStart
();
}
}
}
});
});
...
...
egret/src/panels/TurntablePanel/TurntablePrizePanel.ts
View file @
a945e2dc
...
@@ -37,7 +37,9 @@ export default class TurnPrizePanel extends Panel {
...
@@ -37,7 +37,9 @@ export default class TurnPrizePanel extends Panel {
updateOption
(
option
:
any
)
{
updateOption
(
option
:
any
)
{
const
{
categoryType
,
img
,
num
,
propType
}
=
option
;
// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
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
)
{
switch
(
categoryType
)
{
case
2
:
case
2
:
this
[
'blood'
].
visible
=
true
;
this
[
'blood'
].
visible
=
true
;
...
...
mock/happyclear/getBackReward.json
View file @
a945e2dc
{
{
"code"
:
"0000000000"
,
"code"
:
"0000000000"
,
"data"
:{
"data"
:{
"appItemId"
:
2322
,
"completePercent"
:
"99"
,
"categoryType"
:
1
,
"prizeImage"
:
""
,
"coinType"
:
1
,
"remainPercent"
:
"剩余进度"
,
"img"
:
"1"
,
"scratchCardTaskId"
:
1
,
"maxValue"
:
2
,
"categoryType"
:
4
,
"minValue"
:
1
,
"title"
:
"奖品信息"
,
"name"
:
"测试商品"
,
"coinType"
:
1
,
"num"
:
3
,
"maxValue"
:
10
,
"propType"
:
2
,
"minValue"
:
10
,
"rate"
:
"概率"
,
"appItemId"
:
2099
,
"title"
:
"商品信息"
,
"img"
:
"http://yun.duiba.com.cn/db_games/1022/111.png"
,
"value"
:
"虚拟商品标识符"
"name"
:
"虚拟商品名称"
,
"value"
:
"虚拟商品编码"
,
"num"
:
10
,
"propType"
:
1
},
},
"desc"
:
"OK"
,
"desc"
:
"OK"
,
"success"
:
true
,
"success"
:
true
,
...
...
mock/happyclear/scratchGetTaskInfo.json
View file @
a945e2dc
{
{
"success"
:
true
,
"success"
:
true
,
"code"
:
null
,
"code"
:
"0000000000"
,
"desc"
:
null
,
"desc"
:
"OK"
,
"timestamp"
:
15
6619982230
8
,
"timestamp"
:
15
7231893338
8
,
"data"
:
{
"data"
:
{
"scratchCardTaskId"
:
1
222
,
"scratchCardTaskId"
:
1
,
"taskStatus"
:
1
,
"taskStatus"
:
1
,
"prizeImage"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"prizeImage"
:
"//yun.dui88.com/images/201910/e6pmpk2pne.png"
,
"currentTime"
:
1570673808000
,
"currentTime"
:
1572318933366
,
"endTime"
:
1570673810000
,
"endTime"
:
1572358710000
,
"completePercent"
:
"90.50"
,
"completePercent"
:
"91.0"
,
"remainPercent"
:
"9.50"
,
"remainPercent"
:
"9.0"
,
"helpedCount"
:
4
,
"totalNeedCount"
:
3
,
"helpedCount"
:
2
,
"avatarList"
:
[
"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 @@
...
@@ -2,10 +2,15 @@
"success"
:
true
,
"success"
:
true
,
"code"
:
"0000000000"
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"desc"
:
"OK"
,
"timestamp"
:
1572
262646931
,
"timestamp"
:
1572
327888728
,
"data"
:
{
"data"
:
{
"isScratchCard"
:
false
,
"isScratchCard"
:
true
,
"option"
:
null
,
"option"
:
{
"scratchCardTaskId"
:
7
,
"prizeImage"
:
"//yun.dui88.com/images/201910/e6pmpk2pne.png"
,
"completePercent"
:
"8"
,
"remainPercent"
:
null
},
"orderNum"
:
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