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
bc38c93f
Commit
bc38c93f
authored
Oct 28, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
52c46874
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
19 deletions
+52
-19
MainBase.ts
egret/libs/new_wx/MainBase.ts
+9
-0
IExposureData.ts
egret/libs/tw/data/common/IExposureData.ts
+1
-1
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+15
-0
Buried.ts
egret/libs/tw/util/Buried.ts
+4
-18
config.js
mock/config.js
+3
-0
getBackReward.json
mock/happyclear/getBackReward.json
+20
-0
No files found.
egret/libs/new_wx/MainBase.ts
View file @
bc38c93f
...
...
@@ -366,6 +366,14 @@ export default class MainBase extends eui.UILayer {
});
}
getBackReward
()
{
return
new
Promise
((
r
)
=>
{
NetManager
.
ins
.
hc_getBackReward
(()
=>
{
r
();
})
});
}
ajaxElement
()
{
return
new
Promise
((
r
)
=>
{
NetManager
.
ins
.
ajaxElement
(
async
()
=>
{
...
...
@@ -396,6 +404,7 @@ export default class MainBase extends eui.UILayer {
this
.
ajaxElement
(),
this
.
hcHome
(),
this
.
hc_userInfo
(),
this
.
getBackReward
(),
]);
MapScene
.
adData
=
DataManager
.
ins
.
getData
(
'hc_advert'
);
...
...
egret/libs/tw/data/common/IExposureData.ts
View file @
bc38c93f
...
...
@@ -7,7 +7,7 @@ export interface IExposureData {
activityUseType
?:
string
;
advertId
?:
number
;
appId
:
number
;
consumerId
:
number
;
//
consumerId: number;
dcm
:
string
;
domain
:
string
;
dpm
:
string
;
...
...
egret/libs/tw/manager/NetManager.ts
View file @
bc38c93f
...
...
@@ -943,6 +943,21 @@ export class NetManager extends ABNetManager {
};
this
.
send
(
net
);
}
public
hc_getBackReward
(
callback
:
Function
):
void
{
const
d
:
any
=
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
};
const
net
:
INetData
=
{
name
:
'hc_getBackReward'
,
uri
:
window
[
'duiba'
]
+
'/customActivity/happyclear/getBackReward'
,
type
:
'get'
,
dataType
:
'json'
,
hideMsg
:
true
,
param
:
d
,
callback
:
callback
};
this
.
send
(
net
);
}
public
hc_turnableDojoin
(
callback
:
Function
):
void
{
const
d
:
any
=
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
...
...
egret/libs/tw/util/Buried.ts
View file @
bc38c93f
...
...
@@ -4,30 +4,16 @@ 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
;
/**
* 初始化
*/
public
static
init
():
void
{
if
(
DataManager
.
ins
.
gameCfgData
)
{
this
.
appId
=
DataManager
.
ins
.
gameCfgData
.
appInfo
.
appId
;
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
.
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
.
oaId
=
DataManager
.
ins
.
petsIndexData
.
activityId
;
}
}
/**
...
...
@@ -41,7 +27,7 @@ export class Buried {
const
exposure
:
IExposureData
=
{
dpm
:
dpm
,
dcm
:
dcm
,
consumerId
:
Buried
.
consumerId
,
//
consumerId: Buried.consumerId,
appId
:
Buried
.
appId
,
domain
:
embedDomain
};
...
...
mock/config.js
View file @
bc38c93f
...
...
@@ -3,6 +3,9 @@ const config = {
'/crecord/getrecord'
:
{
data
:
'./happyclear/getrecord.json'
},
'/customActivity/happyclear/getBackReward'
:
{
data
:
'./happyclear/getBackReward.json'
},
'/customActivity/happyclear/bigWheel/baseInfo'
:
{
data
:
'./happyclear/turnablebaseInfo.json'
},
...
...
mock/happyclear/getBackReward.json
0 → 100644
View file @
bc38c93f
{
"code"
:
"0000000000"
,
"data"
:{
"appItemId"
:
2322
,
"categoryType"
:
1
,
"coinType"
:
1
,
"img"
:
"1"
,
"maxValue"
:
2
,
"minValue"
:
1
,
"name"
:
"测试商品"
,
"num"
:
3
,
"propType"
:
2
,
"rate"
:
"概率"
,
"title"
:
"商品信息"
,
"value"
:
"虚拟商品标识符"
},
"desc"
:
"OK"
,
"success"
:
true
,
"timestamp"
:
1572079274940
}
\ 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