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
6c6c3f91
Commit
6c6c3f91
authored
Dec 10, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab2.dui88.com/wanghongyuan/yyh
into dev
parents
9d68ad5f
65bd099a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
24 deletions
+69
-24
Buried.ts
egret/libs/tw/util/Buried.ts
+29
-22
StartScene.ts
egret/src/startScene/StartScene.ts
+40
-2
No files found.
egret/libs/tw/util/Buried.ts
View file @
6c6c3f91
...
...
@@ -4,7 +4,7 @@ import { IExposureData } from '../data/common/IExposureData';
export
class
Buried
{
private
static
appId
:
number
;
//
private static consumerId: number;
private
static
consumerId
:
number
;
private
static
oaId
:
number
;
/**
...
...
@@ -13,23 +13,23 @@ export class Buried {
public
static
init
():
void
{
if
(
DataManager
.
ins
.
gameCfgData
)
{
this
.
appId
=
DataManager
.
ins
.
gameCfgData
.
appInfo
.
appId
;
//
this.consumerId = DataManager.ins.getInfoData.consumerId;
this
.
consumerId
=
DataManager
.
ins
.
getInfoData
.
consumerId
;
this
.
oaId
=
DataManager
.
ins
.
gameCfgData
.
gameInfo
.
oaId
;
}
else
if
(
DataManager
.
ins
.
customCfgData
)
{
this
.
appId
=
DataManager
.
ins
.
customCfgData
.
appId
;
//
this.consumerId = DataManager.ins.customCfgData.consumerId;
this
.
consumerId
=
DataManager
.
ins
.
customCfgData
.
consumerId
;
this
.
oaId
=
DataManager
.
ins
.
customCfgData
.
oaId
;
}
else
if
(
DataManager
.
ins
.
petIndexData
&&
DataManager
.
ins
.
petIndexData
.
appId
&&
DataManager
.
ins
.
petIndexData
.
activityId
)
{
this
.
appId
=
DataManager
.
ins
.
petIndexData
.
appId
;
//
this.consumerId = DataManager.ins.petIndexData.consumerId;
this
.
consumerId
=
DataManager
.
ins
.
petIndexData
.
consumerId
;
this
.
oaId
=
DataManager
.
ins
.
petIndexData
.
activityId
;
}
else
if
(
DataManager
.
ins
.
petsIndexData
&&
DataManager
.
ins
.
petsIndexData
.
appId
&&
DataManager
.
ins
.
petsIndexData
.
activityId
)
{
this
.
appId
=
DataManager
.
ins
.
petsIndexData
.
appId
;
//
this.consumerId = DataManager.ins.petsIndexData.consumerId;
this
.
consumerId
=
DataManager
.
ins
.
petsIndexData
.
consumerId
;
this
.
oaId
=
DataManager
.
ins
.
petsIndexData
.
activityId
;
}
else
{
this
.
appId
=
window
[
"appId"
];
//
this.consumerId = window["consumerId"];
this
.
consumerId
=
window
[
"consumerId"
];
this
.
oaId
=
window
[
"projectId"
];
}
}
...
...
@@ -42,25 +42,32 @@ export class Buried {
* @returns {{dpm: string; consumerId: number; domain: string; appId: number}}
*/
public
static
createExposure
(
dpm
:
string
,
dcm
:
string
,
dom
?:
string
,
embedDomain
=
'//embedlog.duiba.com.cn'
):
IExposureData
{
if
(
dom
){
const
exposure
:
IExposureData
=
{
dpm
:
dpm
,
dcm
:
dcm
,
//
consumerId: Buried.consumerId,
dom
:
dom
,
consumerId
:
Buried
.
consumerId
,
appId
:
Buried
.
appId
,
domain
:
embedDomain
};
if
(
dom
)
exposure
.
dom
=
dom
;
return
exposure
;
}
else
{
const
exposure
:
IExposureData
=
{
dpm
:
dpm
,
dcm
:
dcm
,
consumerId
:
Buried
.
consumerId
,
appId
:
Buried
.
appId
,
domain
:
embedDomain
};
return
exposure
;
}
}
/**
* dpm拼接
* @param pageId 页面ID
* @param area 区域
* @param dpm 埋点号
* dom拼接
* @param wayId 渠道ID
* @returns {string}
*/
public
static
connectDom
(
wayId
:
number
):
string
{
...
...
egret/src/startScene/StartScene.ts
View file @
6c6c3f91
...
...
@@ -8,6 +8,8 @@ import { DataManager } from "../../libs/tw/manager/DataManager";
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
import
Waiting
from
"../waiting/Waiting"
;
import
GameConst
from
"../GameConst"
;
import
{
Buried
}
from
"../../libs/tw/util/Buried"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
export
default
class
StartScene
extends
Scene
{
...
...
@@ -35,6 +37,11 @@ export default class StartScene extends Scene {
private
level
;
private
startdata
;
private
type
;
private
startExposure
:
any
;
private
chuandiExposure
:
any
;
private
huozhongExposure
:
any
;
private
pkExposure
:
any
;
constructor
(
data
){
super
();
if
(
data
.
type
){
...
...
@@ -61,13 +68,40 @@ export default class StartScene extends Scene {
}
initBuired
()
{
let
num
:
any
if
(
GameConst
.
getQueryString
(
"wayId"
)){
num
=
GameConst
.
getQueryString
(
"wayId"
)
}
else
{
num
=
0
;
}
let
startDpmIn
=
Buried
.
connectDpm
(
110
,
1
,
1
);
// 点击埋点
let
startDcmIn
=
Buried
.
connectDcm
(
202
,
0
,
0
);
// 曝光埋点
let
startDomIn
=
Buried
.
connectDom
(
num
)
this
.
startExposure
=
Buried
.
createExposure
(
startDpmIn
,
startDcmIn
,
startDomIn
);
NetManager
.
ins
.
showLog
(
this
.
startExposure
);
let
chuandiDpmIn
=
Buried
.
connectDpm
(
110
,
2
,
1
);
// 点击埋点
let
chuandiDcmIn
=
Buried
.
connectDcm
(
202
,
0
,
0
);
// 曝光埋点
this
.
chuandiExposure
=
Buried
.
createExposure
(
chuandiDpmIn
,
chuandiDcmIn
);
NetManager
.
ins
.
showLog
(
this
.
chuandiExposure
);
let
huozhongDpmIn
=
Buried
.
connectDpm
(
110
,
3
,
1
);
// 点击埋点
let
huozhongDcmIn
=
Buried
.
connectDcm
(
202
,
0
,
0
);
// 曝光埋点
this
.
huozhongExposure
=
Buried
.
createExposure
(
huozhongDpmIn
,
huozhongDcmIn
);
NetManager
.
ins
.
showLog
(
this
.
huozhongExposure
);
let
pkDpmIn
=
Buried
.
connectDpm
(
110
,
4
,
1
);
// 点击埋点
let
pkDcmIn
=
Buried
.
connectDcm
(
202
,
0
,
0
);
// 曝光埋点
this
.
pkExposure
=
Buried
.
createExposure
(
pkDpmIn
,
pkDcmIn
);
NetManager
.
ins
.
showLog
(
this
.
pkExposure
);
}
onEnterFrame
(){
}
initUI
(
data
)
{
this
.
once
(
egret
.
Event
.
ADDED_TO_STAGE
,
()
=>
{
this
.
height
=
this
.
stage
.
stageHeight
;
},
this
);
...
...
@@ -199,6 +233,7 @@ export default class StartScene extends Scene {
}
GuideFive
(){
Waiting
.
instance
.
show
();
NetManager
.
ins
.
clickLog
(
this
.
chuandiExposure
);
yzwNet
.
doStart
((
s
)
=>
{
if
(
!
s
){
ToastCtrl
.
instance
.
show
(
DataManager
.
ins
.
getData
(
"doStart"
).
message
)
...
...
@@ -249,6 +284,7 @@ export default class StartScene extends Scene {
unlockArea
(){
if
(
this
.
level
==
0
){
Waiting
.
instance
.
show
();
NetManager
.
ins
.
clickLog
(
this
.
chuandiExposure
);
yzwNet
.
doStart
((
s
)
=>
{
if
(
!
s
){
ToastCtrl
.
instance
.
show
(
DataManager
.
ins
.
getData
(
"doStart"
).
message
)
...
...
@@ -301,10 +337,12 @@ export default class StartScene extends Scene {
}
onTap_chuandi
(){
NetManager
.
ins
.
clickLog
(
this
.
huozhongExposure
);
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
ShareStarterScene
);
}
onTap_PKBtn
(){
Waiting
.
instance
.
show
();
NetManager
.
ins
.
clickLog
(
this
.
pkExposure
);
yzwNet
.
getPkBaseInfo
((
s
)
=>
{
Waiting
.
instance
.
hide
();
if
(
!
s
){
...
...
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