Commit ab89c747 by 姜雷

合并冲突

parents e22117d6 5d803383
<!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
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