Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-engine
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
劳工
zeroing-engine
Commits
1db39c8e
Commit
1db39c8e
authored
Apr 07, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
。。。
parent
362fb7d9
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
140 deletions
+54
-140
engine.js
debug/engine.js
+23
-138
engine.js.map
debug/engine.js.map
+1
-1
enviroment.ts
src/zeroing/game-warpper/enviroment.ts
+1
-1
web.ts
src/zeroing/web.ts
+29
-0
No files found.
debug/engine.js
View file @
1db39c8e
This diff is collapsed.
Click to expand it.
debug/engine.js.map
View file @
1db39c8e
This diff is collapsed.
Click to expand it.
src/zeroing/game-warpper/enviroment.ts
View file @
1db39c8e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Created by rockyl on 2019-11-21.
* Created by rockyl on 2019-11-21.
*/
*/
export
let
env
=
{};
export
let
env
:
any
=
{};
export
function
injectEnv
(
data
){
export
function
injectEnv
(
data
){
if
(
data
){
if
(
data
){
...
...
src/zeroing/web.ts
View file @
1db39c8e
/**
/**
* Created by rockyl on 2019-12-10.
* Created by rockyl on 2019-12-10.
*/
*/
import
{
env
}
from
"./game-warpper/enviroment"
;
export
let
queryParams
:
any
=
{};
export
let
queryParams
:
any
=
{};
...
@@ -15,3 +16,31 @@ for (let item of search.replace('?', '').split('&')) {
...
@@ -15,3 +16,31 @@ for (let item of search.replace('?', '').split('&')) {
queryParams
[
arr
[
0
]]
=
arr
.
length
===
1
?
true
:
arr
[
1
];
queryParams
[
arr
[
0
]]
=
arr
.
length
===
1
?
true
:
arr
[
1
];
}
}
//appID提取
if
(
queryParams
.
appID
)
{
env
.
appID
=
queryParams
.
appID
;
}
//渠道类型提取
if
(
queryParams
.
channelType
)
{
env
.
channelType
=
queryParams
.
channelType
;
}
//projectID提取
if
(
queryParams
.
projectID
)
{
env
.
projectID
=
queryParams
.
projectID
;
}
else
if
(
window
.
location
.
pathname
.
match
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
)))
{
env
.
projectID
=
window
.
location
.
pathname
.
replace
(
new
RegExp
(
"/projectx/(
\\
S+)/index(
\\
S+)"
,
"g"
),
"$1"
);
}
//新用户标记
export
let
newUser
=
true
;
let
key
=
'nu_'
+
env
.
appID
+
'_'
+
env
.
projectID
;
let
v
=
localStorage
.
getItem
(
key
);
if
(
v
)
{
newUser
=
false
;
}
else
{
localStorage
.
setItem
(
key
,
'1'
);
}
console
.
log
(
newUser
);
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