Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-merchant-data
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 16e0775b
authored
Mar 20, 2019
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
aaa
1 parent
8030aa36
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
src/common/common.js
src/common/common.js
0 → 100644
View file @
16e0775
// 公共方法,设置颜色
function
urlEncode
(
param
,
key
,
encode
)
{
if
(
param
==
null
)
return
''
var
paramStr
=
''
var
t
=
typeof
(
param
)
if
(
t
==
'string'
||
t
==
'number'
||
t
==
'boolean'
)
{
paramStr
+=
'&'
+
key
+
'='
+
((
encode
==
null
||
encode
)
?
encodeURIComponent
(
param
)
:
param
)
}
else
{
for
(
var
i
in
param
)
{
var
k
=
key
==
null
?
i
:
key
+
(
param
instanceof
Array
?
'['
+
i
+
']'
:
'.'
+
i
)
paramStr
+=
urlEncode
(
param
[
i
],
k
,
encode
)
}
}
return
paramStr
}
function
jumpLink
(
url
,
params
,
_this
)
{
location
.
href
=
url
+
urlEncode
(
params
)
// setTimeout(() => {
// const theme = new _this.$Theme()
// theme.change('#FF0000')
// }, 1000)
// document.getElementById('child_iframe_1192').src=url + urlEncode(params)
}
export
{
jumpLink
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment