Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
icbcRPG
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
icbcRPG
Commits
dcb77cf6
Commit
dcb77cf6
authored
Dec 19, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
620d8dce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
index.html
project/public/index.html
+8
-4
loading.jsx
project/src/pages/loading/loading.jsx
+7
-6
No files found.
project/public/index.html
View file @
dcb77cf6
...
@@ -18,21 +18,25 @@
...
@@ -18,21 +18,25 @@
requestType
:
"mock"
requestType
:
"mock"
}
}
}
}
var
CFG
=
CFG
||
{};
var
CFG
=
CFG
||
{};
CFG
.
projectId
=
location
.
pathname
.
split
(
'/'
)[
2
]
||
'1'
;
CFG
.
projectId
=
location
.
pathname
.
split
(
'/'
)[
2
]
||
'1'
;
function
getUrlParam
(
name
)
{
function
getUrlParam
(
name
)
{
const
search
=
window
.
location
.
search
;
const
search
=
window
.
location
.
search
;
const
matched
=
search
const
matched
=
search
.
slice
(
1
)
.
slice
(
1
)
.
match
(
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
));
.
match
(
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
,
'i'
));
return
search
.
length
?
matched
&&
matched
[
2
]
:
null
;
return
search
.
length
?
matched
&&
matched
[
2
]
:
null
;
}
}
CFG
.
appID
=
'${APPID}'
;
CFG
.
appID
=
'${APPID}'
;
if
(
!
getUrlParam
(
"appID"
))
{
if
(
!
getUrlParam
(
"appID"
))
{
alert
(
"【警告】检测到活动url中没有appID参数
\n
缺少该参数会导致埋点、分享、app信息获取错误。"
)
alert
(
"【警告】检测到活动url中没有appID参数
\n
缺少该参数会导致埋点、分享、app信息获取错误。"
)
}
}
window
.
shareUrl
=
'https://duiba'
+
CFG
.
appID
+
CFG
.
projectId
+
Math
.
floor
(
Math
.
random
()
*
90000
)
+
'.activity-1.m.duiba.com.cn/customShare/share?id=4609'
// window.shareUrl = 'https://activity.m-1.duiba.com.cn/customShare/share?id=4609';
</script>
</script>
</head>
</head>
...
...
project/src/pages/loading/loading.jsx
View file @
dcb77cf6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
{
appID
}
from
'duiba-utils'
;
import
{
appID
}
from
'duiba-utils'
;
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Timer
}
from
'teddi'
;
//
import { Timer } from 'teddi';
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
API
from
'../../api'
;
import
API
from
'../../api'
;
...
@@ -24,11 +24,12 @@ class Loading extends Component {
...
@@ -24,11 +24,12 @@ class Loading extends Component {
getCountdown
()
{
getCountdown
()
{
return
new
Promise
((
r
)
=>
{
return
new
Promise
((
r
)
=>
{
const
delta
=
30
;
// const delta = 30;
const
timer
=
new
Timer
(
1
*
30
,
1000
/
30
);
// const timer = new Timer(1 * 30, 1000 / 30);
timer
.
on
(
'timer'
,
this
.
onupdate
,
this
);
// timer.on('timer', this.onupdate, this);
timer
.
on
(
'complete'
,
r
,
this
);
// timer.on('complete', r, this);
timer
.
start
();
// timer.start();
r
();
});
});
}
}
...
...
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