Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yyh
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
yyh
Commits
f0c96c88
Commit
f0c96c88
authored
Dec 09, 2019
by
wangzhujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
812449f7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
130 additions
and
26 deletions
+130
-26
index.html
egret/index.html
+36
-0
MainBase.ts
egret/libs/tl/MainBase.ts
+1
-1
Main.ts
egret/src/Main.ts
+5
-4
StartScene.ts
egret/src/startScene/StartScene.ts
+17
-5
GuidePanel.ts
egret/src/yazuwei/GuidePanel.ts
+10
-3
PKScene.ts
egret/src/yazuwei/PKScene.ts
+27
-9
PlacePanel.ts
egret/src/yazuwei/PlacePanel.ts
+2
-1
RecordMapScene.ts
egret/src/yazuwei/RecordMapScene.ts
+29
-0
homeBaseInfo.json
mock/yzw/homeBaseInfo.json
+3
-3
No files found.
egret/index.html
View file @
f0c96c88
...
...
@@ -329,7 +329,43 @@
});
};
</script>
<script
type=
"text/javascript"
src=
"https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/3.0.0/vconsole.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://res.suning.cn/public/v5/??js/zepto/1.1.4/app.js,mod/alertBox/2.0.0/alertBox.js"
></script>
<script
type=
"text/javascript"
src=
"https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://yun.duiba.com.cn/upload/wnqqp6z1zr.js"
></script>
<script>
function
share
(){
alert
(
"进入分享"
);
AlipayJSBridge
.
call
(
'esportsShare'
,
{
title
:
'测试标题'
,
content
:
'测试内容'
,
imgUrl
:
'http://yun.duiba.com.cn/duibaManagerWeb/fgzpqk6zzo.png'
,
url
:
'http://activity.m.duiba.com.cn/customShare/share?id=3327'
,
type
:
'3'
});
}
function
shareImg
(
num
){
console
.
log
(
"进入分享图片"
);
var
imgUrl
;
if
(
num
==
1
){
imgUrl
=
""
}
else
if
(
num
==
2
){
imgUrl
=
""
}
else
if
(
num
==
3
){
imgUrl
=
""
}
else
if
(
num
==
4
){
imgUrl
=
""
}
else
if
(
num
==
5
){
imgUrl
=
""
}
else
if
(
num
==
6
){
imgUrl
=
""
}
else
if
(
num
==
7
){
imgUrl
=
""
}
else
if
(
num
==
8
){
imgUrl
=
""
}
AlipayJSBridge
.
call
(
'esportsShare'
,
{
imgUrl
:
'http://a.hiphotos.baidu.com/image/pic/item/f603918fa0ec08fa3139e00153ee3d6d55fbda5f.jpg'
});
}
function
deeplink
(){
window
.
location
.
href
=
'esports://openapp?url=http://aghzact.zjkczn.com/h5/defaultActive.html?activeUrl=https%3A%2F%2Factivity.m.duiba.com.cn%2Fprojectx%2Fpd9bf59fa%2Findex.html%3Ffrom%3Dlogin%26shareCode%3D123'
;
}
</script>
<!-- <script>
//音乐自动播放
$(document).ready(function () {
...
...
egret/libs/tl/MainBase.ts
View file @
f0c96c88
...
...
@@ -166,7 +166,7 @@ export default class MainBase extends eui.UILayer {
// this.injectRES();
}
catch
(
e
)
{
alert
(
"
网络
异常,请检查网络后重试~"
);
alert
(
"
加载
异常,请检查网络后重试~"
);
window
.
location
.
reload
();
console
.
error
(
e
);
}
...
...
egret/src/Main.ts
View file @
f0c96c88
...
...
@@ -183,11 +183,12 @@ class Main extends MainBase {
ToastCtrl
.
instance
.
show
(
"网络异常请重试~"
);
return
;
}
},
window
[
'projectId'
],
GameConst
.
getQueryString
(
"InviteSource"
))
Waiting
.
instance
.
hide
();
let
data
=
DataManager
.
ins
.
getData
(
"homeBaseInfo"
).
data
;
Waiting
.
instance
.
hide
();
let
data
=
DataManager
.
ins
.
getData
(
"homeBaseInfo"
).
data
;
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
data
);
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
data
);
},
window
[
'projectId'
],
GameConst
.
getQueryString
(
"InviteSource"
))
}
else
{
yzwNet
.
homeBaseInfo
((
s
)
=>
{
if
(
!
s
){
...
...
egret/src/startScene/StartScene.ts
View file @
f0c96c88
...
...
@@ -32,12 +32,24 @@ export default class StartScene extends Scene {
private
level
;
private
startdata
;
private
type
;
constructor
(
data
){
super
();
this
.
startdata
=
data
;
this
.
level
=
data
.
currentLevel
this
.
initUI
(
data
);
this
.
hand
.
visible
=
false
;
if
(
data
.
type
){
this
.
startdata
=
data
.
data
;
this
.
level
=
data
.
data
.
currentLevel
this
.
hand
.
visible
=
false
;
this
.
type
=
data
.
type
;
this
.
initUI
(
data
.
data
);
}
else
{
this
.
startdata
=
data
;
this
.
level
=
data
.
currentLevel
this
.
hand
.
visible
=
false
;
this
.
initUI
(
data
);
}
}
onSkinComplete
()
{
...
...
@@ -60,7 +72,7 @@ export default class StartScene extends Scene {
GCache
.
writeCache
(
"isGuide"
,
true
);
this
.
openGuide
();
}
if
(
data
&&
data
.
type
==
1
){
if
(
this
.
type
&&
this
.
type
==
1
){
//引导过程中点亮杭州 回到引导页面显示第几位火炬手
this
.
hand
.
visible
=
true
;
...
...
egret/src/yazuwei/GuidePanel.ts
View file @
f0c96c88
...
...
@@ -3,6 +3,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import
Panel
from
"../views/Panel"
;
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
{
GCache
}
from
"../../libs/tc/util/GCache"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
GuidePanel
extends
Panel
{
...
...
@@ -72,8 +73,14 @@ export default class GuidePanel extends Panel{
this
.
guide3
.
visible
=
false
;
this
.
xuanshi
.
visible
=
true
;
this
.
dianran
.
visible
=
false
;
this
.
onTap
(
this
.
closeBtn
,
this
.
backStartScene
);
this
.
onTap
(
this
.
fireBtn
,
this
.
backStartScene
);
if
(
this
.
data
.
type
==
2
){
this
.
onTap
(
this
.
closeBtn
,()
=>
{
this
.
hidePanel
()});
this
.
onTap
(
this
.
fireBtn
,()
=>
{
this
.
hidePanel
()});
}
else
{
this
.
onTap
(
this
.
closeBtn
,
this
.
backStartScene
);
this
.
onTap
(
this
.
fireBtn
,
this
.
backStartScene
);
}
}
initDianran
(
data
){
this
.
guide1
.
visible
=
false
;
...
...
@@ -85,7 +92,7 @@ export default class GuidePanel extends Panel{
this
.
onTap
(
this
.
dianran
,
this
.
goPlace
);
}
backStartScene
(){
let
data
=
{
type
:
1
};
let
data
=
{
data
:
DataManager
.
ins
.
getData
(
"homeBaseInfo"
).
data
,
type
:
1
};
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
data
);
this
.
hidePanel
()
}
...
...
egret/src/yazuwei/PKScene.ts
View file @
f0c96c88
...
...
@@ -4,6 +4,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import
{
yzwNet
}
from
"../NetConst"
;
import
ToastCtrl
from
"../ctrls/toastCtrl"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
export
default
class
PKScene
extends
Scene
{
protected
get
skinKey
(){
return
'PK'
}
...
...
@@ -51,17 +52,17 @@ export default class PKScene extends Scene{
this
.
otherteamnum
.
text
=
data
.
enemyTeamSteps
;
if
(
data
.
myTeamSteps
<
50000
){
this
.
myline
.
height
=
200
+
data
.
myTeamSteps
*
0.01
6
this
.
myline
.
height
=
520
+
data
.
myTeamSteps
*
0.009
6
}
else
{
this
.
myline
.
height
=
1000
+
(
data
.
myTeamSteps
-
50000
)
*
0.0
1
this
.
myline
.
height
=
1000
+
(
data
.
myTeamSteps
-
50000
)
*
0.0
09
}
if
(
data
.
enemyTeamSteps
<
50000
){
this
.
otherline
.
height
=
200
+
data
.
enemyTeamSteps
*
0.01
6
this
.
otherline
.
height
=
520
+
data
.
enemyTeamSteps
*
0.009
6
}
else
{
this
.
otherline
.
height
=
1000
+
(
data
.
enemyTeamSteps
-
50000
)
*
0.0
1
this
.
otherline
.
height
=
1000
+
(
data
.
enemyTeamSteps
-
50000
)
*
0.0
09
}
this
.
myline
.
anchorOffsetY
=
this
.
myline
.
height
this
.
otherline
.
anchorOffsetY
=
this
.
otherline
.
height
...
...
@@ -74,7 +75,7 @@ export default class PKScene extends Scene{
this
.
otherteamnum
.
y
=
this
.
otherline
.
y
-
this
.
otherline
.
height
-
35
;
console
.
log
(
this
.
myteam
.
y
)
for
(
let
i
=
1
;
i
<
data
.
myTeamMembers
.
length
+
1
;
i
++
){
this
[
"team"
+
i
][
"onnum"
].
text
=
"+"
+
data
.
myTeamMembers
[
i
-
1
].
step
s
;
this
[
"team"
+
i
][
"onnum"
].
text
=
"+"
+
data
.
myTeamMembers
[
i
-
1
].
memberStepCount
s
;
this
[
"team"
+
i
][
"onphone"
].
text
=
data
.
myTeamMembers
[
i
-
1
].
phone
;
let
now
=
new
Date
();
let
year
=
now
.
getFullYear
();
...
...
@@ -87,7 +88,7 @@ export default class PKScene extends Scene{
day
=
"0"
+
day
;
}
let
textday
=
(
year
+
"-"
+
mon
+
"-"
+
day
)
if
(
data
.
myTeamMembers
[
i
-
1
].
on
LineDat
e
==
textday
){
if
(
data
.
myTeamMembers
[
i
-
1
].
on
lineTim
e
==
textday
){
this
[
"team"
+
i
][
"notonline"
].
visible
=
false
;
this
[
"team"
+
i
][
"onGroup"
].
visible
=
true
;
this
[
"team"
+
i
][
"notGroup"
].
visible
=
false
;
...
...
@@ -98,9 +99,16 @@ export default class PKScene extends Scene{
this
.
setColor
(
this
[
"team"
+
i
][
"headimg"
]);
this
[
"team"
+
i
][
"notonphone"
].
text
=
data
.
myTeamMembers
[
i
-
1
].
phone
;
}
if
(
data
.
myTeamMembers
[
i
-
1
].
myFlag
==
1
){
this
[
"team"
+
i
][
"onphone"
].
text
=
"我"
}
NetManager
.
ins
.
getProjectUserInfo
((
s
)
=>
{
if
(
!
s
){
return
}
let
data
=
DataManager
.
ins
.
getData
(
"getProjectUserInfo"
).
data
;
if
(
data
.
myTeamMembers
[
i
-
1
].
uid
==
data
.
consumerId
){
this
[
"team"
+
i
][
"onphone"
].
text
=
"我"
}
})
}
for
(
let
n
=
5
;
n
>
data
.
myTeamMembers
.
length
;
n
--
){
this
[
"team"
+
n
][
"notonline"
].
visible
=
false
;
...
...
@@ -156,4 +164,14 @@ export default class PKScene extends Scene{
group
.
filters
=
[
colorFilter
];
}
addTeam
(){
window
[
'share'
]();
}
askTeam
(){
window
[
'share'
]();
}
askOnline
(){
window
[
'share'
]();
}
}
\ No newline at end of file
egret/src/yazuwei/PlacePanel.ts
View file @
f0c96c88
...
...
@@ -12,8 +12,9 @@ export default class PlacePanel extends Panel{
public
mapBG
:
eui
.
Image
;
public
closeBtn
:
eui
.
Button
;
public
knowBtn
:
eui
.
Button
;
constructor
(){
constructor
(
data
){
super
();
this
.
initUI
(
data
)
}
initUI
(
data
){
...
...
egret/src/yazuwei/RecordMapScene.ts
View file @
f0c96c88
...
...
@@ -5,13 +5,34 @@ export default class RecordMapScene extends Scene{
public
mapBG
:
eui
.
Image
;
public
shareBtn
:
eui
.
Button
;
public
sharelab
:
eui
.
Label
;
private
level
;
constructor
(
data
){
super
();
this
.
level
=
data
.
num
;
this
.
initUI
(
data
);
}
initUI
(
data
){
// if(data.num == 1){
// this.mapBG.source = "maphz_png"
// }else if(data.num == 2){
// this.mapBG.source = "mapam_png"
// }else if(data.num == 3){
// this.mapBG.source = "mapxg_png"
// }else if(data.num == 4){
// this.mapBG.source = "maptb_png"
// }else if(data.num == 5){
// this.mapBG.source = "maprb_png"
// }else if(data.num == 6){
// this.mapBG.source = "maphg_png"
// }else if(data.num == 7){
// this.mapBG.source = "mapcx_png"
// }else if(data.num == 8){
// this.mapBG.source = "mapmg_png"
// }
const
arr
=
[
"HZ"
,
"AM"
,
"XG"
,
"TB"
,
"RB"
,
"HG"
,
"CX"
,
"MG"
];
for
(
let
i
=
0
;
i
<
data
.
data
.
length
;
i
++
){
if
(
arr
[
data
.
num
-
1
]
==
data
.
data
[
i
]){
this
.
sharelab
.
visible
=
false
;
...
...
@@ -21,5 +42,13 @@ export default class RecordMapScene extends Scene{
}
initEvents
(){
super
.
initEvents
();
this
.
onTap
(
this
.
shareBtn
,
this
.
sharePic
)
}
sharePic
(){
window
[
'shareImg'
](
this
.
level
);
}
}
\ No newline at end of file
mock/yzw/homeBaseInfo.json
View file @
f0c96c88
...
...
@@ -2,8 +2,8 @@
"code"
:
null
,
"data"
:{
"currentLevel"
:
5
,
"treasureBoxNum"
:
1
,
"currentScore"
:
1
,
"treasureBoxNum"
:
0
,
"currentScore"
:
1
222
,
"pkResult"
:{
"myTeamSteps"
:
100
,
"enemyTeamSteps"
:
2000
,
...
...
@@ -29,7 +29,7 @@
}
]
},
"nextLevelScore"
:
1
1111
,
"nextLevelScore"
:
1
0
,
"activityJoinNum"
:
1
},
"message"
:
null
,
...
...
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