|
@@ -75,6 +75,33 @@
|
|
|
margin-top: 20px;
|
|
|
padding: 0 10px;
|
|
|
}
|
|
|
+ .jump{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 20px;
|
|
|
+ padding: 0 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .jump>.link-box>.line-left {
|
|
|
+ line-height: 30px;
|
|
|
+ color: #fff;
|
|
|
+ padding: 5px 5px;
|
|
|
+ text-align: center;
|
|
|
+ background: #0C67B0;
|
|
|
+ margin-right: 10px;
|
|
|
+ width: 100px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .jump>.link-box>.line-right {
|
|
|
+ line-height: 40px;
|
|
|
+ padding: 0px 5px;
|
|
|
+ background: #F2F2F2;
|
|
|
+ width: 95%;
|
|
|
+ cursor: pointer;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
|
|
|
.link>.link-box>.line-left {
|
|
|
line-height: 30px;
|
|
@@ -159,6 +186,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="jump " onclick="jumpTw()">
|
|
|
+ <div class="link-box">
|
|
|
+ <div class="line-left" >跳转图文</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div style="display: flex;justify-content: space-around; width: 100%; margin-top: 30px;">
|
|
|
<div style="width: 48%; " class="info">
|
|
|
<div class="policy" style="width: 100%;">
|
|
@@ -442,9 +475,22 @@
|
|
|
|
|
|
// 初始化详情页面
|
|
|
function initDetail() {
|
|
|
+ debugger
|
|
|
var data = sessionStorage.ELK_ARTICLE;
|
|
|
- var id = (window.location.search).split("=")[1];
|
|
|
- if (id) {
|
|
|
+ var id = JSON.parse(sessionStorage.ELK_JUMP_ID);
|
|
|
+ if (data) {
|
|
|
+ data = JSON.parse(data);
|
|
|
+ var pattern = /<(a|p|img|span|div)+.*?>/g;
|
|
|
+ if (pattern.test(data.content)) {
|
|
|
+ // < !--如果是富文本不额外添加样式-->
|
|
|
+ $('#d-content').removeClass("wz-content");
|
|
|
+ }
|
|
|
+ $('#d-title').text(data.title);
|
|
|
+ $('#d-content').empty().append(escape2Html(data.content));
|
|
|
+ $('#d-dept').text(data.departmentname);
|
|
|
+
|
|
|
+
|
|
|
+ } else {
|
|
|
$.ajax({
|
|
|
url: PATH + '/elk/getarticle',
|
|
|
type: 'get',
|
|
@@ -457,20 +503,11 @@
|
|
|
$('#d-title').text(data.data.title);
|
|
|
$('#d-content').html(data.data.content);
|
|
|
$('#d-dept').text(data.data.departmentname);
|
|
|
+ sessionStorage.ELK_URL = data.data.policy_original_url
|
|
|
+ sessionStorage.ELK_JUMP_ID = data.data.question_id
|
|
|
+ sessionStorage.ELK_URL_TITLE =data.data.policy_original_title
|
|
|
},
|
|
|
});
|
|
|
- } else {
|
|
|
- if (data) {
|
|
|
- data = JSON.parse(data);
|
|
|
- var pattern = /<(a|p|img|span|div)+.*?>/g;
|
|
|
- if (pattern.test(data.content)) {
|
|
|
- // < !--如果是富文本不额外添加样式-->
|
|
|
- $('#d-content').removeClass("wz-content");
|
|
|
- }
|
|
|
- $('#d-title').text(data.title);
|
|
|
- $('#d-content').empty().append(escape2Html(data.content));
|
|
|
- $('#d-dept').text(data.departmentname);
|
|
|
- }
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: 'get',
|
|
@@ -734,6 +771,7 @@
|
|
|
}
|
|
|
|
|
|
function getUrl() {
|
|
|
+
|
|
|
let url = JSON.parse(sessionStorage.getItem('ELK_URL'))
|
|
|
console.log(url)
|
|
|
if (url != "null") {
|
|
@@ -746,9 +784,26 @@
|
|
|
} else {
|
|
|
$('.link').removeClass('layui-show')
|
|
|
$('.link').addClass('layui-hide')
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
+ let jumpId = JSON.parse(sessionStorage.getItem('ELK_JUMP_ID'))
|
|
|
+ console.log(jumpId)
|
|
|
+ if (jumpId != "null") {
|
|
|
+ console.log(1)
|
|
|
+ $('.jump').removeClass('layui-hide')
|
|
|
+ $('.jump').addClass('layui-show')
|
|
|
+
|
|
|
+ } else {
|
|
|
+ $('.jump').removeClass('layui-show')
|
|
|
+ $('.jump').addClass('layui-hide')
|
|
|
}
|
|
|
}
|
|
|
+ function jumpTw(){
|
|
|
+ sessionStorage.ELK_ARTICLE = ""
|
|
|
+ // sessionStorage.ELK_JUMP_ID = ""
|
|
|
+ window.location = 'xq.html';
|
|
|
+ }
|
|
|
+
|
|
|
getUrl()
|
|
|
|
|
|
// $('.line-right').click(() => {
|