Commit 295b30f3 by 姜雷

合并冲突

parents 30ae8abd e569c12a
<!DOCTYPE html>
<html lang="en">
<head>
<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 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>
......@@ -19,9 +18,11 @@
margin: 0;
padding: 0;
}
.loadingText {
padding: 6.66667vw;
}
.Content {
/* height: 100%; */
padding: 4.8vw 3.2vw;
......@@ -29,6 +30,7 @@
/* overflow-y: scroll;
-webkit-overflow-scrolling: touch; */
}
.Content .content-title {
font-size: 4.53333vw;
color: #1e1e1e;
......@@ -36,6 +38,7 @@
line-height: 5.33333vw;
word-break: break-all;
}
.Content .content-info {
font-size: 3.46667vw;
color: #909090;
......@@ -43,65 +46,70 @@
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>
</head>
<body>
<div id="app">
<div class="loadingText">
加载中。。。
</div>
</div>
</body>
</body>
<script>
<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() {
$(function () {
var id = getUrlParam('id');
var token = getUrlParam('token');
var customerId = getUrlParam('customerId');
$.ajax({
url:
'https://internal-test-school-home-bg.168cad.top/dcxy/wechat/homepage/campus/itemInfo?itemId=' +
id,
'https://ex-dev-dcxy-home-app.168cad.top/app/home/module/notice/detail?noticeCode=' +
id + '&customerId=' + customerId,
headers: {
token: token,
},
}).done(function(res) {
}).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);
// $('#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>
</script>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment