Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
c7305c45
Commit
c7305c45
authored
May 07, 2021
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务调整
parent
e4c72a67
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
0 deletions
+51
-0
NetName.ts
egret/libs/tw/enum/NetName.ts
+1
-0
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+18
-0
Main.ts
egret/src/Main.ts
+1
-0
TaskPanel.ts
egret/src/Panels/TaskPanel.ts
+8
-0
Tools.ts
egret/src/Tools.ts
+10
-0
config.js
mock/config.js
+3
-0
customInfo.json
mock/game/customInfo.json
+10
-0
No files found.
egret/libs/tw/enum/NetName.ts
View file @
c7305c45
...
@@ -154,4 +154,5 @@ export enum NetName {
...
@@ -154,4 +154,5 @@ export enum NetName {
GAMEGROUP_MARK
,
GAMEGROUP_MARK
,
GAMEGROUP_PRIZE
,
GAMEGROUP_PRIZE
,
frontVariable
,
frontVariable
,
customInfo
,
}
}
egret/libs/tw/manager/NetManager.ts
View file @
c7305c45
...
@@ -1627,6 +1627,24 @@ export class NetManager extends ABNetManager {
...
@@ -1627,6 +1627,24 @@ export class NetManager extends ABNetManager {
};
};
this
.
send
(
net
);
this
.
send
(
net
);
}
}
/**
* 用户信息
* @param callback
*/
public
customInfo
(
callback
:
Function
){
const
net
:
INetData
=
{
name
:
NetName
.
customInfo
,
uri
:
'/projectx/{projectId}/join_5/customInfo.do'
,
type
:
'get'
,
dataType
:
'json'
,
param
:
{
},
callback
:
callback
};
this
.
send
(
net
);
}
}
}
// window['nt'] = NetManager.ins;
// window['nt'] = NetManager.ins;
...
...
egret/src/Main.ts
View file @
c7305c45
...
@@ -112,6 +112,7 @@ class Main extends eui.UILayer {
...
@@ -112,6 +112,7 @@ class Main extends eui.UILayer {
await
Tools
.
getMedalData
();
// 勋章数据
await
Tools
.
getMedalData
();
// 勋章数据
await
Tools
.
gameGroupPrize
();
// 游戏合集发奖
await
Tools
.
gameGroupPrize
();
// 游戏合集发奖
await
Tools
.
gameFrontVariable
();
//
await
Tools
.
gameFrontVariable
();
//
await
Tools
.
gameCustomInfo
();
const
areaPrice
=
await
Tools
.
getAreaPrice
();
const
areaPrice
=
await
Tools
.
getAreaPrice
();
if
(
!
areaPrice
)
{
if
(
!
areaPrice
)
{
...
...
egret/src/Panels/TaskPanel.ts
View file @
c7305c45
...
@@ -10,6 +10,7 @@ import ItemRenderer = eui.ItemRenderer;
...
@@ -10,6 +10,7 @@ import ItemRenderer = eui.ItemRenderer;
import
Image
=
eui
.
Image
;
import
Image
=
eui
.
Image
;
import
Label
=
eui
.
Label
;
import
Label
=
eui
.
Label
;
import
Group
=
eui
.
Group
;
import
Group
=
eui
.
Group
;
import
{
Tools
}
from
"../Tools"
;
export
default
class
TaskPanel
extends
Panel
{
export
default
class
TaskPanel
extends
Panel
{
public
list
:
List
;
public
list
:
List
;
...
@@ -145,8 +146,15 @@ class TaskItem extends ItemRenderer {
...
@@ -145,8 +146,15 @@ class TaskItem extends ItemRenderer {
MainDispatcher
.
dispatchEvent
(
'getTaskInfo'
);
MainDispatcher
.
dispatchEvent
(
'getTaskInfo'
);
MainIns
().
mainUI
.
getPropInfo
();
MainIns
().
mainUI
.
getPropInfo
();
if
(
window
[
'taskUi'
][
this
.
data
.
id
].
linkId
)
{
if
(
window
[
'taskUi'
][
this
.
data
.
id
].
linkId
)
{
console
.
error
(
"任务点击1===》"
,
window
[
'taskUi'
][
this
.
data
.
id
].
linkId
);
window
[
'getActivityInfo'
](
window
[
'taskUi'
][
this
.
data
.
id
].
linkId
);
window
[
'getActivityInfo'
](
window
[
'taskUi'
][
this
.
data
.
id
].
linkId
);
}
else
{
}
else
{
console
.
error
(
"任务点击2===》"
,
this
.
data
.
url
||
window
[
'taskUi'
][
this
.
data
.
id
].
link
,
Tools
.
customInfo
.
data
);
let
signstr
=
Tools
.
customInfo
.
data
.
custid
+
""
+
15
+
""
+
this
.
data
.
id
+
""
+
Tools
.
customInfo
.
data
.
cisno
;
let
sign
=
window
[
'duiba_md5'
](
signstr
);
let
jumplink
=
(
this
.
data
.
url
||
window
[
'taskUi'
][
this
.
data
.
id
].
link
)
+
"&custid="
+
Tools
.
customInfo
.
data
.
custid
+
"&taskid="
+
this
.
data
.
id
+
"&durtime="
+
15
+
"&sign="
+
sign
;
console
.
error
(
"跳转检查===》"
,
jumplink
);
window
.
location
.
href
=
this
.
data
.
url
||
window
[
'taskUi'
][
this
.
data
.
id
].
link
;
window
.
location
.
href
=
this
.
data
.
url
||
window
[
'taskUi'
][
this
.
data
.
id
].
link
;
}
}
}
}
...
...
egret/src/Tools.ts
View file @
c7305c45
...
@@ -204,4 +204,14 @@ export class Tools {
...
@@ -204,4 +204,14 @@ export class Tools {
})
})
}
}
public
static
customInfo
=
null
;
public
static
gameCustomInfo
(){
return
new
Promise
((
resolve
)
=>
{
NetManager
.
ins
.
customInfo
((
success
,
res
)
=>
{
this
.
customInfo
=
res
;
resolve
(
true
);
})
})
}
}
}
\ No newline at end of file
mock/config.js
View file @
c7305c45
...
@@ -368,6 +368,9 @@ const config = {
...
@@ -368,6 +368,9 @@ const config = {
'/projectx/{projectId}/frontVariable.query'
:
{
'/projectx/{projectId}/frontVariable.query'
:
{
data
:
'./game/frontVariable.json'
data
:
'./game/frontVariable.json'
},
},
'/projectx/{projectId}/join_5/customInfo.do'
:
{
data
:
'./game/customInfo.json'
},
};
};
// for (let item in config) {
// for (let item in config) {
...
...
mock/game/customInfo.json
0 → 100644
View file @
c7305c45
{
"success"
:
true
,
"message"
:
""
,
"code"
:
""
,
"data"
:
{
"mobile"
:
"121"
,
"custid"
:
"121"
,
"cisno"
:
"121"
}
}
\ 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