Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wfc13
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
wfc13
Commits
57504044
Commit
57504044
authored
Sep 18, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0adcf906
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
21 deletions
+49
-21
index.do.json
project/mock/webNet/dazzle/index.do.json
+1
-0
doAssist.do.json
project/mock/webNet/dazzle_assist/doAssist.do.json
+7
-0
getInviteCode.do.json
project/mock/webNet/dazzle_assist/getInviteCode.do.json
+7
-0
Main.ts
project/src/Main.ts
+21
-18
ResJson.ts
project/src/ResJson.ts
+1
-1
WebNetName.ts
project/src/WebNetName.ts
+5
-2
IndexScene.ts
project/src/scenes/IndexScene.ts
+7
-0
No files found.
project/mock/webNet/dazzle/index.do.json
View file @
57504044
{
"code"
:
null
,
"data"
:
{
"needPop"
:
1
,
"activityOver"
:
false
,
"surplusCount"
:
1
,
"credits"
:
0
,
...
...
project/mock/webNet/dazzle_assist/doAssist.do.json
0 → 100644
View file @
57504044
{
"success"
:
false
,
"message"
:
""
,
"data"
:
{
"inviteCode"
:
123
}
}
\ No newline at end of file
project/mock/webNet/dazzle_assist/getInviteCode.do.json
0 → 100644
View file @
57504044
{
"success"
:
true
,
"message"
:
""
,
"data"
:
{
"inviteCode"
:
123
}
}
\ No newline at end of file
project/src/Main.ts
View file @
57504044
import
{
changeScene
,
destroyAllCtrls
}
from
"../module/ctrls"
;
import
{
changeScene
,
destroyAllCtrls
,
showPanel
}
from
"../module/ctrls"
;
import
{
RES
}
from
"../module/RES"
;
import
{
getUrlParams
}
from
"../module/tools/WebTool"
;
import
{
destroyLayers
,
layers
}
from
"../module/views/layers"
;
import
{
IndexScene
}
from
"../src/scenes/IndexScene"
;
import
getQueryParams
from
"./common/getQueryParams"
;
import
{
getSearch
}
from
"./getSearch"
;
import
{
getUnionid
}
from
"./getUnionid"
;
import
"./monitor"
;
import
{
ResJson
}
from
"./ResJson"
;
import
{
startShare
}
from
"./share"
;
import
{
SkinJson
}
from
"./SkinJson"
;
import
{
destroyWebNetData
,
sendWebNet
}
from
"./WebNet"
;
import
{
WebNetName
}
from
"./WebNetName"
;
import
{
accessLog
}
from
'duiba-utils'
import
{
getUnionid
}
from
"./getUnionid"
;
import
"./monitor"
import
{
SharePanel
}
from
"./panels/share"
/**
* 全局事件,为了和小程序交互
...
...
@@ -51,22 +50,22 @@ export class Main {
}
private
async
onAddToStage
()
{
if
(
getQueryParams
().
iscustom
)
{
sendWebNet
(
WebNetName
.
login
,{
appId
:
getUrlParams
(
"appID"
),
unionid
:
getUnionid
()
||
'oIbvOt3D_z7AfHz9lI6VmDEeYDIk'
,
redirectUrl
:
`https://85337.activity-11.m.duiba.com.cn/projectx/p24ddb854/index.html?appID=85337&appKey=43em3uUH9vthEvNA59Zsk8dE1igv&openBs=openbs&issharepage=
${
getQueryParams
().
issharepage
}
&code=
${
getQueryParams
().
code
}
`
if
(
getQueryParams
().
iscustom
)
{
sendWebNet
(
WebNetName
.
login
,
{
appId
:
getUrlParams
(
"appID"
),
unionid
:
getUnionid
()
||
'oIbvOt3D_z7AfHz9lI6VmDEeYDIk'
,
redirectUrl
:
`https://85337.activity-11.m.duiba.com.cn/projectx/p24ddb854/index.html?appID=85337&appKey=43em3uUH9vthEvNA59Zsk8dE1igv&openBs=openbs&issharepage=
${
getQueryParams
().
issharepage
}
&code=
${
getQueryParams
().
code
}
`
// redirectUrl:`http://activity.saas.duibatest.com.cn/projectx/p34906fbc/index.html?appKey=2vv47nLE1y47qqMMeD8P52ycudDU&openBs=openbs&appID=19493&issharepage=${getQueryParams().issharepage}`
}).
then
(
res
=>
{
let
url
=
res
.
data
;
}).
then
(
res
=>
{
let
url
=
res
.
data
;
location
.
replace
(
url
);
});
return
;
}
if
(
getQueryParams
().
issharepage
==
1
)
{
if
(
getQueryParams
().
issharepage
==
1
)
{
console
.
log
(
'分享进入'
)
}
else
{
}
else
{
console
.
log
(
'主动进入'
)
}
...
...
@@ -82,15 +81,20 @@ export class Main {
//皮肤配置加载
RES
.
loadSkinConfig
(
SkinJson
);
console
.
log
(
"初始化皮肤配置完成"
)
//加载通用资源
//加载通用资源
FF
await
RES
.
loadGroup
(
"common"
);
await
RES
.
loadGroup
(
"svga"
);
await
sendWebNet
(
WebNetName
.
index
,
{
isShare
:
getQueryParams
().
issharepage
==
'1'
?
1
:
0
});
await
sendWebNet
(
WebNetName
.
index
,
{
isShare
:
getQueryParams
().
issharepage
==
'1'
?
1
:
0
});
console
.
log
(
"通用资源加载完成"
)
//h5环境时,隐藏加载中
if
(
FYGE
.
getEnv
()
==
"web"
&&
document
.
getElementById
(
"__loading__"
))
document
.
getElementById
(
"__loading__"
).
style
.
display
=
"none"
;
//显示场景
changeScene
(
IndexScene
);
sendWebNet
(
WebNetName
.
getInviteCode
,
{},
null
,
true
);
sendWebNet
(
WebNetName
.
doAssist
,
{
inviteCode
:
getQueryParams
().
inviteCode
},
null
,
true
);
// setTimeout(() => {
// showPanel(SharePanel);
// }, 4000);
}
/**
...
...
@@ -143,5 +147,4 @@ export class Main {
//网络数据记录清空
destroyWebNetData
();
}
}
}
\ No newline at end of file
project/src/ResJson.ts
View file @
57504044
...
...
@@ -831,5 +831,5 @@ export const ResJson = {
}
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/1631
780630
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/1631
957256
/resource/"
}
\ No newline at end of file
project/src/WebNetName.ts
View file @
57504044
...
...
@@ -5,19 +5,22 @@
export
enum
WebNetName
{
login
=
"/customActivity/disu/login"
,
/**
* 获取规则
*/
projectRule
=
"/projectx/{projectId}/projectRule.query"
,
/**
* 获取首页数据
* 获取首页数据
s
*/
index
=
"/projectx/{projectId}/dazzle/index.do"
,
/**
* 获取奖品信息
*/
drawPrize
=
"/projectx/{projectId}/dazzle/drawPrize.do"
,
getInviteCode
=
"/projectx/{projectId}/dazzle_assist/getInviteCode.do"
,
doAssist
=
"/projectx/{projectId}/dazzle_assist/doAssist.do"
,
/**
* 分享获得免费次数
*/
...
...
project/src/scenes/IndexScene.ts
View file @
57504044
...
...
@@ -9,6 +9,7 @@ import TestButton from "../common/TestButton";
import
{
isMember
}
from
"../isMember"
;
import
{
getTimesPanel
}
from
"../panels/getTimes"
;
import
{
RulePanel
}
from
"../panels/RulePanel"
;
import
{
SharePanel
}
from
"../panels/share"
;
import
{
timesNotEnoughPanel
}
from
"../panels/timesNotEnough"
;
import
{
getWebData
,
sendLog
,
sendWebNet
}
from
"../WebNet"
;
import
{
WebNetName
}
from
"../WebNetName"
;
...
...
@@ -122,6 +123,12 @@ export class IndexScene extends Scene {
this
.
stage
.
addEventListener
(
'updateIndexData'
,
this
.
getIndex
,
this
);
this
.
stage
.
addEventListener
(
'handleShare'
,
this
.
handleShare
,
this
);
if
(
result
.
data
.
needPop
){
setTimeout
(()
=>
{
showPanel
(
SharePanel
);
},
4000
);
}
}
initContainer
()
{
...
...
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