Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IPC-footer
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
Allen Bai
IPC-footer
Commits
8db1edca
Commit
8db1edca
authored
Feb 04, 2021
by
Allen Bai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 无备案号时,不显示
parent
67bdb687
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
index.ts
src/index.ts
+7
-2
No files found.
src/index.ts
View file @
8db1edca
...
@@ -39,7 +39,7 @@ function request(option) {
...
@@ -39,7 +39,7 @@ function request(option) {
function
getRequestUrl
()
{
function
getRequestUrl
()
{
// 如果有测试链接 就用测试的链接
// 如果有测试链接 就用测试的链接
return
window
.
localStorage
.
getItem
(
'__ipc_test_url__'
)
||
'https://activity.tuia
test
.cn/land/getIcpInfo'
return
window
.
localStorage
.
getItem
(
'__ipc_test_url__'
)
||
'https://activity.tuia
pre
.cn/land/getIcpInfo'
}
}
function
getIPCByDomain
(
domain
:
string
)
{
function
getIPCByDomain
(
domain
:
string
)
{
...
@@ -120,13 +120,18 @@ async function mountIPCFooter(opts: IPCFooterOptions = {}) {
...
@@ -120,13 +120,18 @@ async function mountIPCFooter(opts: IPCFooterOptions = {}) {
console
.
log
(
'备案号获取失败'
)
console
.
log
(
'备案号获取失败'
)
}
}
if
(
!
IPCNumberString
)
{
currentTaskId
=
null
return
}
const
IPCFooter
=
document
.
createElement
(
'div'
)
const
IPCFooter
=
document
.
createElement
(
'div'
)
const
IPCBoard
=
document
.
createElement
(
'a'
)
const
IPCBoard
=
document
.
createElement
(
'a'
)
IPCFooter
.
id
=
'__IPC_footer__'
IPCFooter
.
id
=
'__IPC_footer__'
IPCBoard
.
id
=
'__IPC_board__'
IPCBoard
.
id
=
'__IPC_board__'
addStyles
(
IPCFooter
,
{
...
defaultFooterStyles
,
...(
opts
.
footerStyles
||
{})
})
addStyles
(
IPCFooter
,
{
...
defaultFooterStyles
,
...(
opts
.
footerStyles
||
{})
})
addStyles
(
IPCBoard
,
{
...
defaultBoardStyles
,
...(
opts
.
boardStyles
||
{})
})
addStyles
(
IPCBoard
,
{
...
defaultBoardStyles
,
...(
opts
.
boardStyles
||
{})
})
IPCBoard
.
innerText
=
(
IPCNumberString
as
string
)
||
'IPC备-'
IPCBoard
.
innerText
=
(
IPCNumberString
as
string
)
||
'
'
// || '
IPC备-'
IPCBoard
.
href
=
'https://beian.miit.gov.cn/#/Integrated/index'
IPCBoard
.
href
=
'https://beian.miit.gov.cn/#/Integrated/index'
IPCFooter
.
appendChild
(
IPCBoard
)
IPCFooter
.
appendChild
(
IPCBoard
)
...
...
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