Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaoleTuia
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
王剑峰
xiaoxiaoleTuia
Commits
11120bef
Commit
11120bef
authored
May 14, 2021
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
6cdf9bf0
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
800 additions
and
139 deletions
+800
-139
.buildrc.js
.buildrc.js
+3
-1
index.html
egret/index.html
+340
-62
inline.js
egret/inline.js
+103
-0
PrizePanel.ts
egret/libs/new_wx/components/PrizePanel.ts
+4
-1
Main2Skin.exml
egret/resource/skins/Main2Skin.exml
+2
-0
Utils.ts
egret/src/Utils.ts
+7
-3
MainScene.ts
egret/src/mainScene/MainScene.ts
+106
-65
MapScene.ts
egret/src/mapScene/MapScene.ts
+3
-1
FailedPanel.ts
egret/src/panels/FailedPanel.ts
+8
-2
StartPanel.ts
egret/src/panels/StartPanel.ts
+15
-1
doJoin.json
mock/activity/doJoin.json
+191
-0
config.js
mock/config.js
+9
-0
home.json
mock/happyclear/home.json
+3
-3
openBox.json
mock/mixloanv/happyclear/openBox.json
+6
-0
No files found.
.buildrc.js
View file @
11120bef
...
@@ -19,6 +19,8 @@ module.exports = {
...
@@ -19,6 +19,8 @@ module.exports = {
'/activityPlugin/*'
:
'http://localhost:3000'
,
'/activityPlugin/*'
:
'http://localhost:3000'
,
'/aaw/*'
:
'http://localhost:3000'
,
'/aaw/*'
:
'http://localhost:3000'
,
'/wechatShare/*'
:
'http://localhost:3000'
,
'/wechatShare/*'
:
'http://localhost:3000'
,
'/summer/*'
:
'http://localhost:3000'
'/summer/*'
:
'http://localhost:3000'
,
'/activity/*'
:
'http://localhost:3000'
,
'/statistics/*'
:
'http://localhost:3000'
,
}
}
}
}
\ No newline at end of file
egret/index.html
View file @
11120bef
This diff is collapsed.
Click to expand it.
egret/inline.js
0 → 100644
View file @
11120bef
!
function
()
{
"use strict"
;
var
i
,
t
,
m
,
e
,
o
;
function
n
()
{
if
(
void
0
!==
t
)
return
t
;
if
(
window
.
TA
&&
void
0
!==
window
.
TA
.
isSupportWebp
)
{
if
(
t
=
window
.
TA
.
isSupportWebp
,
window
.
localStorage
)
try
{
window
.
localStorage
.
setItem
(
"iswebp"
,
t
)
}
catch
(
e
)
{}
return
t
}
if
(
window
.
localStorage
)
{
var
e
=
window
.
localStorage
.
getItem
(
"ta_webp"
);
if
(
null
!=
e
)
return
t
=
"true"
===
e
}
try
{
t
=
!!
[].
map
&&
0
===
document
.
createElement
(
"canvas"
).
toDataURL
(
"image/webp"
).
indexOf
(
"data:image/webp"
)
}
catch
(
e
)
{
t
=
!
1
}
if
(
window
.
localStorage
)
try
{
window
.
localStorage
.
setItem
(
"ta_webp"
,
t
)
}
catch
(
e
)
{}
return
t
}
function
p
(
e
)
{
return
e
&&
"[object String]"
===
Object
.
prototype
.
toString
.
call
(
e
)
&&
-
1
===
e
.
indexOf
(
"data:image"
)
&&
-
1
===
e
.
indexOf
(
"?x-oss-process"
)
&&
n
()
?
e
+
"?x-oss-process=image/format,webp"
:
e
}
function
w
(
e
)
{
var
t
=
window
.
CFG
||
{};
return
e
?
t
[
e
]
:
t
}
function
a
(
e
)
{
var
t
=
o
.
clientWidth
;
!
navigator
.
userAgent
.
match
(
/Android|iPhone|iPad|iPod/i
)
&&
1024
<
t
&&
(
t
=
640
,
"function"
==
typeof
e
&&
setTimeout
(
function
()
{
e
(
t
)
},
0
)),
window
.
remScale
=
t
/
640
;
var
n
=
t
/
640
*
2
*
100
;
n
!==
i
&&
(
i
=
n
,
o
.
style
.
fontSize
=
""
.
concat
(
i
,
"px"
))
}(
o
=
document
.
documentElement
).
getAttribute
[
"data-dpr"
]
||
(
e
=
navigator
.
userAgent
.
match
(
/iPhone|iPad|iPod/i
)
?
Math
.
min
(
window
.
devicePixelRatio
||
1
,
3
)
:
1
,
o
.
setAttribute
(
"data-dpr"
,
e
),
a
(
function
(
e
)
{
document
.
body
.
style
.
margin
=
"0 auto"
,
document
.
body
.
style
.
maxWidth
=
""
.
concat
(
e
,
"px"
)
}),
window
.
addEventListener
(
"pageshow"
,
a
,
!
1
),
window
.
addEventListener
(
"orientationchange"
in
window
?
"orientationchange"
:
"resize"
,
a
,
!
1
)),
function
(
e
)
{
var
t
=
0
<
arguments
.
length
&&
void
0
!==
e
?
e
:
"ta-webp"
;
!
n
()
||
-
1
===
((
e
=
document
.
documentElement
).
className
||
""
).
indexOf
(
t
)
&&
e
.
classList
.
add
(
t
)
}(),
function
(
e
)
{
var
t
,
n
=
0
<
arguments
.
length
&&
void
0
!==
e
?
e
:
"ta-hairlines"
,
i
=
document
.
documentElement
;
2
<=
(
window
.
devicePixelRatio
||
1
)
&&
-
1
===
i
.
className
.
indexOf
(
n
)
&&
(
t
=
document
.
createElement
(
"div"
),
e
=
document
.
createElement
(
"body"
),
t
.
style
.
border
=
".5px solid transparent"
,
e
.
appendChild
(
t
),
i
.
insertBefore
(
e
,
i
.
firstElementChild
||
i
.
firstChild
),
1
===
t
.
offsetHeight
&&
i
.
classList
.
add
(
n
),
i
.
removeChild
(
e
))
}();
var
r
=
window
.
TA
=
window
.
TA
||
{};
r
.
px2rem
=
function
(
e
)
{
return
parseFloat
(
e
)
/
234.375
},
r
.
rem2px
=
function
(
e
)
{
return
parseFloat
(
e
)
*
i
*
2
},
r
.
getWebpUrl
=
p
,
r
.
getConfig
=
w
,
r
.
getSkinConfig
=
function
(
e
)
{
if
(
m
)
return
e
?
m
[
e
]
||
{}
:
m
;
m
=
{};
for
(
var
t
=
w
(
"styleConfig"
),
n
=
t
?
t
.
skinConfig
:
[],
i
=
0
;
i
<
n
.
length
;
i
++
)
{
var
o
=
n
[
i
].
childrens
;
if
(
o
)
for
(
var
a
=
0
;
a
<
o
.
length
;
a
++
)
{
var
r
=
o
[
a
],
d
=
r
.
type
,
c
=
r
.
name
,
l
=
r
.
title
,
s
=
r
.
webp
,
u
=
o
[
a
].
value
,
r
=
u
;
switch
(
d
)
{
case
"image"
:
u
=
!
1
===
s
?
u
:
p
(
u
);
break
;
case
"position"
:
case
"bottom"
:
u
=
parseFloat
(
u
.
toString
().
replace
(
/<
[^
>
]
*>/g
,
""
))
}
m
[
c
]
=
{
value
:
u
,
oldValue
:
r
,
type
:
d
,
title
:
l
}
}
}
return
e
?
m
[
e
]
:
m
},
r
.
addPreloadStyle
=
function
(
e
)
{
var
t
=
document
.
createElement
(
"style"
);
t
.
type
=
"text/css"
,
t
.
styleSheet
?
t
.
styleSheet
.
cssText
=
e
:
t
.
appendChild
(
document
.
createTextNode
(
e
)),
document
.
getElementsByTagName
(
"head"
)[
0
].
appendChild
(
t
)
},
r
.
preloadImage
=
function
(
e
)
{
for
(
var
t
=
0
;
t
<
e
.
length
;
t
++
)
{
var
n
=
[];
n
[
t
]
=
new
Image
,
n
[
t
].
src
=
e
[
t
]
}
},
Object
.
defineProperty
(
r
,
"isSupportWebp"
,
{
get
:
n
})
}();
\ No newline at end of file
egret/libs/new_wx/components/PrizePanel.ts
View file @
11120bef
...
@@ -50,9 +50,12 @@ export default class PrizePanel extends Panel {
...
@@ -50,9 +50,12 @@ export default class PrizePanel extends Panel {
//打开宝箱
//打开宝箱
this
[
"doubleBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
"doubleBtn"
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
visible
=
false
;
Utils
.
couponJoin
(
CouponJoinScene
.
Checkpoint
,
this
.
_level
,()
=>
{
Utils
.
couponJoin
(
CouponJoinScene
.
Checkpoint
,
this
.
_level
,()
=>
{
this
.
visible
=
true
;
this
.
changeSceneShow
(
2
);
},()
=>
{
},()
=>
{
this
.
visible
=
true
;
this
.
changeSceneShow
(
2
);
this
.
changeSceneShow
(
2
);
})
})
})
})
...
...
egret/resource/skins/Main2Skin.exml
View file @
11120bef
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
</e:Group>
</e:Group>
<e:Image
id=
"settingBtn"
x=
"-0.47"
y=
"1"
source=
"setting_png"
/>
<e:Image
id=
"settingBtn"
x=
"-0.47"
y=
"1"
source=
"setting_png"
/>
</e:Group>
</e:Group>
<e:Label
id=
"tosucbtn"
text=
"一键成功"
y=
"180"
backgroundColor=
"0xdba013"
background=
"true"
left=
"0"
/>
<e:Label
id=
"tofailbtn"
text=
"一键失败"
y=
"224"
background=
"true"
backgroundColor=
"0xff0000"
left=
"0"
/>
...
...
egret/src/Utils.ts
View file @
11120bef
import
{
DataManager
}
from
"../libs/tw/manager/DataManager"
;
import
{
DataManager
}
from
"../libs/tw/manager/DataManager"
;
export
const
TACore
=
window
[
"TACore"
];
export
enum
CouponJoinScene
{
export
enum
CouponJoinScene
{
BlindBox
=
0
,
//盲盒
BlindBox
=
0
,
//盲盒
//星级宝箱
//星级宝箱
...
@@ -192,15 +193,18 @@ export default class Utils {
...
@@ -192,15 +193,18 @@ export default class Utils {
afterClose
:
afterClose
afterClose
:
afterClose
}
}
console
.
error
(
"奖品弹窗点击===》"
,
scene
);
console
.
error
(
"奖品弹窗点击===》"
,
scene
);
beforeUse
&&
beforeUse
();
// beforeUse && beforeUse();
afterClose
&&
afterClose
();
// afterClose && afterClose();
TACore
.
couponJoin
(
options
);
}
}
//展示大转盘
//展示大转盘
static
showTurnCircle
(
afterClose
=
()
=>
{
}):
void
{
static
showTurnCircle
(
afterClose
=
()
=>
{
}):
void
{
let
options
:
ShowTurnCircleOptions
=
{
let
options
:
ShowTurnCircleOptions
=
{
afterClose
,
afterClose
,
}
}
afterClose
&&
afterClose
();
// afterClose && afterClose();
TACore
.
showTurnCircle
(
options
);
}
}
//是否存在视频
//是否存在视频
/** 是否展示观看视频按钮 */
/** 是否展示观看视频按钮 */
...
...
egret/src/mainScene/MainScene.ts
View file @
11120bef
This diff is collapsed.
Click to expand it.
egret/src/mapScene/MapScene.ts
View file @
11120bef
...
@@ -870,7 +870,9 @@ export default class MapScene extends Scene {
...
@@ -870,7 +870,9 @@ export default class MapScene extends Scene {
//打开转盘
//打开转盘
onTap_turnGroup
()
{
onTap_turnGroup
()
{
console
.
log
(
"打开转盘"
);
Utils
.
showTurnCircle
(()
=>
{
console
.
log
(
"转盘关闭"
);
})
}
}
//兑换
//兑换
onTap_exchangeBtn
()
{
onTap_exchangeBtn
()
{
...
...
egret/src/panels/FailedPanel.ts
View file @
11120bef
...
@@ -18,8 +18,14 @@ export default class FailedPanel extends Panel {
...
@@ -18,8 +18,14 @@ export default class FailedPanel extends Panel {
start
(
data
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
this
.
data
=
data
;
this
.
data
=
data
;
const
{
showVideo
,
videoAdd
}
=
data
;
let
{
showVideo
,
videoAdd
}
=
data
;
this
.
changeSceneShow
(
showVideo
);
let
_v
=
showVideo
if
(
showVideo
&&
Utils
.
isShowVideoEntrance
(
VideoEntranceScene
.
defeated
)){
_v
=
true
;
}
else
{
_v
=
false
;
}
this
.
changeSceneShow
(
_v
);
if
(
showVideo
)
{
if
(
showVideo
)
{
let
propNumShow
=
new
PropNumber
();
let
propNumShow
=
new
PropNumber
();
...
...
egret/src/panels/StartPanel.ts
View file @
11120bef
...
@@ -34,6 +34,15 @@ export default class StartPanel extends Panel {
...
@@ -34,6 +34,15 @@ export default class StartPanel extends Panel {
//闯关前弹框曝光
//闯关前弹框曝光
NetManager
.
ins
.
showLog
(
getlogItem
(
1
))
NetManager
.
ins
.
showLog
(
getlogItem
(
1
))
let
_v
=
false
;
if
(
Utils
.
isShowVideoEntrance
(
VideoEntranceScene
.
gameprops
)){
_v
=
true
;
}
this
[
'video1btn'
].
visible
=
_v
;
this
[
'video2btn'
].
visible
=
_v
;
this
[
'video3btn'
].
visible
=
_v
;
super
.
start
();
super
.
start
();
this
[
'price2'
].
text
=
`-
${
window
[
'price2'
]}
元宝`
;
this
[
'price2'
].
text
=
`-
${
window
[
'price2'
]}
元宝`
;
this
[
'price3'
].
text
=
`-
${
window
[
'price3'
]}
元宝`
;
this
[
'price3'
].
text
=
`-
${
window
[
'price3'
]}
元宝`
;
...
@@ -103,8 +112,13 @@ export default class StartPanel extends Panel {
...
@@ -103,8 +112,13 @@ export default class StartPanel extends Panel {
onTap_startBtn
()
{
onTap_startBtn
()
{
const
homeData
=
getHomeData
();
const
homeData
=
getHomeData
();
if
(
homeData
.
remainEnargy
<=
0
)
{
if
(
homeData
.
remainEnargy
<=
0
)
{
// if (homeData.askForEnergy)
{
if
(
Utils
.
isShowVideoEntrance
(
VideoEntranceScene
.
life
))
{
PanelCtrl
.
instance
.
show
(
'addBloodV'
);
PanelCtrl
.
instance
.
show
(
'addBloodV'
);
}
else
{
showToast
(
"体力不足"
);
}
// if (homeData.askForEnergy) {
// } else {
// } else {
// if (iswx()) {
// if (iswx()) {
// getShareUrl(this.stage);
// getShareUrl(this.stage);
...
...
mock/activity/doJoin.json
0 → 100644
View file @
11120bef
This diff is collapsed.
Click to expand it.
mock/config.js
View file @
11120bef
...
@@ -203,6 +203,15 @@ const config = {
...
@@ -203,6 +203,15 @@ const config = {
},
},
'/mixloanv/happyclear/submitStarBox'
:{
'/mixloanv/happyclear/submitStarBox'
:{
data
:
'./happyclear/submitStarBox.json'
data
:
'./happyclear/submitStarBox.json'
},
'/activity/doJoin'
:{
data
:
'./activity/doJoin.json'
},
'/mixloanv/happyclear/openBox'
:{
data
:
'./mixloanv/happyclear/openBox.json'
},
'/statistics/activityPagePerf'
:{
data
:
'./activity/doJoin.json'
}
}
};
};
...
...
mock/happyclear/home.json
View file @
11120bef
...
@@ -1011,15 +1011,15 @@
...
@@ -1011,15 +1011,15 @@
"remainProp"
:
[
"remainProp"
:
[
{
{
"type"
:
2
,
"type"
:
2
,
"num"
:
0
"num"
:
1
0
},
},
{
{
"type"
:
3
,
"type"
:
3
,
"num"
:
0
"num"
:
1
0
},
},
{
{
"type"
:
4
,
"type"
:
4
,
"num"
:
0
"num"
:
1
0
}
}
],
],
"remainEnargy"
:
2
,
"remainEnargy"
:
2
,
...
...
mock/mixloanv/happyclear/openBox.json
0 → 100644
View file @
11120bef
{
"code"
:
"000000"
,
"data"
:
9
,
"success"
:
true
,
"comment"
:
"根据不同场景和关卡获取碎片/积分/高级货币"
}
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