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
ab89c747
Commit
ab89c747
authored
Sep 06, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
合并冲突
parents
e22117d6
5d803383
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
100 deletions
+109
-100
index.html
index.html
+109
-100
No files found.
index.html
View file @
ab89c747
<!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%;
<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;
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
;
word-break
:
break-all
;
}
</style>
</head>
<body>
<div
id=
"app"
>
<div
class=
"loadingText"
>
加载中。。。
</div>
</div>
</body>
}
.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
;
}
<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
;
//返回参数值
.Content
.content-body
{
font-size
:
3.73333vw
;
color
:
#1e1e1e
;
word-break
:
break-all
;
}
$
(
function
()
{
var
id
=
getUrlParam
(
'id'
);
var
token
=
getUrlParam
(
'token'
);
$
.
ajax
({
url
:
'https://api-schoolhome.dcrym.com/dcxy/wechat/homepage/campus/itemInfo?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
(
'获取失败!'
);
}
});
</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'
);
var
customerId
=
getUrlParam
(
'customerId'
);
$
.
ajax
({
url
:
'https://ex-test-dcxy-home-app.168cad.top/app/home/module/notice/detail?noticeCode='
+
id
+
'&customerId='
+
customerId
,
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>'
,
// );
$
(
'#app'
).
html
(
data
.
content
);
}
else
{
$
(
'.loadingText'
).
html
(
'获取失败!'
);
}
});
</script>
</html>
});
</script>
</html>
\ No newline at end of file
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