Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
announcement-static
Project
Overview
Details
Activity
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
姜雷
announcement-static
Commits
b87783d1
Commit
b87783d1
authored
Mar 05, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加公告页面
parents
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
114 additions
and
0 deletions
+114
-0
.gitignore
.gitignore
+8
-0
index.html
index.html
+106
-0
No files found.
.gitignore
0 → 100644
View file @
b87783d1
dist/
.temp/
.rn_temp/
node_modules/
.DS_Store
package-lock.json
.vscode/*
\ No newline at end of file
index.html
0 → 100644
View file @
b87783d1
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
/>
<script
src=
"https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"
></script>
<title>
公告
</title>
<style>
html
,
body
,
#app
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
margin
:
0
;
padding
:
0
;
}
.loadingText
{
padding
:
6.66667vw
;
}
.Content
{
height
:
100%
;
padding
:
4.8vw
3.2vw
;
box-sizing
:
border-box
;
overflow-y
:
scroll
;
-webkit-overflow-scrolling
:
touch
;
}
.Content
.content-title
{
font-size
:
4.53333vw
;
color
:
#1e1e1e
;
font-weight
:
bold
;
line-height
:
5.33333vw
;
word-break
:
break-all
;
}
.Content
.content-info
{
font-size
:
3.46667vw
;
color
:
#909090
;
padding
:
4vw
0
;
display
:
flex
;
justify-content
:
space-between
;
}
.Content
.content-info-src
{
flex
:
1
;
}
.Content
.content-body
{
font-size
:
3.73333vw
;
color
:
#1e1e1e
;
}
</style>
</head>
<body>
<div
id=
"app"
>
<div
class=
"loadingText"
>
加载中。。。
</div>
</div>
</body>
<script>
function
getUrlParam
(
name
)
{
var
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
);
//构造一个含有目标参数的正则表达式对象
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
//匹配目标参数
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
//返回参数值
}
$
(
function
()
{
var
id
=
getUrlParam
(
'id'
);
var
token
=
getUrlParam
(
'token'
);
$
.
ajax
({
url
:
'https://api-schoolmain.dcrym.com/dcxy/wechat/homepage/campus/section?itemId='
+
id
,
headers
:
{
token
:
token
,
},
}).
done
(
function
(
res
)
{
if
(
res
.
code
===
1000
)
{
var
data
=
res
.
data
;
$
(
'#app'
).
html
(
'<div class="Content">'
+
'<div class="content-title">'
+
data
.
title
+
'</div>'
+
'<div class="content-info">'
+
'<span class="content-info-src ellipsis">'
+
data
.
source
+
'</span>'
+
'<span>'
+
data
.
updateTime
+
'</span>'
+
'</div>'
+
'<div class="content-body" ></div>'
+
'</div>'
,
);
$
(
'.content-body'
).
html
(
data
.
content
);
}
else
{
$
(
'.loadingText'
).
html
(
'获取失败!'
);
}
});
});
</script>
</html>
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